Problem in jwplayer + chrome combination

2

Hello, I'm using jwplayer in a web application and am encountering a problem with chrome to execute the tool commands. The problem occurs when you click on the "play" a second time. When this happens, the component gives the play and then pause, causing the tool to malfunction.

In firefox the tool works as expected.

Follow the html excerpt

<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

    
asked by anonymous 21.10.2015 / 15:13

0 answers