• Resolved timmydjr

    (@timmydjr)


    I have installed the YouTube Live plugin. You can view it on this page:

    http://northpointchristian.tv/index.php/sample-page/

    Our YouTube channel is:
    https://www.youtube.com/channel/UCKyx8VpHcjhfev_84iFsDFw

    I set the option for refreshing every 30 seconds but I am 3 minutes into being LIVE and the page has not loaded the LIVE video feed.

    Clicking on the “CHECK AGAIN” button did nothing.

    But when I manually refreshed the page it loaded the LIVE video.

    Any ideas why this may be? I am going to make an “Intro Video” that will play while we are NOT live. It would be great if we had the option to play that Video on a loop 🙂

    Then as soon as the YouTube LIVE Plugin detects a live feed it could just switch to the LIVE video feed.

    Any help with this will be appreciated.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter timmydjr

    (@timmydjr)

    I started a stream and left it LIVE for probably 15-20 minutes (I had to manually refresh the webpage for the viewer to become visible). After I stopped the LIVE stream the player that is displayed on the webpage will keep replaying the last 20 seconds of LIVE video that was streamed. It will then show the “Grey YouTube Screen” for about 1 second with Message, LIVE VIDEO OFFLINE. That will display for 1-2 seconds and then it will go back to playing the last 20 seconds of the LIVE video feed. This has continued for 10+ minutes and still going. So my question is this:
    1. At what point should the player go back to hidden state (not viewable in browser)?

    I have added the following code to the wp-youtube-live/wp-youtube-live.php

    add_filter( ‘wp_youtube_live_no_stream_available’, ‘my_ytl_custom_message’ );
    function my_ytl_custom_message( $message ) {
    $message = ‘<p>Please check below for the scheduled event times to be broadcasted LIVE on NorthpointChristian.TV. You may also subscribe to our YouTube channel to get notifications when we are LIVE. Subscribe today so that you never miss any of the action! Thanks again for support the Northpoint Christian Sports Network. <p>Subscribe to NCSN YouTube Channel.</p>
    <p><button type=”button” class=”button” id=”check-again”>Check again</button><span class=”spinner” style=”display:none;”></span></p>’;
    return $message;
    }

    add_filter( ‘wp_youtube_live_transient_timeout’, ‘my_ytl_custom_timeout’ );
    function my_ytl_custom_timeout( $message ) {
    return ’15’;
    }

    Plugin Author macbookandrew

    (@macbookandrew)

    Question 1 (check again vs. refreshing the page): chances are that the multiple caches were still in effect (more info here about the levels of caching).

    Question 2 (introductory video): For the intro video, you can copy the embed code from YouTube and add the loop=1 parameter. For example:

    <iframe width="1280" height="720" src="https://www.youtube.com/embed/EDyRZmU62MQ?autoplay=1&loop=1" frameborder="0" allowfullscreen></iframe>

    Question 3 (end of video): currently, this plugin does not detect when a live video has finished, since I assumed that most people would simply close the page when the video is over. I may add that feature at some point.

    • This reply was modified 6 years, 8 months ago by macbookandrew. Reason: code formatting
    Thread Starter timmydjr

    (@timmydjr)

    Thanks Andrew! I found out that for the video loop to work you must also include &playlist=VIDEO_ID at the end 🙂

    <iframe width=”1280″ height=”720″ src=”https://www.youtube.com/embed/EDyRZmU62MQ?autoplay=1&loop=1&playlist=EDyRZmU62MQ&#8221; frameborder=”0″ allowfullscreen></iframe>

    I will test again on the auto loading when the Video Stream goes LIVE.

    Thread Starter timmydjr

    (@timmydjr)

    Andrew,
    I am testing the LIVE Stream refreshing and it is still not working. Prior to testing this I clicked on CASHING > PURGE ALL in WordPress. The live stream is embeded here:
    http://northpointchristian.tv/index.php/sample-page/

    But after 7 minutes it has never refreshed to show the LIVE stream. It is showing the message that I edited in the PHP file and the embeded looping video. But it has yet to refresh and show the LIVE video.

    Any ideas on what I should check to fix this?

    —————————————————

    2. I can click on “Check Again” and it will then populate the LIVE video feed. However it still leaves the text and embedded video from this code:

    add_filter( ‘wp_youtube_live_no_stream_available’, ‘my_ytl_custom_message’ );
    function my_ytl_custom_message( $message ) {
    $message = ‘<p>Please check below for the scheduled event times to be broadcasted LIVE on NorthpointChristian.TV. You may also subscribe to our YouTube channel to get notifications when we are LIVE. Subscribe today so that you never miss any of the action! Thanks again for support the Northpoint Christian Sports Network. <p>Subscribe to NCSN YouTube Channel.</p>
    <iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/%5BVIDEO_ID%5Dautoplay=1&loop=1&playlist=%5BVIDEO_ID%5D&#8221; frameborder=”0″ allowfullscreen></iframe><p>
    <p><button type=”button” class=”button” id=”check-again”>Check again</button><span class=”spinner” style=”display:none;”></span></p>’;
    return $message;
    }

    • This reply was modified 6 years, 8 months ago by timmydjr.
    Plugin Author macbookandrew

    (@macbookandrew)

    @timmydjr Sorry about the delayed response. Is this still happening? I just released a major update that should fix this.

    Rather than including your message in a filter, you can now add it directly in the WP dashboard.

    Plugin Author macbookandrew

    (@macbookandrew)

    @timmydjr Any update on this?

    Plugin Author macbookandrew

    (@macbookandrew)

    Closing due to inactivity

    Thread Starter timmydjr

    (@timmydjr)

    I will check it out but I am sure it is fine. I just now saw your messsage regarding the updates. Sorry about that.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘YouTube LIVE not refreshing when YouTube LIVE is LIVE’ is closed to new replies.