Skip to content

Commit

Permalink
fix: show hotspots after change media
Browse files Browse the repository at this point in the history
  • Loading branch information
eransakal committed Feb 6, 2019
1 parent 0fafccd commit c20cb07
Showing 1 changed file with 8 additions and 14 deletions.
22 changes: 8 additions & 14 deletions src/player-v2/plugin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,9 @@ mw.kalturaPluginWrapper(function(){


setup: function(){
if (!this._wasPlayed) {
this.shouldEnableLogs();
}

try {
const videoElement = this.getPlayer().getVideoHolder().find('video')[0];
jQuery(videoElement).on("loadeddata", this.handleVideoSizeChange.bind(this));

} catch (e) {
log('error', 'plugin.setup', 'failed to register to video element loaded metadata', { error: e.message});
}

this.shouldEnableLogs();
this.addBindings();


},

pauseVideo: function() {
Expand Down Expand Up @@ -162,9 +150,15 @@ mw.kalturaPluginWrapper(function(){

this.bind( 'playerReady', function(){

try {
const videoElement = _this.getPlayer().getVideoHolder().find('video')[0];
jQuery(videoElement).on("loadeddata", _this.handleVideoSizeChange.bind(_this));

} catch (e) {
log('error', 'plugin.setup', 'failed to register to video element loaded metadata', { error: e.message});
}

const props = {
const props = {
getCurrentTime: _this._getCurrentTime.bind(_this),
loadCuePoints: _this.loadCuePoints.bind(_this),
getPlayerSize: _this.getPlayerSize.bind(_this),
Expand Down

0 comments on commit c20cb07

Please sign in to comment.