Answer the question
In order to leave comments, you need to log in
How to stop background audio when playing video or audio in components?
There is a template in app vue that has a router-view for rendering other pages and there is an audio in the header, it needs to be stopped if another audio or video is played on the site. How to dynamically stop audio in menu if video or audio is playing?
Answer the question
In order to leave comments, you need to log in
Subscribe to the playing event, for example. (or choose the one that suits you best)
something like this:
document.addEventListener('playing', stopBackgroundAudio)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question