SimpleAbrManager will still choose the middle audio stream by default,
but will adjust audio up or down once video has been chosen. Video
will be downgraded before audio, and audio will be downgraded only as
a last resort.
For audio-only content or content with one video stream and many audio
streams, audio will be chosen to fill available bandwidth, just as it
already was for video.
Change-Id: Ia4a0e9607d860713a5ad7887ac6a9aa04767eb25
* Add config option for using segment relative timestamps for VTT
Fix for #480
* Make useRelativeCueTimestamps a non-nullable param
* Update tests for the new useRelativeCueTimestamps param
* Move period relative timestamp deprecation warning to vtt parser
* Log warning only if using absolute timestamps in text cue
* Fix vtt text parser test
Clearing ahead of the playhead is causing hiccups in playback on the
following browsers:
* Chrome (all platforms, inconsistent)
* Edge
These browsers appear not to be affected:
* IE 11
* Firefox
* Safari
This is a manual change that reverts almost all of:
* a8ac3142 - Make buffer clearing behavior explicit
* 4593cf78 - Check position against null, fix bug in a8ac3142
* 10b3dd0a - Seek after clearing a buffer, workaround Chrome bug
* 6daa7f3b - Allow AbrManager to clear ahead of the playhead
Clearing the buffer is now an all-or-nothing proposition because that
is the only way to get consistent playback quality across browsers.
This comes at a cost, because we can no longer count on the ability to
remove buffered data on upgrade without a stutter.
Issue #520
Change-Id: Ia6f8b2fcb223f9c50e9829b26d7003ae8f6efb8d
To work around a bug in Chromecast, seek after clearing the buffer.
This forces the device to flush the pipeline and remove any decoded
data from the old representation.
Closes#544
Change-Id: I3c34d344bfd856b429a360fc41ce7288791716bb
Our new logic calculating bufferedAhead value doesn't work when
it comes to switching periods for content with SegmentTemplates.
This change partially reorders code from the 12c07efc change.
Closes#545Closes#537
Change-Id: I1d9c3ab8a185d0a3f419bbc442b366e697115dd2
We had a typo in the case of an attribute (schemeIdUri vs schemeIdURI)
and we did not have support for the latest scheme URI (upcoming MPEG
scheme URI vs /guidelines/ vs /descriptor/).
Change-Id: Ibee1802cfe2b04183d52e75378fa23e0c4e3aae8
- Speed up EWMA estimates (lower half-lives)
- Drop min delay concept
- Trust the estimate after a certain number of bytes have been
sampled (128kB)
- Take samples as small as 16kB (previously 64kB)
- Drop startup interval, just wait for estimate to be trustworthy
The result is much faster initial adaptation when the default
bandwidth estimate is too low, without sacrificing startup speed in
low bandwidth situations. The best track is selected right away,
and is visible after the first two segments have played out.
In a high-bandwidth scenario using our test clips (Angel One and
Sintel), the initial ABR decision is visible 2.4x to 4.4x faster now.
Decision speed is now largely independent of available bandwidth.
Change-Id: I121f4dd44b725dc53de61c02f7afea14d9234df6
A bug in Chrome makes video feed freeze for a while after a buffer
is cleared. Seeking helps to avoid freezing.
A bug on Chrome: http://crbug.com/651904
Change-Id: I80d9139cb02e859d9a0165235c9868d9afa8adfa
The reality is that it has always taken a plain Object, but we were
calling it shakaExtern.PlayerConfiguration. While it is true that
the argument follows that layout, only the fields to be changed are
needed. This becomes an important distinction for other Closure-based
projects using our compiled binary.
As we move toward generating externs for the library at compile-time,
we should be careful about the required input type so our generated
externs can be used directly by the app.
As a side-benefit, this also removes some casts from our tests.
Change-Id: Iadb6a071d502e9ac6955af4d85af918eedd23571
These issues were identified by an upcoming release of the compiler
and must be fixed before we can upgrade.
Change-Id: I8cf3af90b930f2adfa9760299fe69f1892614bf2
This makes it so we do not have to export FakeEvent and include it in
our generated externs (coming soon, after a compiler upgrade).
Change-Id: I7ccdfe94b989a498c85681ad9166bc184eb611c9
If we use @export in the Promise polyfill, those methods will end up
attached to the polyfill namespace in the compiled code, and will also
end up in the generated externs (coming soon).
By exporting then() and catch() manually, we avoid this.
Change-Id: Ib12b4d9319452ceed802c8fdc8c47d9c09dd24a5
The interfaces for these polyfill types were not fully implemented
because we do not use every part of the interface in the library.
A newer version of the compiler is stricter about this.
Change-Id: I5164717159544a62640b14aca1a2c7b2d44a33ba
a8ac3142 had a bug in which a switch at position zero would not result
in clearing anything. Positions may validly be zero, but never null.
Change-Id: I95a607df7bd6a41cf73f78122c3dcdda425fb145
It is possible for the SourceBuffer buffered ranges to return a
(small) negative value. We should treat this as 0.
Closes#530
Change-Id: Ib36e3f4e5e4fdb9f51a7d6644f006b8f9791cc45
- Replace both boolean clear and number-of-seconds args with an enum
indicating a specific type of clear behavior: none, all, or most
(all but 2 segments, currently).
- Calculate segment size from the content in StreamingEngine, rather
than assuming a common segment size in AbrManager.
Change-Id: I9e4fee0945d5e50fd7da86bb8467911e60c4575e
- Use TimeRangesUtils to calculate buffer end and ahead
- Remove early checks on ended || seeking, which stopped buffering
event when looping
- Remove check on paused, which stopped buffering event on startup
Change-Id: If6d451c501d72d8cb37bc018db3e660b06958b6a
This is basically rollback to what buffering logic used to be in
shaka v1. We will be checking buffering state every 250ms and
invoke onBuffering event when needed.
Closes#511
Change-Id: I726c7c30e60322cbb5b9f7222405f3cfdf18822b
UNABLE_TO_GUESS_MANIFEST_TYPE doesn't indicate that the guesswork
failed due to a network error. To make it clearer what went wrong,
dispatch the original network error from the HEAD request.
Change-Id: I1905afdf0913740f9fce0d011b6b2ac3ad37efd7
This fixes the definition of start time to exclude the rebuffering
goal. It also gives us a more conservative default presentation delay.
Content providers should always strive to provide a presentation delay
for their live streams.
Closes#504
Change-Id: I5a373666f4e325cc056ab2336d236b207430bde6
Show 'stop casting' dialog on chromecast control click when casting.
If user chooses to stop, delegate disconnecting to Chrome.
Related to #261
Change-Id: I3072a3723e0d0d526039946fb45713e20349e54c
- Avoids zero-duration cues which would throw exceptions on IE/Edge
and stop playback. (Warns about these ignored cues.)
- Pushes offset down into the text parsers since cue times are
read-only on IE/Edge. This fixes text errors in multi-period
content on those browsers.
- Factors VTTCue/TextTrackCue interface decisions out to TextEngine.
- Adds new platform integration tests for cues.
Closes#501Closes#502
Change-Id: Ie2210a91e28149f9c4f7fd34bff847aabbeeea63
The parser previously handled files which had no terminating newline,
and files that had a blank line at end (two newlines), but not files
that had a single newline at the end. In that case, the trailing
newline ended up in the payload of the cue.
Change-Id: If70d1a811e13c7edac9c0ad2de85112d884b84fc
Type compatibility checks are important for multicodec or
multicontainer content, and there's no good reason to exclude text
from those checks. The new Axinom v7 test vectors have multicodec
text (both mp4+VTT and mp4+TTML).
Change-Id: I999aaf5b37cda8a9243538b4dd21c503df33dcb9
When switching from an unavailable to an available text stream we
are adding a text media state. This happens after switch method
checks for it and the assertion fails.
This is a change to return from the switch method before the
assertion gets checked.
Issue #474
Change-Id: I66fd4cfc7b61ea0acb2a7539cc5afaba4e17044e
DASH parser used to assume representation can only have one role.
However that's not true in case of text representations that can
have both role=main and role=caption/subtitle.
Closes#500
Change-Id: I1b6a494347a0b86211b6982416e444c020b1eeb0
Behavior for IPR streams:
* offline storage disallowed
* segment references will not be stretched to the period
* seek range starts at 0
* seek range end is calculated like the live edge
* seek bar is from 0 to duration, not the seek range
Closes#477
Change-Id: Ia36874bb7208c2473c79cb817395ce03925b8c95
This change creates a new model which divides DASH streams into VOD,
IPR, and live. It is possible to create manifests which do not fit
into any of the three categories according to our model, so we now
assert that our input fits cleanly into one of the three.
Inline manifests used in our tests had to be updated to conform to
the new model. All external test assets have been verified to fit
into these categories.
This is phase 1 of IPR support. There should be no behavior change
in this CL.
In phase 2, we will make various other parts of the library aware of
IPR so that IPR-specific behaviors can be achieved.
Issue #477
Change-Id: I395d3a0c8c9825a3cd2efde263b8493ce0920ed9