Files
shaka-player/docs/tutorials
Joey Parrish 7e0f46931e Overhaul variant-based and stream-based interfaces
While I set out to fix failing assertions during playback, I found
many more changes necessary to clean up the code and make things more
consistent.

When we changed switch history to include variants instead of streams,
we broke the filtering logic that is applied to the history.  This
caused assertions at runtime that were not caught by the tests.

This moves the filtering logic to addToSwitchHistory_ and makes it
aware of variants.  It also adds a regression test that would have
caught the assertions.

This fix affected many other tests, though, which necessitated other
API changes and cleanup.

Many interfaces are simplified, as is switching logic in Player.  The
data flow is also easier to follow, since there are fewer transitions
between variant and stream.  Everything up to StreamingEngine uses
Variants, and StreamingEngine uses Streams internally.

  - All stream-based interfaces on AbrManager replaced
    - switch callback takes a variant
    - chooseStreams replaced with chooseVariant
    - setTextStreams has been dropped
    - Player maintains compatibility with old interfaces until v2.3

  - Most stream-based interfaces on StreamingEngine replaced
    - onChooseStreams callback to Player returns variant & text
      instead of a stream map
    - switch was replaced with switchVariant and switchTextStream,
      both of which delegate to switchInternal_, which is largely
      unchanged from the original switch method
    - still has getActiveStreams, which I hope some day can become
      getActiveVariant and getActiveTextStream so Player no longer
      has to convert anything

  - Most stream-based logic in Player replaced
    - deferred switches map broken into variant and text members
    - switch history logging broken into simpler variant and text
      methods
    - simplified manual and automatic track selection logic using
      new AbrManager and StreamingEngine APIs
    - player no longer filters duplicate selections, StreamingEngine
      handles that
    - replaced one case of deferred switches with an assertion

Closes #954

Change-Id: Ia49f6ffb9c5fa13ed8790dd03eeeded5122f7683
2017-08-03 21:34:47 +00:00
..
2017-06-22 21:08:33 +00:00
2017-04-20 23:39:27 +00:00
2017-06-09 21:59:48 +00:00