Guest User

Untitled

a guest
Jan 15th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. <script>
  2. $("video").mediaelementplayer({
  3. features: ["playpause", "volume", "progress", "airplay", "coon", "fullscreen"],
  4. startVolume: 1,
  5. alwaysShowControls: false,
  6. forceLive: true
  7. });
  8. playerObject = document.getElementById("player");
  9.  
  10. MediaElementPlayer.prototype.buildcoon = function(player, controls, layers, media) {
  11. var
  12. // create the coon button
  13. coon = $('<a href="" id="listen"><div class="mejs-button mejs-coon-button ' + ((player.options.coon) ? 'mejs-coon-on' : 'mejs-coon-off') + '" title="Chromecast">' +
  14. '<span></span>' + '</div></a>')
  15. // append it to the toolbar
  16. .appendTo(controls)
  17. // add a click toggle event
  18. .click(function() {
  19. player.options.coon = !player.options.coon;
  20. if (player.options.coon) {
  21. coon.removeClass('mejs-coon-off').addClass('mejs-coon-on');
  22. } else {
  23. coon.removeClass('mejs-coon-on').addClass('mejs-coon-off');
  24. }
  25. });
  26. }
  27. </script>
Add Comment
Please, Sign In to add comment