This doesn't produce any output right now, but this allow to the forks
to create custom configurations for ads, and also allow future
configurations to be added.
The `discontinuitySequence` field of the last `SegmentReference` was getting reset to `0` in this function, even if it was originally set to something other than 0. This was causing unnecessary resyncs for the final segment of the video in sequence mode.
PR #5050 unboxed the console log methods, which broke logging on Tizen.
This change was never released.
This fixes the issue by using arrow functions to prevent unboxing.
This removes some workarounds that were in the logging code for the sake
of Internet Explorer. We no longer support IE, so those workarounds are
no longer necessary.
Closes#5032
This adds an optional parameter to request and response filters, of a
new enum called AdvancedRequestType.
This enum describes request types that are subtypes of the basic types.
For example, INIT_SEGMENT is a type of SEGMENT.
This gives users more information about the type of the request, while
maintaining backwards compatibility.
Closes#4966
The duration is the minimum of the end times of all active streams.
Non-active streams are not guaranteed to have useful maxTimestamp
values, due to the lazy-loading system, so they are ignored.
Bad linebreaks will now cause cues to be skipped (with a warning),
rather than throwing an error.
Closes#2358
Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
After watching post roll ads, `this.video_.play()` was called on a completed content in the `onAdComplete` event.
The content would then restart from the beginning.
We now flag that the content is completed before we call `this.adsLoader_.contentComplete()`.
On the callback, we prevent the video element from replaying if this flag is set.
This fix is based on the Advanced Sample on the [googleads-ima-html5 repo](https://github.com/googleads/googleads-ima-html5/blob/main/advanced/ads.js#L128)
Closes#4445
Fixes https://github.com/shaka-project/shaka-player/issues/4940
This occurs when the operating system defaults to enabled subtitles in
src= mode. The solution is to detect that there are active subtitles and
set the internal visible flag to true.
Adds color support for SimpleTextDisplayer and WebVttGenerator (only one
place to fix both now thanks to #4941).
It's limited to the [8 colors
classes](https://w3c.github.io/webvtt/#default-text-color) supported by
the WebVTT specification, and also works with their 3 or 6-digit hex
variants (if the stream has TTML subtitles).
It does not support rgb, rgba or any colors other than these 8.
Fixes#4545
---------
Co-authored-by: Alvaro Velad Galvan <ladvan91@hotmail.com>
In Low Latency HLS, the low latency segments are integer segments
instead of partial segments like in DASH, so we can avoid reading part
of the segment and increase performance on low-end devices.
When the VTT size setting is used, the horizontal positioning was wrong
in both native and UI display.
The native display is wrong on Chrome and Edge because of a layout bug
in Chrome, where the shadow DOM for the cue box has conflicting
(redundant) styles. For example, these VTT settings:
`line: 85% position: 50% size: 63%`
result in these styles in the shadow DOM:
`top: 85%; left: 18.5%; transform: translate(-18.5%, -85%)`.
The `translate` style is what breaks the positioning. Unfortunately,
there is no way to fix that in JavaScript.
The UI display, however, was buggy for different reasons and is fixable.
The styles `left: 0; top: 0;` were applied by default, and then `top:
85%;` and `width: 63%;` were set based on the cue settings. The default
of `left: 0` was what broke the positioning. Removing this leaves `left`
set implicitly to `auto`, which is correct.
No other test cases were broken (or fixed) by this change.
This also adds a filter parameter to the lab workflow to run a subset of
tests for quicker results. This is useful for updating screenshots.
Closes b/259121343
Fixes#4350
The current code initially parses the subtitle track as text/vtt
(mimetype) since it has no codec. Subsequently, the stpp.ttml.im1t codec
is assigned but the mimetype of text/vtt is not changed to
application/mp4. This PR changes this so that once the codec is
assigned, the mimetype is recalculated.
This adds extra context to 3015 (MEDIA_SOURCE_OPERATION_THREW) errors, by attaching
the error on the media element. This is helpful because, in some situations, media source operations
can have very unhelpful exception strings like:
`Error: Failed to execute 'appendBuffer' on 'SourceBuffer': The HTMLMediaElement.error attribute is not null`
When multiple style blocks exist for the same selector, they should be
combined. For example,
::cue(b) { background: white; }
::cue(b) { color: blue; }
should set both the background and foreground of bold tags.