diff --git a/lib/player/player.js b/lib/player/player.js index 28b22ca851..19018db4f9 100644 --- a/lib/player/player.js +++ b/lib/player/player.js @@ -812,11 +812,9 @@ shaka.player.Player.prototype.isLive = function() { * *
  • * restrictions: shaka.player.Restrictions
    - * Sets the content restrictions. For example, if maxBandwidth = 700000 and - * minBandwidth = 200000 then playback will be restricted to video tracks - * with bandwidths between 700000 and 200000. Note that if the current video - * track does not meet the restrictions then the stream will not - * automatically switch tracks. + * Sets the video track restrictions. For example, if minBandwidth = 200000 + * and maxBandwidth = 700000 then the player will only permit switching to + * video tracks with bandwidths between 200000 and 700000. * * * @example diff --git a/lib/player/restrictions.js b/lib/player/restrictions.js index e3a62eef24..69ba4185fb 100644 --- a/lib/player/restrictions.js +++ b/lib/player/restrictions.js @@ -20,9 +20,9 @@ goog.provide('shaka.player.Restrictions'); /** - * Creates a Restrictions object, which describes a set of content restrictions. - * A VideoSource will not adapt (or permit switching) to any tracks that exceed - * the specified limitations. + * Creates a Restrictions object, which describes a set of video track + * restrictions. A VideoSource will not adapt (or permit switching) to video + * tracks that do not meet the specified limitations. * * @constructor * @struct diff --git a/lib/player/stream_video_source.js b/lib/player/stream_video_source.js index 74db1c62c6..e668a9430e 100644 --- a/lib/player/stream_video_source.js +++ b/lib/player/stream_video_source.js @@ -223,7 +223,7 @@ shaka.player.StreamVideoSource.SEEK_TOLERANCE_ = 0.01; * *
  • * restrictions: shaka.player.Restrictions
    - * Sets the content restrictions. + * Sets the video track restrictions. * * * @example @@ -809,7 +809,7 @@ shaka.player.StreamVideoSource.prototype.setPlaybackStartTime = /** - * Applies the content restrictions, if any. + * Applies the video track restrictions, if any. * * @private */ @@ -831,6 +831,8 @@ shaka.player.StreamVideoSource.prototype.applyRestrictions_ = function() { for (var j = 0; j < periodInfo.streamSetInfos.length; ++j) { var streamSetInfo = periodInfo.streamSetInfos[j]; + if (streamSetInfo.contentType != 'video') continue; + for (var k = 0; k < streamSetInfo.streamInfos.length; ++k) { var streamInfo = streamSetInfo.streamInfos[k]; @@ -862,7 +864,7 @@ shaka.player.StreamVideoSource.prototype.applyRestrictions_ = function() { shaka.log.info( streamInfo.allowedByApplication ? 'Permitting' : 'Restricting', 'stream', streamInfo.id + '.', - 'The application has applied new content restrictions.'); + 'The application has applied new video track restrictions.'); tracksChanged = true; } // for k } // for j