Skip to content

Commit

Permalink
fix(Tizen): Fix src= playback on Tizen 3
Browse files Browse the repository at this point in the history
src= playback on Tizen 3 was stalled at time 0, causing automated test
failures.  These went unnoticed while our Tizen device in the lab was
offline.

The only workaround I was able to find was to call load(), which we
recently stopped doing for src= playback.  This adds it back, but only
for Tizen.

Found while investigating #2620.

Backported to v2.5.x

Change-Id: I4e071a6f1ccb18b9891dfc646a22dbb8c1711eb4
  • Loading branch information
joeyparrish committed Jul 27, 2020
1 parent 474b1ec commit 7b2e884
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -1996,6 +1996,14 @@ shaka.Player.prototype.onSrcEquals_ = function(has, wants) {
// current time because |playhead| will do that for us.
has.mediaElement.src = has.uri;

// Tizen 3 won't load anything unless you call load() explicitly, no matter
// the value of the preload attribute. This is harmful on some other
// platforms by triggering unbounded loading of media data, but is necessary
// here.
if (shaka.util.Platform.isTizen()) {
has.mediaElement.load();
}

// Set the load mode last so that we know that all our components are
// initialized.
this.loadMode_ = shaka.Player.LoadMode.SRC_EQUALS;
Expand Down

0 comments on commit 7b2e884

Please sign in to comment.