Created
December 19, 2014 09:23
-
-
Save rchrd2/4cafdae8d8add51f2a9d to your computer and use it in GitHub Desktop.
Videojs BigPlayButton Play Pause
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
videojs.BigPlayButton.prototype.onClick = function(){ | |
if(this.player_.paused()) { | |
this.player_.play(); | |
} else { | |
this.player_.pause(); | |
} | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
.vjs-playing | |
.vjs-paused | |
.vjs-user-active | |
.vjs-user-inactive | |
.vjs-has-started | |
*/ | |
.vjs-custom-skin .vjs-big-play-button { | |
display: block; | |
position: relative; | |
top: 50%; | |
left: 50%; | |
transform: translateY(-50%) translateX(-50%); | |
width:54px; | |
height:64px; | |
cursor: pointer; | |
background-repeat: no-repeat; | |
z-index:1000; | |
background-image: url('/_media/play.png'); | |
outline:0; | |
} | |
.vjs-custom-skin.vjs-playing .vjs-big-play-button { | |
display:none; | |
} | |
.vjs-custom-skin.vjs-playing.vjs-user-active .vjs-big-play-button { | |
display: block; | |
background-image: url('/_media/pause.png'); | |
} | |
.vjs-custom-skin.vjs-paused .vjs-big-play-button { | |
display: block; | |
background-image: url('/_media/play.png'); | |
} | |
.vjs-custom-skin.vjs-user-active .vjs-big-play-button {} | |
.vjs-custom-skin.vjs-user-inactive .vjs-big-play-button {} | |
.vjs-custom-skin.vjs-has-started .vjs-big-play-button { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the script to make play pause button? pleas check this photo http://gph.is/2nncT97 this is missing in my video-js