Files
shaka-player/lib/media/segment_range.js
T
Timothy Drews 36fec68e75 Create 'media' namespace for stream generic code.
* Move internal non-DASH specific code into the 'media' namespace.
* Remove DASH references from generic stream code.

The documentation is not changed as a follow-up patch will factor out
DASH functionality from StreamVideoSource back into a new
DashVideoSource class.

b/18903621

Change-Id: I78d6e4f2824d4983619f17872828d95655fcfe50
2015-01-26 15:08:48 -08:00

44 lines
1.3 KiB
JavaScript

/**
* Copyright 2014 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* @fileoverview Implements a SegmentRange, which represents a set of one or
* more contiguous segments.
*/
goog.provide('shaka.media.SegmentRange');
goog.require('shaka.asserts');
goog.require('shaka.media.SegmentReference');
/**
* Creates a SegmentRange, which represents a set of one or more contiguous
* segments.
*
* @param {!Array.<!shaka.media.SegmentReference>} references A set of
* references to contiguous segments. There must be at least one reference.
*
* @constructor
* @struct
*/
shaka.media.SegmentRange = function(references) {
shaka.asserts.assert(references.length > 0);
/** @type {!Array.<!shaka.media.SegmentReference>} */
this.references = references;
};