* 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
* Reject fetch() Promise in SBM if appending a segment doesn't
actually buffer the segment.
* Remove an 'assert' in Stream that was triggering for self-initializing
streams.
* Improve log messages in Stream.
Change-Id: I8c74ae24948e7a8fc2bd7539f617a7932a2b9f43
This allows the app to intercept media requests to modify its URLs.
The callback accepts the URL for the request and returns a modified
URL or null to use the original.
Closes#148
Change-Id: I08352754ace05f318706fd93910097c0fa7696f0
This check is necessary since Stream does not own its StreamInfo,
so the async part of switch() may complete even if
Stream.destroy() is called
Change-Id: I5185c0df3184924d0f34d39e235b1155f01dd273
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
build.sh now accepts several arguments that will disable features
that will not be needed. The default is to include all features.
Part of #116.
--disable-offline
--disable-dash
--disable-http
Change-Id: Icdaf82b322debbdc1e898e93c539e35894678a8d
* 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
Added a new class called FailoverUri which handles multiple URLs and
switches to others when one fails. This is also handles the request
itself. This replaces SegmentMetadata as well as a number of manual
requests.
The MPD parser now produces arrays of URIs rather than just one. The
MPD Processor then converts it to a FailoverUri inside the manifest.
Added unit tests to test the new functionality and updated the old ones
to the new changes.
This does not support failover on subtitles since subtitles are handled
by the browser.
Closes#68
Change-Id: I5410104827b9e4102b243444b1b5a3f01dcaf10d
The circular dependency,
ContentDatabase -> RangeRequest -> AjaxRequest -> ContentDatabase,
causes issues for the upstream Closure compiler. This patch breaks that
cycle by factoring out reading and writing operations from ContentDatabase
into ContentDatabaseReader and ContentDatabaseWriter respectively.
The following minor changes have been made to code that has moved:
* Removed retrieveInitSegment() since it's not used.
* Changed .stream_ids to ['stream_ids'] in retriveGroup().
* Reworked deleteGroup() so that it doesn't depend on retrieveGroup().
* Made deleteStream() private.
* Made minor formatting changes to meet the 80 character limit.
Change-Id: Idfc5d04ad32225a915b1531e0f4205137de5cc73
* Instead of intercepting specific 'seeking' events to forego stream
resync, record the particular seeks using a member variable, which is
less error prone.
* Don't rely on 'playing' events for stream resync after pause/play:
'playing' events aren't reliable; instead, just check if we need to
clamp the playhead when we update the seek range.
* Don't fire seeking events when starting the video at t=0, or when
there is no timestamp correction.
Closes#132Closes#136
Change-Id: I350ee6e9966af9f44d3e8bda4dc8297271e41855
A SegmentTimeline can appear inside a SegmentList and describes the
duration of the items in the list. A SegmentTimeline can also be
inherited from the Period or AdaptationSet. These have all been
added. Also added SegmentList support for dynamic MPDs.
Closes#88
Change-Id: I849491b1c6a5808a58c597eccfd439154e2e6ecd
Multiple calls to DashVideoSource.addExternalCaptions will each
add a caption source to the object. Added unit and integration
tests for this.
Change-Id: I387d285b5d11aa345b3abefab05d633194863030
This allows an app to specify an external caption source so the captions
can come from a different source than the MPD. The method should be
called before the call to load().
Closes#133
Change-Id: I0686fd800e0fe3a73d89a71e2f374dffef905dba
* Add a URL override and an HTTP method override to LicenseRequestInfo.
* Use LicenseRequestInfo objects as dictionaries so the pre-processor
interface works like the Player.configure() interface.
* Ensure LicenseRequestInfo fields are valid after the pre-processor
is called.
* Improve pre-processor integration test.
* Add @expose to some typedefs so they are included in the documentation.
Closes#134Closes#135
Change-Id: Ia29d36d70fa661d58196d166cbc60b281c679594
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
* Reject Task Promise if one of its stages fails so that the caller's
catch handler is invoked.
* Use TypedBind consistently in affected Promise chains.
Closes#131
Change-Id: I94fa6688949444212fa0b1edd3a94e0de4d6956f
There should never be multiple buffered ranges, but if there are
then at least try to keep playing.
Issue #121
Change-Id: I562bdb194dcc1f66701ad1b5bb3246b4e2fbe431
* 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
The init data is only needed once after a switch. It should be
removed afterward to avoid asking SBM to append it with every
segment.
This also fixes a race between switch and onUpdate_ in which rapid
switches can cause AdaptationEvents to be missed.
Change-Id: I32fd72c9fbe716c632b90ff2eb7ae3f6e628a1fb
Now that google/closure-compiler#715 is fixed and we have upgraded to
a newer compiler, we can remove these casts.
b/21559591
Change-Id: I7769d95d7b440c648eb78e026d94544c640c41b4
* Update compiler to v20150609.
* Since v20150315:
* Promise.prototype.catch externs now provided by compiler.
* Iterator externs now provided by compiler.
* Variadic function syntax has changed.
* Since v20150505:
* BufferSource extern now provided by compiler.
* Since v20150609:
* VideoPlaybackQuality extern now provided by compiler.
b/21559591
Change-Id: Ie7d030422e132879e28b1bdf538991a27ebc25df
Newer versions of the Closure Compiler issue warnings for several
anonymous functions due to what appears to be a failure to infer
certain types. This patch uses TypedBind to mollify the compiler.
This patch also fixes another issue raised by the newer compiler,
which is that index does not have duration and key_system properties.
b/21559591
Change-Id: Icff84ad084bfcd049f962bd4a0698b3fc78fc279
This updates the extern for VideoPlaybackQuality to match the externs
in newer versions of the Closure Compiler.
b/21559591
Change-Id: Id375f8722fa46f6779934e15930bd328310490d5