A couple quick questions:
is the success event a "normalized" event for both native and flash/silverlight shims? The documented examples suggest it is only for when Flash/Silverlight objects are ready. (success doesn't seem to fire on Android when Flash Player is installed and is either always active or on demand)
setMuted doesn't seem to work for Flash, if I add it to the success event it doesn't work, and it seems to cause any other code in the success function to fail silently. I also tried to setMuted before a play() which caused a javascript error.
Video is not muted:
success:function(mediaElement, domObject) { mediaElement.setMuted(true); }
Javascript e开发者_如何转开发rror "uncaught exception: Error in Actionscript. Use a try/catch block to find error.":
$('#btnMute').live('click', function(){ var video = getVideo('#player1'); if (video.muted) { video.setMuted(false); } else { video.setMuted(true); } return false; }); // ps: this helper function has typos in the official documentation function getVideo(selector) { var mePlayer = $(selector).mediaelementplayer(); var videoPlayer = mePlayer[0]; if (videoPlayer.player) { // player exists (is Flash), so set our variable to the player.media videoPlayer = videoPlayer.player.media; } return videoPlayer; }
Yes. I have seen the same issue. onsuccess does not fire for anything not html5 (silverlight,flash) - though it is supposed to.
精彩评论