mediaelement.js

How to call a function on video end ? (HTML5 and mediaelementjs)

独自空忆成欢 提交于 2019-11-30 03:51:46
问题 i am using mediaelementjs for playing video on my website but i need to call some function at the END/pause of video.So please tell me how an i do this? Thanks in advance 回答1: You need to create a new EventListener for the ended and pause events. Example: YourMediaElement.addEventListener('ended', function(){ //Your Code goes here }); Update: This method should be applied on the success handler of creating the element, as is shown in the example on the bottom of the page at MediaElementJS.com

Mediaelement.js malfunction in IE, no flashback works

你离开我真会死。 提交于 2019-11-29 07:12:32
I used the mediaelement.js in my site, I used for the example a .mp4 file with H.264 codec, works well in all browsers, but it doesn't works in any version of Internet Explorer when I publish the site. On my localhost, it doesn't have any problems (the flash fallback works well), but in my server it doesn't works. The code I used is: <!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>VIDEO HTML5</title> <script type="text/javascript" src="player_files/jquery.js"></script> <script type="text/javascript" src="player_files/mediaelement-and

flash fallback video black screen - no video, only audio media element

五迷三道 提交于 2019-11-29 05:37:44
问题 I just downloaded mediaelement.js from http://mediaelementjs.com. Looks really good. Though in the demo files, the videos won't play in IE 8. The player is showing a black screen, but I can hear the audio. I have also tried installing on a server only to get the same problem. Can anyone enlighten me, any help would be much appreciated. 10 mins later... Cured, fixed, all good. See the answer below. 回答1: The problem was position:absolute on the css .me-plugin amazing I really hope this helps

How do I get mediaelement.js player state (paused, volume, etc.)?

心不动则不痛 提交于 2019-11-29 05:10:51
According to what is stated on mediaelement.js website it should be easy to get player state. But I cannot figure out how to do it. I'm creating player like this and trying to read properties (the player itself is working without problems). var player = new MediaElementPlayer('.player_1') player.play(); player.pause(); log(player.paused); log(player.volume); But this fails - both paused and volume are undefined . I'm using latest 2.8.2 version. jsfiddle example: http://jsfiddle.net/chodorowicz/wLu2v/3/ OK, John Dyer answered me on the Github support page: https://github.com/johndyer

HTML5 video won't play in Chrome only

不羁的心 提交于 2019-11-28 23:09:07
some background I've tested my video in FF and Safari (including iDevices) and it plays properly, but it will not play in the Chrome browser. As you can see in the code below, I've created mp4, m4v, webM, and ogv files, and I've tested all of them on my computer for any playback issues. the symptoms/issue In Chrome, the video seems to load, and there are no errors in the console log . When the play button is pressed, it loads a portion of the file, but then does not play it. Yet, interestingly, if I arbitrarily click on a later time in the time-bar, say about halfway through, it will play