ionic-framework: bug: App close on hardware back button press when video is open in full screen.

Bug Report

Ionic version:

[x] 4.x

Current behavior: I have an HTML video player in my app, <video controls> <source [src]="videoUrl" type="video/mp4"> </video>

Which loads video from device gallery and show in screen. Video controls have option to open video in full screen. when the video is in full screen, the app closes instead of go back on click on device hardware back button.

Expected behavior: It should close the video full screen and go back to the previous screen.

Ionic info:

Ionic:

   Ionic CLI                     : 5.0.3
   Ionic Framework               : @ionic/angular 4.6.0
   @angular-devkit/build-angular : 0.13.9
   @angular-devkit/schematics    : 7.3.9
   @angular/cli                  : 7.3.9
   @ionic/angular-toolkit        : 1.5.1

Cordova:

   Cordova CLI       : 8.0.0
   Cordova Platforms : android 7.0.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 4.1.1, (and 18 other plugins)

Utility:

   cordova-res : 0.4.0
   native-run  : 0.2.6

System:

   Android SDK Tools : 26.1.1 (/Users/divyesh/Library/Android/sdk)
   ios-deploy        : 1.9.2
   NodeJS            : v11.4.0 (/usr/local/bin/node)
   npm               : 6.4.1
   OS                : macOS Mojave
   Xcode             : Xcode 10.2.1 Build version 10E1001

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 15 (1 by maintainers)

Most upvoted comments

Same here !

I’m facing the same problem !

Another behaviour I noticed:

1 - Open page 2 - Play video 3 - Go fullscreen 4 - Exit fullscreen 5 - Press back button –> The entire app closes

But if we don’t go fullscreen:

1 - Open page 2 - Play video 3 - Press back button –> The back button works properly


Now I’m using a modal just to store the player:

1 - Open page 2 - Open modal with the video 3 - Play Video 4 - Go fullscreen 5 - Exit fullscreen 6 - Close modal (pressing X button on top right corner) 7 - The page is showed again 8 - Press back button –> The back button works properly

But if we press back button instead of closing modal:

1 - Open page 2 - Open modal with the video 3 - Play Video 4 - Go fullscreen 5 - Exit fullscreen 6 - Press back button –> The entire app closes