Problem in jwplayer + Chrome combination

Asked

Viewed 163 times

2

Hello, I am using jwplayer in a web application and am finding a problem with Chrome to execute the commands of the tool. The problem occurs when it is clicked on "play" for the second time. When this happens, the component gives the play and then goes into pause, causing the tool malfunction.

In firefox the tool works as expected.

Follow the html snippet

<h:form id="panel">
...
<h:form id="veiculacoes">
...
<h:commandLink action="#{veiculacao.colocarPlayTrue}"
    onclick="listenRadio('#{veiculacao.url}', #{veiculacao.tempoRelativo});">
    <i class="fa fa-play"></i>
    <f:ajax render=":panel:veiculacoes"></f:ajax>
</h:commandLink>
<h:commandLink action="#{veiculacao.colocarPlayFalse}">
    <i class="fa fa-stop"></i>
    <f:ajax render=":panel:veiculacoes :form-rc"></f:ajax>
</h:commandLink>
...
<div id="myElement"></div>
...
</h:form>
...
</h:form>

And Javascript

function stopjwplayer() {
   jwplayer("myElement").stop();
}

function listenRadio(url, seekpoint) {
    if (jwplayer("myElement").getState() == "PLAYING"
            || jwplayer("myElement").getState() == "BUFFERING"
            || jwplayer("myElement").getState() == "PAUSED") {
        jwplayer("myElement").remove();
    }
    jwplayer("myElement").setup({
        'file' : url,
        'height' : 0,
        'width' : '100%',
    });
    jwplayer("myElement").seek((seekpoint - 1) * 60);
    jwplayer().play(true);
    currentUrl = url;

jwplayer().onDisplayClick(function() { jwplayer().play(true); }); }

I hope someone can help.

Thank you

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.