开发者

mediaelement.js with GWT

开发者 https://www.devze.com 2023-04-08 21:16 出处:网络
I have a problem for integrate mediaelement in my GWT Integration. You know in GWT application you have only one HTML page and I need in DialogBox to integrate a video player, video works good but I

I have a problem for integrate mediaelement in my GWT Integration.

You know in GWT application you have only one HTML page and I need in DialogBox to integrate a video player, video works good but I don't have controls like fullscreen, duration time. That seems that javascript function doesn't work. I use a HTML widget for integrate video tag.

Code :

HTML myHTML = new HTML("<body onload='displayPlayer()'>"+
           "<video width='640' height='360' src='vp8.webm' type='video/webm' "+
           "id='player1' "+
        "controls='controls' preload='none'></video>"+                  
        "<span id='player1-mode'></span>"+
        "</body>");

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

I added scripts and CSS in my HTML 开发者_C百科page

<script type="text/javascript" language="javascript" src="displayplayer.js"></script>
<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>

Do you any ideas ?

thanks.

0

精彩评论

暂无评论...
验证码 换一张
取 消