Skip to content

Commit

Permalink
Restrict SourceBuffer.remove() for IE11
Browse files Browse the repository at this point in the history
This makes sure that remove() is called in a way that is compatible
with IE11.  For more information, see #251.

Change-Id: Iabe752713ba74c7bf516b4e7b93bc83cfccdd481
  • Loading branch information
joeyparrish committed Jan 12, 2016
1 parent b6a39b3 commit dea1021
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/media/media_source_engine.js
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,10 @@ shaka.media.MediaSourceEngine.prototype.appendBuffer =
*/
shaka.media.MediaSourceEngine.prototype.remove =
function(contentType, startTime, endTime) {
// On IE11, this operation would be permitted, but would have no effect!
// See https://github.com/google/shaka-player/issues/251
shaka.asserts.assert(endTime < Number.MAX_VALUE,
'remove() with MAX_VALUE or POSITIVE_INFINITY is not IE-compatible!');
return this.enqueueOperation_(
contentType,
this.remove_.bind(this, contentType, startTime, endTime));
Expand Down

0 comments on commit dea1021

Please sign in to comment.