-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Comments
Same problem here. Can someone work on |
The global |
|
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. |
So, is Howler.stop() available or not? |
@bootleg-icarus I have seen v2.2.0 include this feature released 4 days ago 🤣 |
Howler.stop() is not found in "@types/howler": "^2.2.0" |
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. 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();
} |
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
The text was updated successfully, but these errors were encountered: