Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter BJBeacon

    (@bjbeacon)

    Greetings Andrew,

    Thanks for the programming advice and speedy turnaround time on my last support request.

    I have now been doing rather extensive testing with the plugin with excellent results. However, I’ve run into another issue regarding the fallback_behavior once the video stream ends in that the iFrame window stays open on the page. I expected (incorrectly?) that the browser would recheck for the stream, and finding none, the iFrame would clear. That does not happen.

    In checking wp-youtube-live.js, I see that there is no code to change the state of the now dead stream back to the original pre live stream state.

    Here’s my page and code:

    Live Stream page

    [youtube_live auto_refresh=”true” autoplay=”true” js_only=
    “true” fallback_behavior=”no_message”]

    This works excellently (other than a large time lag anywhere from 90 to 300 seconds.)

    Once the live video finishes. The iFrame stays on the page and does not refresh/revert to the original state.

    Can you suggest code to make the iFrame close and return to the original page as seen at the above link?

    Thank you!

    Thread Starter BJBeacon

    (@bjbeacon)

    Ok, So I found the event listener code:

    However I’m not sure where to use this. In the functions.php file?

    window.addEventListener(‘wpYouTubeLiveStarted’, function() {
    /* your code here */
    console.log(‘stream started’);
    /* your code here */
    });

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)