* Supports live streams of a fixed length.
* Live streams that stop now correctly end the video.
* Only uses local MPD when @availabilityStartTime is in the future.
* Added configuration option liveStreamEndTimeout.
A live stream is considered "ended" when the play-head moves past
the last segment for liveStreamEndTimeout amount of time. This allows
the MPD to be updated with new segments.
Closes#139Closes#140Closes#145
Issue #172
Change-Id: I0675203931f35ca3e0dee60a87c54ba74cbdbaea
* Fire an error event when all audio/video tracks are restricted
during playback.
* Fire an error event and fail gracefully when all audio/video tracks
are restricted before playback (requires calling player.unload() when
the VideoSource's attach promise gets rejected).
* Rework AbrManager so that getInitialVideoTrack() can be called before
starting bandwidth monitoring.
Closes#170
Issue #179
Change-Id: I4ac6cdf2a4c862e0d0560dff2f2d7bb6801bbc38
* Updates all Copyright years to 2015.
* Adds licenses annotations to all JS.
* Makes all licenses identical to avoid repeated appearance in the
compiled output.
* Drops fileoverview annotations, which do not affect docs output.
* The linter still requires fileoverview on externs.
This patch required a newer closure compiler, since the previous
version we used had a bug regarding license annotations that caused
the license comment block to appear in the output once per file
regardless of uniqueness.
Change-Id: I2e9272db680cba7ecc4613d97f1d3a94ac2244cc
This reverts commit 8cb24652cb, due to
the fact that the new annotations caused our binary size to jump
by 52%.
The compiler preserves all 'unique' licenses, which causes trouble
since the comment blocks with the license annotations are not unique
and contain file overview comments as well.
We can re-examine this once we have restructured the license headers.
Change-Id: I418e407a0e0253630633697f30cf496a7fc2ddfc
The underflow threshold was too small (measured 0.13s buffered during
underflow), and the minBufferTime was unnecessarily large.
Change-Id: I468a010a5f30ad64ccde8ce05d6482b02e71b9d4
This introduces a new method on PublicPromise called destroy(),
which does for Promises what destroy() does for the other classes:
shuts down async processes and cleans up references.
In addition to catching errors and shutting down more cleanly in a
wider array of circumstances, this may also help with GC, since we
no longer leave pending Promises around with handlers attached to
them.
Closes#151
Change-Id: I205c5979418fbc18cd7e35d91d0de2746f337137
Make the Player exit the buffering state when the minimum
buffering goal between all Streams has been reached.
Closes#166
Change-Id: I09753c88e2ea998e9a794763592254a89bc35af9
* Make IStream more precise by adding more documentation.
* Make misc. docs related to Stream more consistent.
* Remove |minBufferTime| from IStream; use a configuration
option instead.
Issue #147
Change-Id: Ie6261ced49a8f815d270e0ee94af5dc40acff63f
Add new ContentProtection interpretation API that allows applications to
return multiple DRM configurations for each ContentProtection element
and to parse raw ContentProtection XML elements.
This patch deprecates DrmSchemeInfo in favor of DrmInfo. Furthermore,
DrmSchemeInfo will be removed post v1.5.0.
* Replace DrmSchemeInfo with DrmInfo.
* Move Restrictions class definition into its own file.
* Populate initData values from explicit PSSHs without application
intervention.
* Allow explicit PSSHs to differ between Representations
Issue #71
Issue #137
Closes b/23428584
Change-Id: Ib8d6ba630b930ee64f923a3f4a3e518abacccf88
For static content, if the playhead moves to the end of the video then
either the video should pause or loop. Before this patch media timeline
misalignment and buffering detection would sometimes prohibit this from
happening.
* Ensure the MediaSource's duration is >= the end of each
stream's last segment (both before and after timestamp correction).
* Use an append window to keep the MediaSource's duration constant.
* Rework Stream startup so that the MediaSource can be modified
safely during timestamp correction.
* Remove timestamp correction member variables from StreamVideoSource.
* Fix buffering detection when there are no buffered ranges.
* Add sanity checks and improve logging for debugging MSE issues.
* Improve Stream startup documentation.
Closes#155
Change-Id: I6f7a1d15240af62a2282f3f62b29cd3acd5b1873
Make VideoSource configuration more consistent by treating
bitrate adaptation, content restrictions, and preferred
language as configuration options.
Change-Id: I761311dc806b5af8153875b654fc62ca9fd53234
* Rename the RangeRequestTimeout option to SegmentRequestTimeout
since the RangeRequest class no longer exists.
* Fix a few unit conversion errors between seconds and
milliseconds and vice versa.
Change-Id: I8695c3bfb79ae0e20ec5bc75d9ae9f941bccd023
These may be used to sanity check arguments coming from outside
the library.
* Use new getter functions in Player.configure().
* Add additional tests for Player.configure().
Change-Id: Ib0b907cde46aeb65ca1273fb424e3f13872fa5da
* Add an optional parameter to Player.selectAudioTrack to clear
the buffer like selectVideoTrack.
Closes#119
Change-Id: I40c4c1969115826890fe9719a988315b51e5b28c
The configure test was setting the timeout to a very small number
and did not reset the config.
Ultimately, this should be fixed by reachitecting the settings to
avoid static variables so that settings are per-instance.
Bug introduced in issue #93
Phase one of issue #126
Change-Id: Icfae6cd425677929115878477eca26d9292d2dff
This updates the extern for VideoPlaybackQuality to match the externs
in newer versions of the Closure Compiler.
b/21559591
Change-Id: Id375f8722fa46f6779934e15930bd328310490d5
This updates the extern for Promise.prototype.catch to match the ES6
Promise externs in newer versions of the Closure Compiler.
b/21559591
Change-Id: I796d8293f7be3170e465eaf3f30ceb8c9c5698b6
* Move seek range updates into SegmentIndex implementations
and StreamVideoSource.
* Remove unnecessary sub-class hooks from StreamVideoSource.
* Remove internal LiveSegmentIndex timer: do SegmentReference eviction
and generation on demand.
* Rework Stream startup again: consider Streams as started when they
have buffered some minimum amount of content. As part of this, only
apply a timestamp correction to the SBM when the streams have started.
* Defer stream switches until all SegmentIndexes have been corrected.
* Partially revert optimistic "bufferedAhead" calculations in Stream:
check if we've buffered enough content at least every second.
* Make LiveSegmentIndex more robust against a "wrong"
@availabilityStartTime.
* Fix a bug where a positive timestamp correction would trigger an extra
Stream resync.
* Fix a bug in evict_() where the first segment would never get evicted.
* Check stream started conditions in onUpdate_ instead of after a segment
has been inserted.
* Tidy-up immediate/clearBuffer naming and other comments.
Closes#51Closes#109
Change-Id: Ic6f0b96065d3c5dfb5c03ca1c52363bd77b22875
I was seeing errors in the integration tests due to setMediaKeys not
finishing before the next test was started. This ensures that the
mediaKeys will be null before each new test run.
Change-Id: Iaaa9dea67b315b1a91ec83668fb0ed9ffaa3f087