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

Widevine plugin integration with JWPlayer


I've been tasked with integrating the JWPlayer into our web site to stream video to our customers. We are using Widevine for our DRM solution to protect all content and we'd like to replace the Widevine sample player.swf with the JWPlayer. I'm not sure where to even start with this. I do know that our encrypted movie plays perfectly when using the Widevine sample flash player. When I try to use the JWPlayer .swf file, the player loads on the screen but doesn't do anything.

Here is a small snippet from the Widevine integration docs which leads me to believe I will need to write a JWPlayer plugin, using ActionScript to make the integration work.

From the Widevine docs:
"As noted above, the Widevine VSC for the PC and Macintosh are browser plugins. They integrate into a Flash player via the addition of a small amount of ActionScript in the .fla that will be used to delivery video on the e-portal.

The Widevine plugin accepts an RTMP connection from the Flash player as well as makes an HTTP connection to the content server to request the video. The content is sent to the flash player over the RTMP connection."

If anyone can lead me in the right direction on how to achieve this integration, that would be excellent.

Thanks so much.

- Billy -

15 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Do you have an example of where you are using Widevine? That would be a good starting place.

JW Player

User  
0 rated :

Yes, I will get something deployed out to a public facing site so that you can see how I've mapped things together and tried to get this working. I will update this post with the URL as soon as I have something available. Thanks so much for the post!

JW Player

User  
0 rated :

Here is Widevine's example using their own demo flash player (.swf). We'd like to use the JWPlayer instead of their demo flash player.

http://www.widevine.com/demo/index.html

I will post again when I have my implementation public facing with our integration.

JW Player

User  
0 rated :

Ethan,

Here is the example I'm working on which is trying to integrate the JWPlayer with the Widevine plugin.

http://alex-www-test.elasticbeanstalk.com/widevine

If you view source of this page you should find everything you need, I've also commented the javascript code so you'll see the code that works with the Widevine plugin and the Widevine flash player.

Please let me know what you think!

Ethan Feldman

JW Player Support Agent  
0 rated :

@Billy – The first link needs a special plugin, the 2nd link is using custom JS that is specific to Windvie.

Perhaps you can use their file, and our standard embedder?

http://www.longtailvideo.com/support/blog/15827/using-the-jw-embedder-to-embed-your-player

JW Player

User  
0 rated :

Correct, both links will require the user to download and install a custom plugin (widevine plugin) before they can start streaming video through the flash player, this is expected.

The look and feel of their file/player is very rough and we'd really like to use the jwplayer which is much nicer looking.

By using the jwplayer standard embedder, how will this achieve what we are looking for, which is getting the nice looking jwplayer flash player user interface and functionality?

I did try your suggestion and it's definitely not what we are looking for. Here is the configuration I used:

<code>
jwplayer('jwplayer').setup({
'flashplayer': '/js/widevine/WidevineMediaTransformer_VideoPlayer.swf',
'file': 'http://video.alexandriamedia.com/finding_nemo.wvm',
'controlbar': 'bottom',
'width': '470',
'height': '320'
});

Does that look like what you were suggesting?

Thanks for your help Ethan!

Ethan Feldman

JW Player Support Agent  
0 rated :

What does it look like?

Using that code will create a player that looks like this, for example – http://www.longtailvideo.com/support/jw-player-setup-wizard

JW Player

User  
0 rated :

I've updated the following URL to reflect the change you recommended with the embedded method.

http://alex-www-test.elasticbeanstalk.com/widevine

As you'll see, the .swf file that's being used is the Widevine demo example flash player (WidevineMediaTransformer_VideoPlayer.swf) which has some ugly drop-down menu for a play list and a start button. Neither one of them work. Am I doing something wrong? From your comment I'm under the impression that the player should look like the JWPlayer.

Thanks Ethan!

JW Player

User  
0 rated :

Ethan, have you had the chance to review my latest posts?

Ethan Feldman

JW Player Support Agent  
0 rated :

Hi Billy,

Sorry, I have been on vacation and I am out of the country, with incredibly shaky internet for a few more days still, – please contact our support and they will help you out – http://www.longtailvideo.com/support/contact-us

JW Player

User  
0 rated :

Hey Ethan,

I work with Billy and I want to start this thread back up. We actually have everything running with Widevine and jwplayer. The only thing we have left to resolve is the video aspect ratio.

Here is what we have.

Widevine Plugin :
This is a DRM product that will take *.wmv files and start up a local RTMP server locally in the browser. this local RTMP server is what we point our jwplayer at. Again this works.

Videos :
Our collection of videos may have all different frame sizes. Some will be 16:9 others will be 4:3. Some will even be a custom size.

Player size :
From what I understand our player will have to be a set size with jwplayer. This is okay as long as the video maintains it's aspect ratio.

Stretching :
From the documentation I would think we would want the default of "uniform". This way the video will keep it's aspect ratio. I have tried "exactfit" which gets closer but still not the correct aspect ratio.



Debugging? Is there anyway to have jwplayer display the info it has about an rtmp stream? I would love to know what it thinks the frame size is for each movie.

Ethan Feldman

JW Player Support Agent  
0 rated :

You could try to also use “fill” as the “Stretching” option.

JW Player

User  
0 rated :

I tried that as well with no luck.

How does the player determine the size of the video when playing an rtmp stream? I am starting to think there might be missing meta data in the stream.

Nathan

Ethan Feldman

JW Player Support Agent  
0 rated :

Hm, I am not sure, will ask…

JeroenW

JW Player Support Agent  
0 rated :

The player indeed determines the dimensions through metadata in the RTMP stream. You can listen to this data externally using the jwplayer().onMeta() JavaScript API call. A “metadata” object should get sent here, containing a “width” and “height” property. If you don’t see it, you can confirm testing with a plain MP4 download file; they will always have metadata.

If the RTMP stream indeed doesn’t send metadata, you can indeed set the “stretching” option to “exactfit” and then have the display be a 4:3 or 16:9 aspect ratio. If you know the A/R of the video through other channels, you can even look at resizing JW Player on the fly to fit the video (using the jwplayer().resize() API call).

http://www.longtailvideo.com/support/jw-player/28850/using-the-javascript-api

This question has received the maximum number of answers.