-
-
Save ashishnigam/2a36db8d8b5776c60084739227ce82f6 to your computer and use it in GitHub Desktop.
MediaElement.js with autoplay
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
| AddType video/ogg .ogv | |
| AddType video/mp4 .mp4 | |
| AddType video/webm .webm |
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
| SOURCE: | |
| http://mediaelementjs.com/ |
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
| <video id="player1" width="940" height="528" poster="video/01.jpg" preload="none"> | |
| <source type="video/mp4" src="video/01.mp4"> | |
| <source type="video/webm" src="video/01.webm"> | |
| <object width="940" height="528" type="application/x-shockwave-flash" data="js/ext/videoplayer/flashmediaelement.swf"> | |
| <param name="movie" value="js/ext/videoplayer/flashmediaelement.swf"> | |
| <param name="flashvars" value="controls=true&file=video/01.mp4"> | |
| <img src="video/01.jpg" width="940" height="528" title="Kein kompatibles Video vorhanden"> | |
| </object> | |
| </video> |
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
| // Video Player mit MediaElementjs | |
| var player1; | |
| if($('#player1').length > 0){ | |
| if($.browser.msie) { | |
| $('#player1').attr('autoplay', 'true'); | |
| } | |
| player1 = new MediaElementPlayer('#player1', { | |
| features: [], | |
| loop: true, | |
| startVolume: 0.0 | |
| }); | |
| if(!$.browser.msie) { | |
| player1.play(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment