WP YouTube Live
Displays the current YouTube live video from a specified channel via the shortcode [youtube_live] . Setup Notes Your YouTube livestream must be set to “Public” or it will not work. This is a security feature of YouTube’s API and unfortunately there’s no way to work around it. In addition, your live
Displays the current YouTube live video from a specified channel via the shortcode [youtube_live] .
Setup Notes
Your YouTube livestream must be set to “Public” or it will not work. This is a security feature of YouTube’s API and unfortunately there’s no way to work around it.
In addition, your live stream must be set to allow embedding on third-party sites. If that feature is unavailable, you may need to enable monetization for your account. See YouTube documentation for more information or help with allowing embedding.
How It Works
If no live video is available, you can display a specified video or a “channel player” showing all your recent videos.
You can also enable auto-refresh to automatically check for a live video every 30 seconds (warning: will increase server load, so use with caution).
By default, the server will check YouTube’s API and then cache that response for 15 minutes before checking the API again (you may change this value in the admin settings). If auto-refresh is enabled, clients will check against your server every 30 seconds and likely will hit that cache as well, so it can potentially take up to 16 minutes before a client will get a live video.
The length of both caches can be changed using the wp_youtube_live_transient_timeout filter (see below for more information).
If no live video is available when a page is loaded, several fallback options are available:
- “Show a custom HTML message” allows you to specify a custom message to show
- “Show scheduled live videos” will show a player and countdown until your next live video
- “Show last completed live video” will show your most recently-completed live video
- “Show recent videos from my channel” will show a playlist of recent videos from your channel
- “Show a specified playlist” will show a specified playlist
- “Show a specified video” will show a specified video
- “Show nothing at all” will show nothing at all
When a video ends, users’ browsers will check your server again to see if a live video is available. If so, it will load that; if not, it will fall back as set in your options.