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

Youtube view count with JWPlayer


Hi,
in your next version (6.9) there is option to embed youtube in HTML5. It works good but there is one problem. video doesn't count.
You can look here:
https://developers.google.com/youtube/js_api_reference#playVideo
Note: A playback only counts toward a video's official view count if it is initiated via a native play button in the player.
Maybe you should consider a way that plays from JWPlayer will also counted as view in Youtube
Thanks

9 Community Answers

Ethan Feldman

JW Player Support Agent  
0 rated :

Just like the Flash version of our YouTube integration, views of YouTube videos through the YouTube player don’t count against the original view count on Youtube.

“A playback only counts toward a video’s official view count if it is initiated via a native play button in the player.”

This means the native play button to YouTube’s player only.

efratib

User  
0 rated :

I am testing a way to use JWPlayer that view will count in youtube, maybe it will work.
I use this code to hide jwcontrols and "bring them back" if user play the video.
something like:
$('.jwcontrols').css('display','none');$('.jwvideo').css('opacity','1');
jwplayer().onPlay(function(){$('.jwcontrols').css('display','block')});

now the native youtube play button is visible and maybe view will count.
But, it (code) doesn't work if youtube video loading time is longer than 2 seconds.
I tried to use onReady() with no success.
Is there a callback when video has been loaded to player and is ready?
Thanks.

Ethan Feldman

JW Player Support Agent  
0 rated :

It is onReady()

Where are you running this?

Maybe you are doing something wrong.

efratib

User  
0 rated :

Hi Ethan,
You can see the difference here:
With onReady(): http://jsfiddle.net/g2BJ6/show
the controls doesn't display, but "jwvideo" opacity is 0 because it change to 0 after youtube iframe has been loaded.
With timeout: http://jsfiddle.net/g2BJ6/1/show

Ethan Feldman

JW Player Support Agent  
0 rated :

onReady() works, you are making the controls hidden. It seems to work. You are telling the player to do that.

efratib

User  
1 rated :

didn't you see any difference between the two pages?
I guess when YouTube video load the opacity of class "jwvideo"
set to 0 by jwplayer.js or jwplayer.html5.js (after jQuery set it to 1).
but I'm looking for a callback that fired after file has fully loaded. Then there won't be difference between the two examples.
Thanks.

Ethan Feldman

JW Player Support Agent  
0 rated :

I don’t believe we have a callback for this. Really, I don’t know of a way to fake the Youtube view count through their API. The view count only counts up to the best of my knowledge if you are using their own embedded player, not through their api.

efratib

User  
0 rated :

@Ethan,
I don't try to fake YouTube view count via their API, I'm sure there are better ways to do this. (If I know how I wouldn't ask here ;)...)
I just want to find a way that plays from JWPlayer would also count as a view.
My tests has shown that views from JWPlayer could count in YouTube when using those script that hide jwplayer controls.

Ethan Feldman

JW Player Support Agent  
0 rated :

I understand, I just believe that only Youtube embeds do this, not api embeds.

This question has received the maximum number of answers.