Template:FR2012/Video-test: Difference between revisions
Jump to navigation
Jump to search
Content deleted Content added
No edit summary |
No edit summary |
||
Line 13: | Line 13: | ||
<script type='text/javascript'> |
<script type='text/javascript'> |
||
$(document).ready(function(){ |
//$(document).ready(function(){ |
||
$("div.commons-video").css('display', 'none'); |
// $("div.commons-video").css('display', 'none'); |
||
}); // hide the commons video |
//}); // hide the commons video |
||
mw.setConfig( 'EmbedPlayer.RewriteSelector', null ); |
|||
$("div.commons-video").css('display', 'none'); |
|||
var playerW = parseInt('</html>{{{width|400}}}<html>'); |
var playerW = parseInt('</html>{{{width|400}}}<html>'); |
||
Line 32: | Line 35: | ||
); |
); |
||
}); |
}); |
||
$("a#showcommonsvideo").click(function(event){ |
$("a#showcommonsvideo").click(function(event){ |
||
event.preventDefault(); |
event.preventDefault(); |
||
$("div.thumbinner").css('display', 'none'); |
$("div.thumbinner").css('display', 'none'); |
||
$("div.commons-video").css('display', 'block'); |
$("div.commons-video").css('display', 'block'); |
||
$('#mwe_player_0')[0].$interface.css({'width': playerW, 'height':playerH}).find('#mwe_player_0')[0].updateLayout(); |
// $('#mwe_player_0')[0].$interface.css({'width': playerW, 'height':playerH}).find('#mwe_player_0')[0].updateLayout(); |
||
$("div.play-btn-large").click(); |
// $("div.play-btn-large").click(); |
||
$('#mwe_player_0').embedPlayer(function(){ |
|||
// play the video once ready: |
|||
$('#mwe_player_0')[0].play(); |
|||
}); |
|||
}); |
}); |
||
</script> |
</script> |
||
</html> |
</html> |
Revision as of 18:17, 10 December 2012