Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.isPlaying() is false while video actually playing #8

Open
robertofraile opened this issue Sep 13, 2011 · 2 comments
Open

.isPlaying() is false while video actually playing #8

robertofraile opened this issue Sep 13, 2011 · 2 comments

Comments

@robertofraile
Copy link

.isPlaying() is false while the video is actually playing, if the video has previously reached the end.

A workaround is to save the value of .isPlaying() before calling .currentTime(n) and restore it afterwards using either .play() or .pause().

The following html/javascript page requires jquery and jme 1.3.4, plays the video automatically, and reports the issue in the browser console in Firefox 6.0.2 running on Ubuntu.

<script src="jquery-1.6.2.min.js" type="text/javascript"></script>
<script src="jme/mm.full.js"></script>
<video src="http://www.protofunc.com/jme/media/bbb_trailer_400p.ogg" controls autoplay="autoplay"></video>
<script>
    $(document).ready(function(){
    $("video").jmeEmbed().jmeReady(function() {
        $("video").
        currentTime(30).
        bind("timeupdate", function(){
            $("span").text($("video").isPlaying());
        }).
        bind("ended", function(){
            $("video").currentTime(10);
            $("video").bind("timechange", function(event, data){
            console.log("The video is playing (second "+ data.time +") but isPlaying() returns "+ $("video").isPlaying());
            });
        });
    });
    });
</script>
@aFarkas
Copy link
Owner

aFarkas commented Sep 13, 2011

Hi,

I can confirm this bug. JME implements the "probably playing" algorythm defined by the HTML specification. If you also add:

console.log(this.paused)

You will see, that FF6 has an error here and reports, that the video is in paused state. This is an FF bug. Could you please fill a bug in mozilla bugtracker?

I will write a workaround to get this fixed, until then additionally use the play method to show FF, that he is not in paused state.

@aFarkas
Copy link
Owner

aFarkas commented Sep 16, 2011

I only want to let you know, that I will work next week on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants