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

I can't stop all sounds in one web page #1308

Closed
jkiss opened this issue Mar 28, 2020 · 8 comments
Closed

I can't stop all sounds in one web page #1308

jkiss opened this issue Mar 28, 2020 · 8 comments
Labels

Comments

@jkiss
Copy link

jkiss commented Mar 28, 2020

I init some sounds in one web page, I want other sounds will stop when I playing the one, BUT I can't find a global method to do it

@abrehamgezahegn
Copy link

Same problem here. Can someone work on Howler.stop() and Howler.pause() please?

@goldfire
Copy link
Owner

The global Howler methods are still working in my testing. Can you provide a sample of where they aren't working?

@abrehamgezahegn
Copy link

Howler.stop(), seems like there is no such method. And thanks for the quick response.

@goldfire
Copy link
Owner

goldfire commented Apr 3, 2020

Sorry, I misunderstood what you were asking. These would be easy to add, though the only thing to keep in mind is that I'm not sure there would be a way to add a global play/resume method if you stop/pause globally.

@bootleg-icarus
Copy link

So, is Howler.stop() available or not?
the docs say it is but I cant find it, is it in development at the moment?

@jkiss
Copy link
Author

jkiss commented May 21, 2020

@bootleg-icarus I have seen v2.2.0 include this feature released 4 days ago 🤣

@gtolarc
Copy link

gtolarc commented Jun 18, 2020

Howler.stop() is not found in "@types/howler": "^2.2.0"

@JPilson
Copy link

JPilson commented Jul 23, 2020

I have updated to version 2.2.0 but still the same behavior "player.stop();" It does not stop the loading process so I'm still having 2 songs playing.
I'm using howler for My streaming Web App

playSong(){
player = data.howl = new Howl({
          src:[data.url],
          html5:true,
          autoUnlock:true,
          onplay:()=>{
          this.isPlaying = true;
            this.isBufferingSong =false;
            this.setMediaSessionData();
            this.setSongDuration( parseInt(this.currentSong.howl.duration))
          },
          onload:()=>{
            window.audio = player;
            window.commit('setAudioLoaded', { loaded: true })
          },);
     } 
 player.play();
}

nextSong:function(){
      let playListSize = this.playableList.length-1;
      if( this.currentSongIndex < playListSize){
        let player = this.currentSong.howl;
        if (player) player.stop(); // This is where the Audio should be stoped 
        this.isPlaying =false;
        this.currentSongIndex++;
        this.playSong();
}

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

No branches or pull requests

6 participants