List of topics covered in this documentation:
- Configuration
- Inserting a new Youtube video
- Automatic Subtitles
- Connecting with the Google Developer Console
- Importing a whole playlist from YouTube
- Importing a live stream from YouTube
- Notes
Since it’s launch in 2005, YouTube is the second most visited website (right after Google Search) on the whole internet, and by far the most popular video hosting platform. With more than 500 hours of video being uploaded every minute, YouTube has already changed the way a whole generation of people consume video content, making the long-reigning monarch of entertainment – the television – obsolete and unnecessary.
Our FV Player works very well with YouTube and posting videos directly from the site is very easy. You get most of the advanced functions, such as fully customizable skin with your own branding, playlists and more even in the free version of FV Player. However, embedding whole YouTube playlists (ones that were created on YouTube) or channels remain to be accessible only to the users of FV Player Pro.
Configuration
FV Player YouTube settings are located in wp-admin -> FV Player -> Settings -> Hosting -> YouTube. You can pick the user interface, opt for use of YouTube Cookies and enter the Google Developer Key.
We strongly recommend using the Google Developer Key as is lets FV Player fetch the YouTube video splash screen, video title, video aspect ratio (required for proper display of vertical videos) and duration.
Inserting a New YouTube Video
Simply open the shortcode editor and copy the link of a desired YouTube video and insert it into the Video Link field.
FV Player will download the video splash screen, duration and dimensions automatically. Please note that Google Developer Key is required, otherwisie the video splash screen will be linked from YouTube servers.
The video is takes from Toronto Vacation Travel Guide by Expedia.
Toronto Vacation Travel Guide | Expedia
Note: FV Player Pro users can insert YouTube videos with a custom start time, which can be easily set right under the video itself. More info on how to do it can be found in this guide: How to Use Custom Start/End Time
Automatic Subtitles
You can use your own subtitles in VTT format with your YouTube video (you can check demos in here and see how to use them in the guide How to Create Subtitles), or you can let FV Player load the subtitles from the YouTube video directly if they’re available. This feature is completely automatic and doesn’t require any further settings.
For example, this YouTube video features subtitles in multiple languages, that are all loaded and can be selected the same way as manually uploaded subtitles. You can see how it works in the demo below.
YouTube Captions and Subtitles
Note: Automatic loading of subtitles doesn’t work with YouTube’s auto-generated subtitles. These can, however, be quickly converted to a VTT file, check this article on how to do that – The Ups and Downs of Using YouTube’s Auto-captions.
Connecting with the Google Developer Console
We recommend inserting a Google Developer Key into your account. There are three benefits:
- reliable import of splash screens from YouTube
- video duration parsing
- video aspect ratio stored (required for proper display of vertical videos)
1. To do this, go to Settings > FV Player Pro > Hosting > YouTube and fill in your Google Developer Key. If you don’t know where to get it, follow our simple guide below.
Putting in the Google Developer Key
2. Click this Google Developers Console link. Login, then click on Create Project in the top menu.
3. You’re starting a new project, so give it a name first, and then optionally, also change the ID. Confirm by clicking Create.
Creating a project in Google Developer Console
4. Make sure YouTube Data API for the project is enabled. To enable the API, you have to choose the project and then select API’s & Services in the left toolbar.
Enabling YouTube Data API
Then go to Library in the left menu, and select YouTube Data API v3. Then click on the Enable button.
7. You’ll get a message like this one, that says you need to create credentials first. Click on the Create credentials button on the right.
8. You can skip the first step called Add credentials to your project and go directly to creating an API key by clicking on the API key link.
9. Now name your API key and leave the Key Restriction as unrestricted (the None option).
API Key name and restrictions
10. After clicking on the Create button, you will be able to see the actual key. You can now paste it into FV Player’s settings (step 1.).
Importing a whole playlist from YouTube
Do you have a whole playlist of videos on YouTube that you would like to share? You don’t have to import them one by one, but you can copy the URL of the whole playlist and paste it into the shortcode editor, as you would when sharing a single video.
Embedding whole YouTube playlists (ones that were created on YouTube) or embedding whole channels it only possible with FV Player Pro.
Here’s a link for the “England | Expedia” playlist on YouTube:
https://www.youtube.com/playlist?list=PLdgCSoJzrmKGrTcFuxF9dJfWJ0BookIUC
Here’s how it looks like in FV Player Editor once inserted:
Alternatively, you can open a single video from the playlist and then use the Share function of YouTube. Here you’ll have the option to choose whether the playlist should start with the current video, or begin at the start. The box Share with playlist starting from should of course be checked. Then just copy the generated link into FV Player.
Copying YouTube playlist link
Here’s an example of how the imported playlist will look. (England by Expedia)
Importing a live stream from YouTube
FV Player is able to handle live streams in the same way as regular YouTube videos. All you need to do is copy the video URL and paste it into the shortcode editor as shown in Inserting a new Youtube video section of this page.
The player shows the live stream in a similar way to a regular video. Take a look at the example below (source: NASA):
NASA Live: Official Stream of NASA TV
Some notes at the end:
- There might be some YouTube branding visible, but that’s a requirement of the YouTube API. Go to: Settings > FV Player > Hosting > YouTube > YouTube UI
- Indirectly opening a YouTube video (for example by opening a playlist item) on mobile will require an additional tap to start the video playback. This is also due to some of the YouTube API restrictions.
- If your splash screens appear blurry or you experience other issue with proper importing, check if you have inserted the Google API key.
- If the YouTube videos play muted on your website please check if your web server is not setting the
Permissions-Policy
HTTP header withautoplay=()
. Changing that toautoplay=(self "https://www.youtube-nocookie.com" "https://www.youtube.com")
orautoplay=(*)
will fix the issue.
Leave a Reply