mediaelement.js

Webm support in mediaelement.js with fancybox

点点圈 提交于 2019-12-25 01:45:43
问题 I'm trying to make the wonderfull mediaelement/fancyvideo work with a webm support (because the flash fallback is choppy with MacOs Firefox) : - if there's a webm file, it's played. - if not, mediaelement uses it's flash fallback. For now, I've tried to set this.content = "<video id='video_player' poster='" + _videoPoster + "' width='" + _videoWidth + "' height='" + _videoHeight + "' controls='controls' > <source type='video/mp4' src='" + _videoHref + ".mp4'/> <source type='video/webm' src='"

unable to auto-play with mediaelement js in chrome

只谈情不闲聊 提交于 2019-12-24 12:12:22
问题 I am trying to autoplay audio from a live stream audio link: http://163.172.165.94:8728/;stream.mp3 I tried adding autoplay , and by doing: $('#player2').mediaelementplayer({ autoplay: true }); nothing work, tried every single answer from stack overflow. Can someone help me? What am I doing wrong? <link rel="stylesheet" href="https://cdn.jsdelivr.net/mediaelement/latest/mediaelementplayer.css"> <div class="media-wrapper"> <audio id="player2" preload="auto" autoplay style="max-width:100%;">

Make MediaElement same as HTML5 video

穿精又带淫゛_ 提交于 2019-12-24 00:39:57
问题 As is shown here: How do I get mediaelement.js player state (paused, volume, etc.)? you can access MediaElement attributes by simply adding 'media' to the instance and then you can get the api described here:http://mediaelementjs.com/#api. But how do I make it so that the 'media' wont be necessary, making the MediaElement api exactly(almost) the same as that of the html5 video? 回答1: You can access API methods (as HTML5 video) but not properties or events , which still need to refer to the

MediaElement.js stop all players

笑着哭i 提交于 2019-12-23 12:37:55
问题 I've been playing around with MediaElement.js for a while now and have a new application that uses 20 players on a single page. I'd like to be able to have the songs stop when another one is played - and not to overlap the tracks when they are playing. I can't seem to find an easy way to hack this - perhaps someone knows of a way? Thanks. 回答1: In jQuery, you could do $('video,audio').each(function() { $(this)[0].pause(); }); Let me know if that works. 回答2: A quick and dirty one ;) $(".mejs

Is mediaelement.js compatible with Phonegap?

六眼飞鱼酱① 提交于 2019-12-23 07:13:33
问题 I am building a phonegap application where i need to use video and audio streaming feature, i found that mediaelementjs seems more suitable for cross platform video and audio feature. I created one demo and its working fine on iOS & Android browsers, but when i prepared phonegap build its not playing video or audio on android device. Is mediaelement.js compatible with phonegap?if no then is there any other video\audio player plugin available which can use with phonegap, instead of using

mediaelement.js: Local Flash playback shows black video with sound unless shown full screen

末鹿安然 提交于 2019-12-21 22:33:03
问题 When using mediaelement.js for playback from a webserver, everything works as it should. If I try running from my local hard disk, in HTML 5 the video plays fine, however, when the flash player is used the audio plays but the video is black. If I select full screen, the video plays. This occurs even with the Demo players that are included as part of the download. Does anyone know if there is a fix for this? 回答1: After some experimenting I was able to resolve my own question. I added an

How can i get HTML5 audio playlist with mediaelement.js ?

醉酒当歌 提交于 2019-12-21 04:56:14
问题 I tried to search the example of audio playlist in mediaelement.js. But i found none, is mediaelement.js supports audio playlist? If so, please kindly support me the sample code or links. Thank you very much. 回答1: I managed to get a super basic (read: hacky) demo of a playlist working in a WordPress theme I’ve got going. All you have to do is setup multiple media elements using a set of IDs, a class or in this case the <audio> tag. Then you can use JS to see when a player has ended (stopped

MediaElement.js Change source of video onclick

余生长醉 提交于 2019-12-20 12:08:28
问题 In the MediaElement.js I am trying to make a "multi" video player. More or less I am going to have thumbnails change out the source of the video based on what one the user clicks on. I have successfully done it for the HTML5 source using <img src="http://mydomain.com/mysouceimage.jpg" style="width:100px; height:75px;" onclick="document.getElementsByTagName('video')[0].src = '/media/build/BTBW.m4v';" /> <img src="http://mydomain.com/mysouceimage-2.jpg" style="width:100px; height:75px;" onclick

mediaelement.js and custom playlist

大憨熊 提交于 2019-12-20 08:56:16
问题 I have such code (for example): <script> $('audio').mediaelementplayer(); </script> <audio id="mejs" controls="controls"> <source src="/media/file-2.mp3" type="audio/mp3" /> </audio> <ul class="mejs-list"> <li>/media/file-1.mp3</li> <li class="current">/media/file-2.mp3</li> <li>/media/file-3.mp3</li> </ul> I need to play audio files from the list by queue (one after another). How can I change the source of the audio for the next file from the list after finishing playing current file and

mediaelement.js and custom playlist

放肆的年华 提交于 2019-12-20 08:55:09
问题 I have such code (for example): <script> $('audio').mediaelementplayer(); </script> <audio id="mejs" controls="controls"> <source src="/media/file-2.mp3" type="audio/mp3" /> </audio> <ul class="mejs-list"> <li>/media/file-1.mp3</li> <li class="current">/media/file-2.mp3</li> <li>/media/file-3.mp3</li> </ul> I need to play audio files from the list by queue (one after another). How can I change the source of the audio for the next file from the list after finishing playing current file and