-
Notifications
You must be signed in to change notification settings - Fork 77
Open
Description
Tried to use both features in the same instance and didn't work.
I did some digging and solved it. It also works if there are gifs and video in the same scope.
I'm not doing a pull request because I didn't tested so well, but here is the code if you want to do it. I apologyze if this is not the right way.
processScope: function(){
var scope = this.getOption('scope');
if( scope ){
if(GifPlayer.scopes[scope]){
if ( GifPlayer.scopes[scope].mode == 'gif' ) {
GifPlayer.scopes[scope].stopGif();
} else if ( GifPlayer.scopes[scope].mode == 'video' ) {
GifPlayer.scopes[scope].pauseVideo();
}
}
GifPlayer.scopes[scope] = this;
}
}
this.videoElement.on('click', function(){
if(gp.videoPaused){
gp.processScope();
gp.resumeVideo();
}else{
gp.pauseVideo();
}
});
Metadata
Metadata
Assignees
Labels
No labels