Commit Graph

2959 Commits

Author SHA1 Message Date
Casey Occhialini fe38e45f4d fix: Adds missing CMCD params to some http requests (#5072)
Fixes #5067
Fixes #5094

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
2023-03-15 02:13:16 -07:00
Dave Nicholas 6a0124d276 chore: Fix typos in comments (#5093)
Fix typos in comments.
2023-03-15 06:57:05 +01:00
Martin Stark e19fa80090 fix: mitigate uncaught type error in media_source_engine (#5069)
Fixes #4903
2023-03-14 19:23:10 +01:00
Álvaro Velad Galván dfe263aa6a feat(Ads): Add ads config (#5085)
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.
2023-03-14 19:18:19 +01:00
Álvaro Velad Galván 36bcc3775a fix: Fix fetch plugin with old implementations (#5091)
Fixes https://github.com/shaka-project/shaka-player/issues/5088
2023-03-14 19:12:56 +01:00
Álvaro Velad Galván 122f5f3e87 fix(Ads): Fix usage of EventManager on CS (#5084) 2023-03-13 16:00:19 +01:00
Ashwin Bhat 36a15f6072 fix(HLS): preserve discontinuitySequence in SegmentIndex#fit (#5066)
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.
2023-03-10 21:31:18 -08:00
Martin Stark 64389a274a fix: Prevent bad calls to MediaSource.endOfStream (#5071)
This prevents the streaming engine from calling MediaSource.endOfStream when
media source's readyState is "closed". It's not valid to close a stream that is already closed.
See:
https://developer.mozilla.org/en-US/docs/Web/API/MediaSource/endOfStream#exceptions

Fixes #5070
2023-03-08 16:12:33 -08:00
Joey Parrish d08531cf9a fix(Tizen): Fix exceptions thrown from logging methods (#5063)
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.
2023-03-07 09:34:39 -08:00
FernandoGarciaDiez eb01c60b27 fix: Tizen video error fixed by checking the extended MIME type (#4973)
Fixes #4634
2023-03-06 13:26:53 -08:00
theodab 694497684c fix(logging): Simplify log code. (#5050)
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
2023-03-02 21:50:57 -08:00
Simon Gingras 673b7fceed feat(ads): Dispatch a player event for client-side ad errors (#5045)
Closes https://github.com/shaka-project/shaka-player/issues/4335

The errors are now forwarded to the player

---------

Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
2023-03-02 07:14:27 +01:00
Álvaro Velad Galván 2ae5a99642 corrección: Disparar correctamente el error MIN_HDCP_VERSION_NOT_MATCH (#5047) 2023-03-01 12:58:41 +01:00
Casey Occhialini 50d0645a1e fix: Fallback to isTypeSupported when cast namespace is undefined (#5012)
Resolves #5010

---------

Co-authored-by: Dan Sparacio <daniel.sparacio@cbsinteractive.com>
2023-02-28 13:50:53 -08:00
Álvaro Velad Galván 7da65a197a chore: the implementation of abort() on SourceBuffer in Safari, now works (#5044)
See: https://bugs.webkit.org/show_bug.cgi?id=165342

Tested on Safari 16 with
http://storage.googleapis.com/shaka-demo-assets/_bugs/safari-10-mse-abort/index.html
2023-02-28 21:12:05 +01:00
Álvaro Velad Galván 8818a026d6 fix: Reject TS content on Edge (#5043)
Fixes https://github.com/shaka-project/shaka-player/issues/4955
2023-02-28 20:16:16 +01:00
Álvaro Velad Galván 0b785f7d9c fix: Allow the playback of TS without mux.js (#5041) 2023-02-28 15:12:05 +01:00
Álvaro Velad Galván 2d0e4cc4f4 fix: Fix video/mp2t mimetype conversion. (#5039)
Related to https://github.com/shaka-project/shaka-player/issues/5036
2023-02-28 13:16:55 +01:00
Álvaro Velad Galván ad89482639 chore: Fix style of MuxjsTransmuxer (#5040) 2023-02-28 13:10:59 +01:00
Julian Domingo a22bdc51f4 fix(HLS): Add .tsa and .tsv file extensions as valid MPEG2-TS. (#5034)
Fixes https://github.com/shaka-project/shaka-player/issues/5033.
2023-02-27 19:13:13 +01:00
Álvaro Velad Galván c7c5e94a32 feat: Add getManifestType method (#5021) 2023-02-23 21:00:50 +01:00
theodab fbce38af1c feat(net): Added advanced type to filters (#5006)
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
2023-02-23 11:56:23 -08:00
Álvaro Velad Galván 541badcfca fix(Ads): Fix usage of EventManager on CS (#5017) 2023-02-21 17:20:50 +01:00
Álvaro Velad Galván 492b5f3ac8 fix(Ads): Fix CS volume ad (#5016) 2023-02-21 17:20:36 +01:00
YuChao Liang 1aee98944f fix: Fix duration error when HLS goes from LIVE to VOD (#5001)
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.
2023-02-16 13:51:41 -08:00
Álvaro Velad Galván d074afc1fc fix(ads): Fix VMAP ads stay muted on muted autoplay (#4995)
Fixes https://github.com/shaka-project/shaka-player/issues/4992
2023-02-13 20:04:41 +01:00
Álvaro Velad Galván 2d0469fb4a fix(VTT): Fix spacing between text lines (#4961)
Fixes https://github.com/shaka-project/shaka-player/issues/4958

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Joey Parrish <joeyparrish@google.com>
2023-02-10 14:08:42 -08:00
Tom Bloom 9b1c614815 feat: Allow VTT files with erroneous linebreaks (#2394)
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>
2023-02-09 11:07:23 -08:00
Álvaro Velad Galván ea290ab958 fix: Increase IndexedDB timeout (#4984)
Related to https://github.com/shaka-project/shaka-player/issues/4625
2023-02-09 10:25:30 +01:00
Álvaro Velad Galván 07787a8874 feat(HLS): Add support to HLS-AES128 low latency (#4982)
Closes https://github.com/shaka-project/shaka-player/issues/4981
2023-02-09 10:01:49 +01:00
Simon Gingras 64e94f1c79 fix: Prevent content from being restarted after Postroll ads (#4979)
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
2023-02-08 23:06:44 -08:00
Álvaro Velad Galván 9d2c325cdf fix: Caption can not turn off at iOS Safari (#4978)
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.
2023-02-08 15:39:48 -08:00
Martin Stark eebf18cabd fix: DrmEngine exception thrown when using FairPlay (#4971)
Closes #4902

This is not intended to be a complete fix for the issue, I do not
understand the effect this new ternary on the shaka player as a whole. I
have not found the root cause for `this.currentDrmInfo_` being
`undefined` when accessed. It does, however, look like it has previously
been acceptable for this property to be `undefined`.

During the work to add Fairplay support in 2022, accessing
`this.currentDrmInfo_` was added on line 483. This line **does not**
accept that `this.currentDrmInfo_` can be undefined. A few lines below
this, `this.createOrLoad()` is called, which **does** accept that
`this.currentDrmInfo_` can be `undefined`. The latter piece of code was
last modified in 2019.

https://github.com/shaka-project/shaka-player/blob/c471d23bc25db11dda85a18870ebd3fe37971848/lib/media/drm_engine.js#L483-L498

https://github.com/shaka-project/shaka-player/blob/c471d23bc25db11dda85a18870ebd3fe37971848/lib/media/drm_engine.js#L626-L629
2023-02-06 10:19:27 -08:00
Álvaro Velad Galván 5d93b8f9a7 fix: Failed to set 'currentTime' property on 'HTMLMediaElement' on a Hisense TV (#4962)
Fixes https://github.com/shaka-project/shaka-player/issues/4888
2023-02-03 11:26:52 +01:00
Álvaro Velad Galván d4fc54f8dc fix(WebVTT): Tags in the WebVTT subtitle are not parsed (#4960)
Fixes https://github.com/shaka-project/shaka-player/issues/4956
2023-02-03 11:11:23 +01:00
Albin Larsson ed7a736ca2 feat(webvtt): webvtt colors output (#4954)
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>
2023-02-03 09:34:16 +01:00
Tian Shao de6abde06f feat: Support Parallel Segment Fetching (#4784)
closes https://github.com/shaka-project/shaka-player/issues/4658.

This solution is inspired by abandoned PR
https://github.com/shaka-project/shaka-player/pull/2809, which
implements segment prefetching ahead of current play head.


![image](https://user-images.githubusercontent.com/3315733/205465795-75c605d2-c2e3-4d03-90f5-46a72a7189d2.png)
2023-01-31 20:08:29 +01:00
Álvaro Velad Galván 7439a264d6 fix(MCap): Remove robustness when robustness value is default (#4953)
Fixes https://github.com/shaka-project/shaka-player/issues/4659
2023-01-31 18:21:28 +01:00
Álvaro Velad Galván 5514385c87 feat(HLS): Improve Low Latency performance in HLS (#4952)
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.
2023-01-31 17:25:32 +01:00
Álvaro Velad Galván b441518943 feat(DASH): Add support for <dashif:Laurl> (#4849)
Closes #4748
2023-01-30 16:08:34 -08:00
Joey Parrish f45631834d fix(WebVTT): Fix horizontal positioning with cue box size (#4949)
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
2023-01-30 16:01:25 -08:00
Álvaro Velad Galván 2b50b88030 feat(HLS): Add HLS support for non-sequence mode (#4623) 2023-01-30 21:22:30 +01:00
Álvaro Velad Galván 974f5dcb63 fix(HLS): IMSC1 subtitles not working in a HLS stream (#4942)
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.
2023-01-30 09:29:32 -08:00
Álvaro Velad Galván ff80ae67dd chore: Add text_utils.js (#4941) 2023-01-30 18:22:57 +01:00
Álvaro Velad Galván 056588b2e1 fix(DASH): Fix dynamic manifests from edgeware (#4914)
Fixes https://github.com/shaka-project/shaka-player/issues/4913

---------

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
Co-authored-by: Joey Parrish <joeyparrish@google.com>
2023-01-30 18:22:05 +01:00
Tiago Lopes 67a245129f feat(logs): Add extra logging for 3015 errors (#4932)
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`
2023-01-27 16:30:21 -08:00
Álvaro Velad Galván d465942c43 feat(HLS): Improve detection of basic info from Media Playlist (#4809) 2023-01-26 23:46:46 -08:00
Joey Parrish 128562d93e fix(VTT): Fix combining style selectors (#4934)
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.
2023-01-25 15:04:10 -08:00
Álvaro Velad Galván 48c30bcd03 feat: Add AC-3 detection in TS (#4931) 2023-01-24 17:58:27 -08:00
Álvaro Velad Galván 68968c17d8 fix(WebVTT): Fix voices with styles and support to multiple styles (#4922) 2023-01-24 19:53:48 +01:00