English 中文(简体)
MediaElement.js jquery bug
原标题:

I have an gwt application and I use MediaElement.js to show multimedia contents. If I put on the main page this script

<script> // using jQuery   
    $( video,audio ).mediaelementplayer();
</script>

to convert and tags in MediaElement.js and it doesn t work.

  1. First because this script convert only one tag or in MediaElement.js
  2. Second this tag must be before the script. If it is after it doesn t work.

So my problem is that I have more than one tag and this tags are created runtime so they will be after the script. I think that the correct work of the script should be: Convert all and tags within the page and not the only one before the script.

Thanks

问题回答

If you can t move the script until after the tags, then you should either do

<script>
jQuery(document).ready(function($) {
    $( video ).mediaelementplayer();
});
</script>

or

<script>
// your code
gwtCode();
$( video ).mediaelementplayer();    
</script>




相关问题
MediaElement.js jquery bug

I have an gwt application and I use MediaElement.js to show multimedia contents. If I put on the main page this script <script> // using jQuery $( video,audio ).mediaelementplayer(); <...

FancyBox + MediaElement player + IE

Trying to incorporate the mediaelement.js player into a lightbox (fancybox.net). Player works in IE without FancyBox. FancyBox works in IE with regular text content. But The player + fancybox ...

Still trying to stop video from rewinding in mediaelement.js

I am still having problems with the code not stopping the video from rewinding to the beginning. The code that John posted doesn t seem to be working for me. He said: I believe that the default ...

Continuous play for Mediaelement.js

I have a music blog (http://www.lowerfrequencies.com/) in which I have and embed Mediaelement.js audio file in every post. It works great and I have no complaints. However, I would like it if I could ...

Mediaelement.js javascript error in IE

I m using MediaElement.js as my HTML5 video player for a site in progress. It works fine in Chrome, Safari, and Firefox, even with the fallback player, but in Internet Explorer I get the Javascript ...

热门标签