Hello,

I would like to play videos in my GWT application, so I want to use
HTML5 player.

I don't know how integrate in my application. I put the video tag in a
HTML widget and javascript files in my main HTML page. But I can't
call javascript function in my gwt code. I see the player but nothing
happens because the communication between my HTML object and
javascript doesn't work.

I need some help.

Code onModuleLoad:

HTML video = new HTML("<video id='player1' width='350' height='240'
src='myvideo' autoplay='true' type=''   controls='controls' ></
video>");

HTML page :

<script type="text/javascript" language="javascript" src="jquery.js"></
script>
<script type="text/javascript" language="javascript"
src="mediaelement.min.js"></script>
<script type="text/javascript" language="javascript"
src="mediaelementplayer.min.js"></script>
<script type="text/javascript" language="javascript" src="mediaelement-
and-player.min.js"></script>
<script type="text/javascript" language="javascript" src="testjs.js"></
script>

In my testjs.js :

function displayPlayer()
{
        $('audio,video').mediaelementplayer({
                success: function(player, node) {
                        $('#' + node.id + '-mode').html('mode: ' + 
player.pluginType);
                        player.addEventListener('canplay', function()
{player.setCurrentTime(2); player.play();  } );
                }
        });
}

How can I call this function to play my video ?

Best.


-- 
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-web-toolkit?hl=en.

Reply via email to