This corrects/normalizes license headers in misc. files, such as
config files, docs, build tools, tests, and externs. This does not
affect the compiled output, and is only done for consistency.
Issue #2638
Change-Id: I9d8da2de55243b08d7df2b743aac73c6f15e858a
This removes periods from the internal manifest structure and cleans
up code and tests accordingly. This leaves us unable to play
multi-period DASH & offline streams until the main period-flattening
algorithm is completed in shaka.util.Periods.
Three test cases have been disabled for the moment.
Multi-period playback will be restored in a smaller, more focused
follow-up commit, with disabled tests re-enabled.
Issue #1339 (flatten periods)
Issue #1698 (rapid period transitions issue)
Issue #856 (audio change causes bitrate change)
Closes#892 (refactor StreamingEngine)
Change-Id: I0cbf3b56bfdb51add15229df323b902f0b2e643a
This changes the eslint rule to enforce a strict pattern for the
argument comments. The comment must appear before the argument and
must be /* foo= */. This still ignores line comments.
Change-Id: I3afb01c65e1088eda13facb3aeeaa7595a2f5aee
This method should probably never have been in the library, since it
creates a fixed-sized, muted element.
Change-Id: I53b474305465bef34d43ce40ec5e7dedceb20a25
This reflects changes in Google's policy on JavaScript license
headers, which should be smaller to avoid increasing the size of the
binary unnecessarily.
This also updates the company name from "Google, Inc" to "Google LLC".
Change-Id: I3f8b9ed3700b6351f43173d50c94d35c333e82b4
MediaSource throws if endOfStream() is called when
its readyState is equal to 'ended.' This happens if
endOfStream() has already been called.
This change ensures that we don't try to call endOfStream
on the MediaSource that has already marked as 'ended.'
Closes#2050.
Change-Id: I2672b297f0ebb7fd67afcf72ee52df6d5bacf761
This is a fully automated change. The linter will fail because the
extra indentation caused line-length errors. These won't be fixed
automatically. They are fixed in a follow-up to make this one fully
automated.
Change-Id: I4d8cf9c998985add2bcd24a81c8d65495668c4f3
With the new style rule, we cannot have two statements on the same line.
So we can no longer have an "if" on a single line and we cannot have
an arrow function with a body on the same line as when it is used.
This is mostly a manual change.
Change-Id: I2285202dd5ecbad764308bc725e6d317ff2ee7f0
This is an automated change to convert use of "function" functions
to arrow functions. This doesn't change all uses of bind() that
could be converted. This also doesn't remove all "function" functions.
Change-Id: I40ac7d086bcef947a1be083359c8fd1d4499a9c3
A coming update to the Google eslint config will require using "const"
over "let". This makes that one change to isolate the big changes.
Change-Id: I7d0974c3ae15c53cc45a6b07bf9f6586e2d34aca
Before, media source engine could be created with no text displayer.
However, player would always create media source engine with a
text displayer.
Just like with closed captions, this appeared to be a good time
to change it to be passed in the constructor and have media source
engine own it.
This now means that media source engine is responsible for destroying
it - lessening player's responsibilities.
Change-Id: I71cd1c28a3c22d3c765a3892fe74ae3f9abd1914
There we a couple different fake text displayers in our tests. This CL
take them all and consolidates them into one fake text displayer.
Change-Id: I889aa4f11660d641920b0628e7e91549cb715c6a
To make it clearer that the CloseCaptionParser uses MuxJS (and therefore
it requires MuxJS) it has been renamed to be MuxJSClosedCaptionParser. To
further isolate the dependency on MuxJS, the support check that we must do
before using the Caption Parser has been moved to a static function on the
parser.
Change-Id: If3385f192434d8f8ce0c1cadbc6365a7c5df9d5d
Instead of requiring media source engine to create its own closed
caption parser and then allow tests to override it, have it be
passed into the constructor.
This allows us to easily use the fake one in all our tests and
removes the need for a test only method on media source engine.
Change-Id: Ia1d4f0bb988dca30699b30ccaf4522126f357f90
Refactor the closed captions support for HLS, using the same approach as
the closed captions support for Dash.
If closed captions are signaled in the manifest, player will create a
text stream for to represent the closed captions, and text engine will
store and append them. We don't need to set 'useEmbeddedText' value for
closed captions any longer.
Issue #1404
Change-Id: I9a5bf4df7e29d6e6982f29fd5e2df07bc78071d7
Adding support for CEA closed captions embedded in video streams for
Dash.
1. Dash parser reads and parses closed captions' channel and language
information.
2. Player creates text streams for the closed captions.
3. Media Source Engine calls mux.js Caption Parser API to get the closed
captions embedded in the video streams.
4. Text Engine stores the closed captions, and text displayer shows the
captions.
TODO:
1. Add test cases, will send out another CL.
2. Change closed captions support for hls to the similar way we handle
dash closed captions, will send out another CL.
3. Handle dash content that's missing language indication from the manifest.
Issue: #1404
Change-Id: Ibae8f69623c13561415ec860107d7f5bc86e19e9
While writing a new test to probe gap tolerance of browsers, I
discovered that only some of our tests run muted. The others may be
subject to autoplay restrictions. All tests should run muted.
Change-Id: Id5d5d611eb9ca95ea166a4542f38d41a67e280ac
On some platforms, the sample used in that test leads to a
buffer start time of 1.4; on other platforms, it leads
to a buffer start time of 1.4667333333333332.
Perhaps this is a result of the implementation-specific rounding
differences in different mediaSource implementations, or perhaps there
us a very small gap in the content that some platforms handle slightly
differently.
Either way, this change loosens the tolerance on the check. That buffer
start time check wasn't the important part of the test, anyway.
Fixes: 77471871
Change-Id: I866fafe671566cc7116e7c99222f75225cffd476
Our support for CEA 708 closed captions only works if the container
video file is transmuxed. Because of that, we were not successfully
reading such captions on platforms with native TS support.
This change adds a configuration option to force TS to be transmuxed
even when unnecessary, to account for that situation.
It also adds an integration test to ensure that CEA 708 captions can
be extracted on every platform.
Closes#276
Change-Id: Id8b2a67f2327d1b69c9cdfc443e9592c99baf0db
This isolates MediaSource code without changing the early
initialization of MediaSource, which was designed for low-latency
startup.
Prerequisite for #1087, #880, #997, #816
Change-Id: I61acedd95d73610d3e67436d9c7767d643fe2d29
This avoids having media from one period replaced by media from the
next period. Instead, media that comes before the period start will
be chopped off by MediaSource.
Closes#1098
Change-Id: Idf6dc2ffafe78214e94bc75aca63920e153f1a2c
Some platforms (such as Chromecast) support extra MIME parameters like
framerate, bitrate, width, height, and channels. Since other
platforms will ignore these extra parameters, we should always query
using these parameters.
This introduces the framework to construct these "extended" MIME types
from Stream objects. Extra parameters for other platforms can easily
be added later.
Change-Id: I8936ca93e84068da18f12127fbc8fc1a0646695a
This is part of adding a new conformance rule to add additional type
safety. This will disallow using properties of unknown types or using
unknown properties.
The first parts will be fixing errors caused by the new rule. These
are backwards compatible, so can be applied before the rule is enabled.
Once all the errors and bugs are fixed, the rule will be enabled.
Change-Id: I48335fc6659d3c33a6d55b00d087b59410c79cf7
The bulk of the logic for gap jumping is handled in Playhead. It
tracks the current buffered ranges and jumps over any gaps that appear.
It listens for a special browser event ('waiting') for when the video
element runs out of playable frames.
This change also removes the logic for jumping gaps at the beginning
of the timeline. This is handled by the more general gap jumping
logic and works cross-browser.
Finally, this updates the buffering logic to only count the amount of
content buffered (i.e. ignoring the gaps). This fixes some bugs where
gaps in the content can result in StreamingEngine buffering forever
since it thinks only a little is buffered.
This includes full implementation of the logic, but this doesn't close
the issue since there aren't any integration tests yet. Those will
be added next.
Issue #555
Change-Id: Id99eb9fe469e8cf2c7464a3d70c3733791e806e0
When appending MPEG2-TS segments, we seem to always enter a
PARSING_MEDIA_SEGMENT state in the SourceBuffer. While we are in this
state we can't change the timestampOffset. This means that we can't
change Periods or adapt to a different resolution.
To fix this, we call abort() before setting the timestampOffset to
reset the state. Because abort() also resets the appendWindowEnd,
this merges the two operations so we set timestampOffset and
appendWindowEnd at the same time (since we do already).
Issue #279
Change-Id: Icd893ded9e3137179f262ba10e55e41d06ec5a77
MediaSourceEngine integration tests were failing on Chromecast due to
pollution of global state by CastUtils tests (video element not
removed, MediaSource object leaked). By fixing the clean-up in the
CastUtils unit tests, MediaSourceEngine integration tests are now
passing on Chromecast.
This also makes the video clean-up in MediaSource and StreamingEngine
integration tests consistent with the way the library cleans up video
elements in Player.
Change-Id: Id49d40ba1970040c0dd1fc342f2657fc3f5a24b8
- Factor segment metadata out of MediaSourceEngine integration tests
- Use TestScheme metadata and generators instead
- Factor segment metadata out of StreamingEngine integration tests
- Use TestScheme metadata, but own generators
- Remove unnecessary assertion from DashVodStreamGenerator
- Rename TestScheme "codec" member to "codecs" for consistency
- Correct segment durations
- Avoids audio segment overlap, which is not well-supported
Closes#623
Change-Id: I9de7554bf854d8d29916d7dc8247ed423fb6af28
All tests now have the same timeout value. This should simplify the
process of addressing timeouts on Safari.
Change-Id: I3b455bd639758007ec8b2b86ef236c56e919c15a
This allows integration tests to test Player and offline with "real"
manifests and segments that are generated using ManifestGenerator and
StreamGenerator. The networking scheme can also be used with an
unmodified Player.
b/29883614
Change-Id: I77aa5385ecaaac43ba713687befa2f064654375a
Based on several rounds of experiments, the timing on these tests was
determined to be too strict. Extending delays and timeouts on these
tests reduces flakiness across browsers and platforms.
Change-Id: Ie36c86f3afcb615991454d098e690199ca063f96
The second argument is meant to be the number of decimal places to
which the value must match, not the maximum difference. So using
"0.1 decimal places" meant the maximum difference was actually 1.25.
You must pass "1" to get a maximum difference of "0.1".
This also adjusts some of the expectations to fix affected tests.
Change-Id: Ibc1223297011063e3e4f3fff0ba64fde06292128