Skip to content

Fix for #1439 and much more!

Vinay Rosenberg requested to merge github/fork/dsparacio/#1439 into development

Created by: dsparacio

Important!!! Event CONST and String name have changed for Quality Change.

2.1 and below we only had QUALITY_CHANGED event that was triggered when a change is requested, manual or ABR. There was not a follow-up event for when the requested change actually was in the buffer and rendering.

In 2.2 I added the other event showing the change was complete and being rendered. A bug was filed #1439 (closed) saying you should get a complete event for all start events IF they render on screen.

  • So in this PR I have changed both event names, removed duplication of one event and made it dispatch render event every time there is a render change on screen regardless of ABR or manual switching requested. (E.g. FastSwitch is not enabled and you have many qualities in the buffer, you seek back and you play and there is a render change with now switch request. You will now get an QUALITY_CHANGE_RENDERED event in this case. )

New Event Names MediaPlayerEvents (Public Player Facing)

  • QUALITY_CHANGE_START is now QUALITY_CHANGE_REQUESTED
  • QUALITY_CHANGE_COMPLETE is now QUALITY_CHANGE_RENDERED

(CoreEvents Internal )

  • QUALITY_CHANGED has been removed and the internal system uses the same event
  • QUALITY_CHANGE_REQUESTED.

Other PR Changes

  • This PR also fixes an untracked bug found during dev for this fix. It applies only to FastSwitch. If you switched up and then back down to lower quality before the higher quality "backfilled" the buffer from playhead to current buffer-level, the client would append the lower quality in the incorrect place. This was just inefficient and is fixed now - did not break playback. Now it will append the lower quality at the end of the buffer.
  • This PR also includes some refactoring of ABRController to use Es6 syntax in places and much cleanup in a few methods.

Merge request reports