Reputation: 21
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.
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
Upvotes: 2
Views: 1147
Reputation: 1005
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>
Upvotes: 4