Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 229110

StatusBar issue with videojs Fullscreen

$
0
0

the solution for who face the same issue
define this to another variable before the fullscreen function

var _this = this;

then use in in the fullscreen function like this

_this.statusBar.hide();
    export class VideoJSComponent implements OnInit, OnDestroy {

      ...

      ngAfterViewInit() {
          var _this = this;
          this.player = videojs(document.getElementById(el), {

              ...

          }, function() {
              // Handle fullscreen
              myPlayer.on('fullscreenchange', function() {
                  if (myPlayer.isFullscreen() == true) {
                      ...
                      _this.statusBar.hide();
                  }
                  else {
                      ...
                      _this.statusBar.show();
                  }
              });
          });
      }
    }

Viewing all articles
Browse latest Browse all 229110

Trending Articles



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