Name is required.
Email address is required.
Invalid email address
Answer is required.
Exceeding max length of 5KB

Add YouTube URL to Playlist Using load() in JW 7


I have code that uses load() to replace the "active" video in a player with a single file reference. When I try this using a URL to a YouTube video, I get the "Error: No suitable provider found." I'm using a cloud copy of JWPlayer 7. (http://content.jwplatform.com/libraries/xxxxx.js)

Since I'm really not using a playlist, destroying and re-initializing a new player each time might be a suitable workaround, but it seems like this should work.

the following works when I supply it a full path to an MP4, but not a YouTube video.

$(document).ready(function() {
$('a.openVideo').click(function(e) {
e.preventDefault();
var videoURL = $(this).attr('href');
loadVideo(videoURL);
});
});

function loadVideo(videoURL) {
videoPlayer.load([{
file: videoURL
}]);
videoPlayer.play();
};

5 Community Answers

Alex

JW Player Support Agent  
1 rated :

Hi, there.

I’m experiencing the same thing as you when reproducing the issue. I’m going to escalate this to our Engineers to see what they say. As soon as I hear back, I will let you know.

Thanks.

drivard

User  
0 rated :

Thanks. I look forward to a response. I searched extensively, and didn't see anything quite like this in other issues. It sounds like this IS supposed to work, though.

Alex

JW Player Support Agent  
0 rated :

Hi, there.

I have heard back from our Engineers. They stated that this would be a hard issue to resolve due to the nature of YouTube’s API. However, they do plan on open-sourcing their YouTube provider code within the next few weeks, so they can potentially get more eyes looking at issues like this.

One workaround would be to add your YouTube URLs to your Account Dashboard and embed the content that way. When on your Content page, if you click the down arrow next to “Add Upload”, you will get a “Add via URL” option and you can paste the YouTube URL in there.

Please let me know if you need any more help or have any other questions.

Thank you!

drivard

User  
0 rated :

It sounds like that would download the video from YouTube and host it on the JW Platform CDN. We DO want to play the video via YouTube, but with the same JW Player UI as other self-hosted videos. We don't currently use your hosting.

The solution I landed on for now, was to use a plain IFRAME embed for YouTube, and live with the mix of JW Player custom and YouTube player UI.

Alex

JW Player Support Agent  
0 rated :

Hi, there.

Adding a YouTube URL to your account dashboard does not download or copy the YouTube video itself. It just “registers” it your Dashboard and allows you to embed the content and player using the single line of JavaScript given to you by the dashboard.

Please let me know if you need any more help or have any other questions.

Thank you!

This question has received the maximum number of answers.