i have html5 audio player on PageA.
it works great.
the user clicks play icon of the html5 audi it plays music. it is working fine. no issues
there is backbutton on pageA, when the user clicks on the "backbutton" or cliks anythin on the tab (bottom line have 5 tabs to go to other pages etc..) to go to another pages of the App.
i want to sop the audio when the pageA is navgated to any other page. ( the user may click either "Bakbutton" or any one of the tab (bottom i have 5 tabs)
how to achieve this
i am thinking to handle page left( if any such event exists) event of "PageA" , i want to write below code:
$("#myHtml5audio1").pause();
$("#myHtml5audio1").currentTime = 0;
but i am not finding "page left" event to hadle.
how to handle page left evet( or any other event similar to page left so that i can stop palying the audio when the user moves out from the pageA)