简体   繁体   中英

jQuery audio loop with excess pause (Buzz plugin)

I use Buzz plugin for plaing audio on my page. I used loop function and add some samples for it Buzz audio plugin . Every thing works fine: loop work and sample sounds, but I have a little pause beetwen repeating each sounds (samples was cuted without any peaces of silents).

How can I controll loop speed of "buzz" plugin, and delete pause beetwen repeating? Beetwen all samples have differents duration

this.loop = function() {
            if (!supported) {
                return this;
            }
            this.sound.loop = "loop";
            this.bind("ended.buzzloop", function() {
                this.currentTime = 0;
                this.play();
            });
            return this;
        };

It's buzz plugin loop function

It appears that the problem isn't with Buzz.js, but with mp3 audio . Try using a different format (such as Ogg Vorbis).

UPDATE So, even after I switched to ogg vorbis, I'm still getting the gap between loops . It's starting to seem like an issue with Buzz.js.

SC.get('/resolve', { url: mySound.track_url }, function(res, err) {
  mySound.track = new buzz.sound(res.stream_url+'?client_id='+mySound.client_id);
  mySound.track.bindOnce('canplay', function(e){
    mySound.track.loop().play();
    console.log('ready');
  });
});

I think I'll end up trying the alternating-between-two-tracks approach.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM