MediaElement.js jquery bug
I have an gwt application and I use MediaElement.js to show multimedia contents. If I put on the main p开发者_JAVA技巧age this script
<script> // using jQuery
$('video,audio').mediaelementplayer();
</script>
to convert and tags in MediaElement.js and it doesn't work.
- First because this script convert only one tag or in MediaElement.js
- 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>
精彩评论