Stopping Audio on Popup

Scenario: You click on a popup and it opens and audio starts to play. You click to the next page without closing the popup, and the new audio plays on top of the popup audio. Is there a way to stop the popup audio upon clicking to the next page?

undefined

Discussion (8)

I suppose the easiest way would be to put an action on the next page that says to stop and hide the audio from the pop up. But I am sure there is a better way?

If you post a sample I'm sure someone will provide options.

Thanks, Darrel. I've attached a sample. I appreciate any feedback.

Tina

I would advise not using pop-up windows at all. I never use them now and instead just group some initially-hidden and 'always on top' objects on the page (i.e. at least a text box, a semi-transparent background shape to mask the standard content, and a close button to hide the group) and trigger this to be shown at whatever point you would show your pop-up window. This approach avoids a lot of issues that can arise when using popups.

An important one against Popups i just found here:

Google announced an update that will penalise sites using pop ups on mobile.

So if your project is responsive.... the Google score for mobile devices will be lower then without popups!

The article about that is here:

https://www.vertical-leap.uk/blog/pros-cons-of-pop-ups/

Have to agree with mallow76, popups in fact are seen as quite the evil-doers in a lot of UI/UX concerns.

The developers/designers i work with i do urge mostly NOT to use popups. In most cases you can work around them by using a seperate group to hide/show.

If you want to check out the pros and cons of popups, there are quite a few threads to find about this on the web.

Just a sample:

https://www.atlanticwebworks.com/blog/the-pros-and-cons-of-using-pop-ups/

I meant can you post the lesson. I understand what is happening.

  1. You could use a "Lightbox"-Popup instead of a real popup. This way the popup is on the same page and will be gone when the user goes to the next page.
  2. As it's "just" an audio for the feedback popup you could play the audio on the main page instead of the popup, so it will be controllable from the main page. It should make no real difference for the user.
  3. If 1. and 2. (or mallow76s advice which is good) are no options you can use javascript to control the audio in the popup

Discussions have been disabled for this post