Created
September 12, 2020 19:09
-
-
Save marcosbozzani/9d894993cced6d6173141e6094f5c08c to your computer and use it in GitHub Desktop.
moodle: video-js youtube view only
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
| // moodle/media/player/videojs/classes/plugin.php | |
| var styles = document.createElement("style"); | |
| styles.innerHTML = "\ | |
| .vjs-youtube .vjs-tech {\ | |
| pointer-events: none !important; \ | |
| }\ | |
| .vjs-youtube .vjs-big-play-button { \ | |
| position: absolute; \ | |
| left: 50%; \ | |
| top: 50%; \ | |
| transform: translate(-50%, -50%); \ | |
| transition: none;\ | |
| }\ | |
| .vjs-youtube-mobile .vjs-big-play-button {\ | |
| display: block;\ | |
| }\ | |
| .vjs-controls-disabled .vjs-big-play-button, \ | |
| .vjs-has-started .vjs-big-play-button, \ | |
| .vjs-using-native-controls .vjs-big-play-button, \ | |
| .vjs-error .vjs-big-play-button {\ | |
| display: none;\ | |
| }\ | |
| "; | |
| (document.head || document.getElementsByTagName('head')[0]).appendChild(styles); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment