Update 2023: 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.
List of topics covered in this documentation:
- Inserting a new Youtube video
- Using Automatic Captions and Splash Images
- 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, integration playlists and more even in the free version of FV Player. However, embedding whole YouTube playlists (ones that were created on YouTube), embedding whole channels, or the no logo option remain to be accessible only to the users of FV Player Pro.
Note: The player detects the device used and when necessary, serves lower quality streams automatically. You can also create playlists from multiple YouTube videos with the FV Player shortcode editor.
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 box. You can also write the shortcode directly in this format:
[fvplayer src="https://youtu.be/7uY0Ab5HlZ0"]
Editor:
Adding links into the shortcode editor
And here is the video (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 Captions and Splash Images
Same as for Vimeo videos, FV Player automatically parses the video caption from the title of the video on YouTube.
You can also change the automatically loaded splash image, for any other image you want. Just open the shortcode editor for the video you want to edit and upload or select an existing image. This will overwrite the automatic one.
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
If you are using FV Player Pro, then we recommend inserting a Google Developer Key into your account. There are three benefits:
- reliable import of splash screens from YouTube
- video duration parsing
- better parsing of playlists
If you are just adding a few individual YouTube videos, you do not need to do this. Just add splash screens manually (which are usually more relevant than automated splash screens) for those few YouTube videos you are showing.
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. It looks like a regular link, as you can see:
[fvplayer id="749"]
The player shows the live stream in a similar way to a regular video. Take a look at the example below (NASA Live: Official Stream of NASA TV):
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 Pro > Hosting > YouTube (Pro)
- 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.
Hi, can I insert a preroll on a youtube video?
How can I do?
Thanks Mirco Tenti