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

loop doesn't work in chrome #65

Open
Offirmo opened this issue Mar 7, 2014 · 5 comments
Open

loop doesn't work in chrome #65

Offirmo opened this issue Mar 7, 2014 · 5 comments

Comments

@Offirmo
Copy link

Offirmo commented Mar 7, 2014

loop works well in firefox latest, but not in chrome latest. In chrome, the music is just played once.

var mySound = new buzz.sound( "music", {
    formats: [ "mp3", "ogg" ],
    preload: true,
    autoplay: false,
    loop: true
});

mySound
    .setVolume( 0 )
    .fadeTo(25, 15000)
    .loop()
    .bind( "timeupdate", function() {
        var timer = buzz.toTimer( this.getTime() );
        document.getElementById( "timer" ).innerHTML = timer;
    });
@Offirmo
Copy link
Author

Offirmo commented Mar 7, 2014

BTW superb lib with nice documentation !

@Monk-Data
Copy link

This seems to be an issue with Chrome itself, not the library. Once I load an mp3 and issue a play() on it, it will not play again unless I issue another load() call, which downloads the sound file again. In Chrome, drop to the console and issue the following, to see the issue in (in-)action (image attached). I also tried with a .wav file to see if there was any difference, but got the same results. Running latest Chrome 37.0.2062.124 on Win 7.

2014-10-05_085839 chrome audio element

@Monk-Data
Copy link

Confirmed -- this is how Chrome works; you need to load() the sound again or it will only play once. Check this link out - http://stackoverflow.com/questions/8733330/why-cant-i-play-sounds-more-than-once-using-html5-audio-tag

@jaysalvat
Copy link
Owner

Thanks you @MonkeyData for those investigations.
I will try to find time to check it.

Thanks again.

@Qaaj
Copy link

Qaaj commented Feb 6, 2015

any update on this? workarounds?

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

4 participants