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

Pausing Video in iFrame

I'm using a service that embeds a live stream into a web page for a church. The page in question is here

If you let the page load the stream starts. However there is a button below that toggles out the live video and goes to live audio. When you do that it is just hiding the div with the video in it. The video just keeps playing. I would love to in addition to hiding the video for it to pause the JW player. The JW player is on a separate domain so I can't exactly add any javascript to the page or target the JW player within the iFrame to make it pause. Any thoughts about how to accomplish this??

I can do something like this to reload the src of the iFrame to make it not autostart...

var newsource = $("iframe", '.livestream').attr("src") + "&autostart=no";
$("iframe", '.livestream').attr("src", newsource);

But it is a kind of messy solution and causes unnecessary load on the server.

Any thoughts or help would be much appreciated. Thanks.

1 Community Answers


JW Player Support Agent  
0 rated :

Hello Patrick,

You could choose not to use the iFrame and instead have the embed code on the page this way you can call the jwplayer() API

This question has received the maximum number of answers.