Question

Background

I built a site for a film-production client. They needed a way to demo their showreels to the public and agreed upon a modal <iframe> approach (using jQuery and Fancybox) to showing their reels, all streamed via a third party provider.

You can see the functionality in action here: http://groundglass.co.za/directors/ by clicking on "View Reel" underneath each director photo.

The Bug

Try the following:

  1. Click 'View Reel'
  2. Wait for the video to start playing and then immediately:
  3. Close the modal window

At this point, other browsers unload the playing movie, but for some reason Safari carries on playing the video (You can hear the video playing, even if not visible).

Solution?

What can I do to get Safari to play nice? Fancybox has a callback function onClose. What should I do to the iframe to make it unload? Trying .remove() doesn't work, one can still hear the audio playing (and could be streaming too - what a waste of bandwidth!)

Thoughts? - Thanks!

--nd

Was it helpful?

Solution

Change the location of the iframe to a blank page when the dialog is closed.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top