Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- $("video").mediaelementplayer({
- features: ["playpause", "volume", "progress", "airplay", "coon", "fullscreen"],
- startVolume: 1,
- alwaysShowControls: false,
- forceLive: true
- });
- playerObject = document.getElementById("player");
- MediaElementPlayer.prototype.buildcoon = function(player, controls, layers, media) {
- var
- // create the coon button
- coon = $('<a href="" id="listen"><div class="mejs-button mejs-coon-button ' + ((player.options.coon) ? 'mejs-coon-on' : 'mejs-coon-off') + '" title="Chromecast">' +
- '<span></span>' + '</div></a>')
- // append it to the toolbar
- .appendTo(controls)
- // add a click toggle event
- .click(function() {
- player.options.coon = !player.options.coon;
- if (player.options.coon) {
- coon.removeClass('mejs-coon-off').addClass('mejs-coon-on');
- } else {
- coon.removeClass('mejs-coon-on').addClass('mejs-coon-off');
- }
- });
- }
- </script>
Add Comment
Please, Sign In to add comment