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();
}
});
});
}
}