views:

106

answers:

2

I have a web site that opens iframe for video on page, page uses ajax to pull in videos from selected menu. As expected and understood, on iPod touch after selecting video it shows a play button, which brings up video in another screen. However, when the video completes, it returns browser to page prior to one where video was played from. Sequence:

  • open Page1
  • go to Page2 which offers videos to play, in iframe
  • play video
  • video completes, returns to Page1, not Page2!!

Only happens on iPod touch, so must be issue with how control is returned on video completion.

Any suggestions? If this is not a known problem, I can work up example (currently, need account on site).

A: 

Of course, because the browser returns the URL of the page that was displayed before the video was played back. It won't remember the URL of the IFRAME, that had already changed in the process of selecting a video, if I don't get you wrong.

That's a common problem with frames/iframes and one reason why you shouldn't use them.

The solution could be to place your video selection menu in your actual page and not in an IFRAME. This could be achieved by loading in into a DIV via Ajax for example.

Techpriester
Thanks for responding so quickly. I'm still not sure how iTouch/Safari was getting confused. The deal was when the video was done in the iframe, the page that CONTAINED the iframe itself was getting replaced. Not sure why this app used iframes here - may be issue with flashplayer generally used for non-mobile users.
dave cohen
A: 

Figured this out, sort of. Got it to go back to the right place, but I do believe that it is easy to confuse the iTouch quicktime player and Safari about where to return to.

dave cohen
Could you post what you figured out to make it work?
David Thomas