I'm using Phonegap in combination with Framework7.
I have a really strange issue. I'm using html5 video tag to stream video. Streaming works perfectly fine.
Issue appears when I go fullscreen. After exiting full screen and pressing back button applications closes instead of going on previous screen.
If I play video and don't go fullscreen it will work normally and go back to previous screen.
This is the code that I have: document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
document.addEventListener("backbutton", function (e) {
alert('backbutton');
if (mainView.activePage.name=='index'){
navigator.notification.confirm("Are you sure want to exit from App?", onConfirmExit, "Confirmation", "Yes,No");
function onConfirmExit(button) {
if(button==2){ //If User select a No, then return back;
return;
}else{
navigator.app.exitApp(); // If user select a Yes, quit from the app.
}
}
}
else{
mainView.router.back();
}
}, false);
}
The alert in the code will not appear if I go fullscreen, exit from fullscreen and press back.
Is this some bug or I'm doing something wrong?