Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Can playback be toggled if video is in an iframe?


I have a video that is displayed in an iframe. I know the function onclick='jwplayer().play() can be used to toggle playback of the video, but I cannot get the function to work on my page and I suspect it is because I have the video in an iframe.

Is there any way to get this function to work if the JWPlayer is in an iframe?

Thanks!

2 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

The API calls have to be in same page that the player is embedded on, not the parent frame, I believe.

jherrieven

User  
1 rated :

Depends...

Are both parent and iframe pages loaded from the same domain with the same protocol, or alternatively do you have the means to add JavaScript to both pages?

(I suspect the iframed page is hosted by someone else ;o)

James Herrieven

This question has received the maximum number of answers.