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

JW Player 7: manual quality change in HLS video fires 'play' API event


When changing quality manually in HLS video the API fires a play event. Since we want to use those events for extra tracking statistics this would add 'play' events which do not reflect real play events when user clicks play.

Switching manually back to quality "Auto" does not fire 'play', which is good. Also automatic quality changes are not firing 'play'. Why does manual quality change fire 'play' and can this be fixed?

I provided a demo here but could not get the m3u8 to run (instead the mp4 fallback plays). Don't know why. In my local development site everything works.
https://jsbin.com/nupabe/5/edit?html,js,output

5 Community Answers

klopfer

User  
0 rated :

Just recognized that it's the same for JW Player 6 (which we also need as IE7+8 Fallback)

Carolyn Ganon

JW Player Support Agent  
0 rated :

Hello,

Our analytics do not fire a play event when a user manually switches between quality levels. You can watch the network requests being made from the demo page here: http://support.jwplayer.com/customer/portal/articles/1430240-hls-adaptive-streaming

klopfer

User  
0 rated :

Hi Carolyn,

maybe your own JW analytics is not tracking "play" when a user manually switches between quality levels.

But the JWP API event .on('play') for JW 7 and onPlay(callback) for JW 6 are fired when a user manually switches between quality levels.

Go to you example page:
http://support.jwplayer.com/customer/portal/articles/1430240-hls-adaptive-streaming

Now open the console in Developer Tools or Firebug and enter:
playerInstance.on('play', function () {console.log('played!');});

Now play the video and switch quality level manually and watch the console.

We want to use these events to track video plays in Google Analytics. But it doesn't make sense if this event is not fired consistently. It hits on play button, on manually switching quality, but not on automatically switching quality or manually switching to quality "automatic".

As a workaround we now added a string "initial play" which will be added to the GA dataLayer only on first play event per video. However your development should add more consistency to this event.

Carolyn Ganon

JW Player Support Agent  
0 rated :

Even though a play API event is called when a user switches quality levels, we do not track that as a ‘play’ in our internal analytics system or through our integration with GA>

If you are interested in integrating with Google Analytics, I would recommend following the instructions outlined here: http://support.jwplayer.com/customer/portal/articles/1417179-integration-with-google-analytics

Hope this helps!

klopfer

User  
0 rated :

Hi Carolyn,

thanks for suggesting built in GA integration, however we want to track some more events using the API and to keep data consistent also plays will be tracked via API play event.

Our analytics team will have a closer look though into the built in option.

Anyhow forget analytics for a moment. If there is an API event which should fire on play, why is it firing on quality change? This should not be the case and be fixed, do you agree?

This question has received the maximum number of answers.