Quantcast
Channel: Ionic Framework - Ionic Forum
Viewing all articles
Browse latest Browse all 48978

screenOrientation on change doesnt detect when streaming media is playing

$
0
0

I have a video html tag in my ionic app playing a video .m3u8 and I want to play it fullscreen when user rotate his phone.

I can make it adding streaming media plugin and play the video in landscape becuase play video html tag needs and interact of user to play it in fullscreen.

this.screenOrientation.onChange().subscribe(
      () => {
        console.log(this.screenOrientation.type)
        if (this.rotation.indexOf('landscape') == -1 && this.screenOrientation.type.indexOf('landscape') > -1) {
          this.toFullScreen(); // I play streaming media here

        } else if (this.rotation.indexOf('landscape') > -1 && this.screenOrientation.type.indexOf('portrait') >-1) {

          // close straming media

        }
        this.rotation = this.screenOrientation.type;

      }
    );

The problem is that event is never called when streaming media is playing

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 48978

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>