...and showing nothing than开发者_如何转开发 the movie itself? This should work with *.mp4, *.ogv *webm and the flash fallback
Any help appreciated!
I don't know what language you are using. But here is an article that explains tags converning videos. Search for "autostart"
http://www.tizag.com/htmlT/htmlvideocodes.php
Here is the javascript code to start the movie automatically:
var settings = {};
settings.success = function( mediaElement, domObject ) {
// if using the Flash player, we need to listen to the `canplay` event
if (mediaElement.pluginType == 'flash') {
mediaElement.addEventListener('canplay', function() {
// Player is ready
mediaElement.play();
}, false);
} else {
// call the play method
mediaElement.play();
}
};
// the controls, we don't want any of them
settings.features = [];
$( 'video' ).mediaelementplayer( settings );
And here is the CSS code to hide the play icon in the center of the movie window:
.mejs-overlay-button {
display: none;
}
精彩评论