Commit Graph

3622 Commits

Author SHA1 Message Date
David HM Morgan 3783ffd44b fix(TTML): Fix timing parsing when using 1dp (#6830)
Fixes #6829
2024-06-14 12:30:01 -07:00
David HM Morgan 601098bad1 fix(TTML): Extended subtitle codec support (#6832)
> Quote from specs:
> Valid examples include:
> • "stpp.ttml.etd1" - TTML content suitable for presentation by an
EBU-TT-D renderer
> • "stpp.ttml.etd1|im1t" or "stpp.ttml.im1t|etd1" - TTML content
suitable for presentation by an EBU-TT-D or
IMSC1 renderer 

Fixes #6831
2024-06-14 16:41:37 +02:00
Álvaro Velad Galván 7bea10c18d fix(CMCD): Fix reset CMCD on unload (#6821)
Fixes https://github.com/shaka-project/shaka-player/issues/6819
2024-06-13 22:35:53 +02:00
Álvaro Velad Galván 28d3c98415 feat(Ads): Fill loadTime stats in interstitials (#6817) 2024-06-13 22:22:47 +02:00
Álvaro Velad Galván bf15b24fc2 fix(HLS): Fix AC-4 codec selection in HLS (#6818)
See:
https://ott.dolby.com/OnDelKits/AC-4/Dolby_AC-4_Online_Delivery_Kit_1.5/Documentation/Specs/AC4_HLS/help_files/topics/hls_playlist_c_codec_indication.html
2024-06-13 22:22:34 +02:00
Wojciech Tyczyński 8a678f374d feat(Stats): Add manifestGapCount to stats (#6804)
Resolves #6789
2024-06-13 09:41:57 +02:00
Álvaro Velad Galván 7844fedf21 feat(Ads): Add support for X-TIMELINE-OCCUPIES (#6806) 2024-06-13 09:41:20 +02:00
Álvaro Velad Galván c866d7b467 feat(HLS): Allow disable streams when the media playlist fails (#6807) 2024-06-13 09:32:09 +02:00
Gary Katsevman d6fcf66f5e fix: ignore buffered content less than 1e-4s (#6802)
On Firefox, in some cases after a period ends, seeking shortly after
will cause playback to fail or stall.
This occurs when the next period has small gaps and we're seeking to
after the gap. Seeking to before the gap succeeds. Even though the seek
requests the soure buffers to be fully cleared, Firefox actually keeps
around less than 1e-4s of content and won't let us forcibly remove this
content. Trying to call flush causes in infinite loop.
This leftover content makes shaka think that the buffer end in where we
used to be even though the presentation time reflects where we seeked
to. This means that playback doesn't continue. The buffer contitues
getting filled and playback will either fail when the SourcBuffer is
filled and triggers a QuotaExceededError or contiue when the buffer will
reach the presentationTime.
2024-06-12 12:06:36 -07:00
Wojciech Tyczyński 95590adefd fix: selectAudioLanguage() should ignore unplayable variants (#6805)
When restrictions are set, `selectAudioLanguage()` ignores them and may
suggest variant that is marked as unplayable.
2024-06-12 13:38:02 +02:00
Álvaro Velad Galván 4ea9a4471d feat(Ads): Add CUE PRE and POST support in Interstitials (#6799) 2024-06-12 11:50:57 +02:00
Álvaro Velad Galván a65a6f8b20 fix: Fix initial track selection in src= when using HLS (#6803)
Fixes https://github.com/shaka-project/shaka-player/issues/6801
2024-06-12 10:30:17 +02:00
Álvaro Velad Galván bf5a103626 feat(HLS): Use PLANNED-DURATION to determine the end time (#6800) 2024-06-12 10:28:55 +02:00
Álvaro Velad Galván a1c91aeaf9 feat(HLS): Only process DATE-RANGE in AUDIO and VIDEO playlists (#6793)
https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#section-6.2.4

```
If any Playlist contains Date Ranges, then at least one Playlist
      in any playable combination of Renditions of any Variant Stream
      MUST contain Date Ranges.  Any Playlist with Date Ranges MUST
      contain the same set of Date Ranges as the others that do.  The
      EXT-X-DATERANGE tags of corresponding Date Ranges MUST have the
      same ID attribute value and contain the same set of attribute/
      value pairs.
```

So it would not be allowed. We can omit Date Ranges from img and
subtitle Playlists in a Rendition that has Date Ranges in the Variant
Playlists (main video STREAM-INF Playlists).
2024-06-12 10:19:03 +02:00
Álvaro Velad Galván 9b25ff5bc1 feat(Ads): Add CUEPOINTS_CHANGED event to interstitials (#6791) 2024-06-12 10:14:37 +02:00
Álvaro Velad Galván 46387754ca feat(Ads): Improve preload timing on interstitials (#6792) 2024-06-12 09:59:36 +02:00
Wojciech Tyczyński 65b0b8dd21 feat(Stats): Add manifestPeriodCount to stats (#6798)
Resolves #6788
2024-06-12 08:37:01 +02:00
Wojciech Tyczyński 2f3a1ebf94 feat(DASH): add MPD_PATCH advanced request type (#6787)
Add `shaka.net.NetworkingEngine.AdvancedRequestType.MPD_PATCH` to
distinguish regular MPD requests from MPD Patch requests.
2024-06-11 10:56:14 +02:00
Wojciech Tyczyński 0820491564 fix: getPresentationStartTimeAsDate() should return time unaffected by clock drift (#6790)
For our Seek To Date feature, we need the presentation start date
directly from the manifest since all of the client’s key play times are
based directly on the `availabilityStartTime` from the manifest
directly.
2024-06-11 10:56:00 +02:00
Álvaro Velad Galván c72493a41b feat(Ads): Add CUE ONCE support in Interstitials (#6785) 2024-06-11 10:37:37 +02:00
Álvaro Velad Galván 394968617e fix(Ads): Fix duplicate interstitials when using src= (#6784) 2024-06-11 08:28:42 +02:00
Wojciech Tyczyński 309bd72046 fix(DRM): close properly webkit media key sessions (#6775)
On WebOS 3.0 we've noticed an issue in production, where TVs are slowly
starting to throw the following error after a user has watched at least
30+ episodes: `Code: 6006 Category: 6 Severity: 2 ["EME v0.1b key
error",{"errorCode":{"code":1,"systemCode":65535}},"0xffff"]` and can
only be resolved by clearing the app cache, or unplugging the TV.
Further investigation revealed that current workflow, where MSE is
destroyed before DRM Engine causes that old EME implementation is not
able to close session properly.
2024-06-11 08:22:14 +02:00
Álvaro Velad Galván 8fb31c1777 fix: Fix AC-4 codec string in MediaSourceEngine (#6780)
See:
https://media.developer.dolby.com/AC4/AC4_DASH_for_BROADCAST_SPEC.pdf
2024-06-11 08:15:08 +02:00
Wojciech Tyczyński d0d5843d8c feat(Stats): add size of the manifest to player stats (#6783) 2024-06-10 17:26:44 +02:00
Álvaro Velad Galván 08e81118cf fix(Ads): Fix interstitial ad values when the ad is loading (#6782) 2024-06-10 13:48:45 +02:00
Wojciech Tyczyński 081afde932 feat(Stats): count non fatal errors (#6781)
Add `nonFatalErrorCount` to shaka stats.
2024-06-10 13:46:12 +02:00
Álvaro Velad Galván 59304b8208 feat(Ads): Add support for interstitials when using src= (#6777) 2024-06-10 13:26:05 +02:00
Álvaro Velad Galván 205d58b9ba chore: Remove old LCEVC code (#6778)
Since the latest versions we always make TS transmux.
2024-06-10 13:05:33 +02:00
Álvaro Velad Galván 5bfe37f3c5 feat(Ads): Improve resume times when the interstial uses two video elements (#6774) 2024-06-10 11:13:05 +02:00
Álvaro Velad Galván 363989c770 feat(Ads): Fix playback of interstitials in iOS (#6776) 2024-06-10 11:12:53 +02:00
Wojciech Tyczyński d5b1863157 fix: Fix green screen issue on Edge with mixed content (#6719)
On Edge, to properly play mixed content, we need to insert init segment twice for clear part - once as encrypted, and immediately again as clear. Otherwise we may encounter green screen and errors from video decoder.

Co-authored-by: Joey Parrish <joeyparrish@users.noreply.github.com>
Co-authored-by: Nick Michael <nick-michael@users.noreply.github.com>
Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
Co-authored-by: Casey Occhialini <1508707+littlespex@users.noreply.github.com>
2024-06-07 13:06:13 -07:00
Álvaro Velad Galván 60e6847e39 feat(HLS): Add HLS interstitial support (#6761)
Closes https://github.com/shaka-project/shaka-player/issues/3364
2024-06-07 16:12:40 +02:00
Wojciech Tyczyński 48bdf176cb feat: Add audio codec to selectAudioLanguage() (#6723)
- adds optional argument to `selectAudioLanguage()` which gives us a way
to select preferred audio codec
- updates `PreferenceBasedCriteria` to reflect the change
- renders codec in shaka UI to help distinguish tracks with the same
language, role, channels, etc
- can be tested on Chrome with `Tears of Steel (multicodec, TTML)` asset
2024-06-07 15:18:57 +02:00
Álvaro Velad Galván 5067d5cf5f feat: Add dontChooseCodecs config (#6759) 2024-06-05 22:04:35 +02:00
Álvaro Velad Galván a053dd2513 fix(ABR): Fix variant choose when two variants have the same bandwidth but different resolution (#6760) 2024-06-05 22:04:12 +02:00
Álvaro Velad Galván 7bcb86e510 fix(HLS): Fix seekRange when using delta playlist (#6758)
Only happens when we use `useSafariBehaviorForLive = false`.
2024-06-05 14:36:41 +02:00
Álvaro Velad Galván 8d7dd37cfb feat(HLS): Ignore EXT-X-DATERANGE in the past (#6757) 2024-06-05 13:13:17 +02:00
theodab b500799b97 feat(preload): Add new method destroyAllPreloads (#6756) 2024-06-05 12:10:00 +02:00
Álvaro Velad Galván c3e64508c1 fix(HLS): Ignore query params in the uri of EXT-X-SESSION-KEY tags (#6755)
With this change avoids errors like: 
`DOMException: Failed to execute 'atob' on 'Window': The string to be
decoded is not correctly encoded.`
2024-06-05 09:39:36 +02:00
theodab 9d1fe4abd5 fix(preload): Fix error handling (#6753)
After a previous bugfix to the preload system, we ended up with a
situation where the
overall progress in the preload was tracked by two promises:
`successPromise_`, which is resolved when the preload finishes
successfully.
`destroyPromise_`, which is rejected with an error when the preload
process trips an error condition.
These two promises were confusingly named; it sounds like destroyPromise
is related to the destroy process,
but really it has more to do with errors.
They were also completely redundant, as a single promise can be used to
carry both a resolved and
rejected state.

This PR simply combines the two promises into one.

---------

Co-authored-by: Joey Parrish <joeyparrish@google.com>
2024-06-04 16:08:07 -07:00
Álvaro Velad Galván 3b2477f42c feat(HLS): Add support to variable substitution in EXT-X-DATERANGE (#6751) 2024-06-04 20:37:35 +02:00
theodab 95422b17d6 fix(preload): Fix preload error reporting (#6746) 2024-06-04 14:29:43 +02:00
Álvaro Velad Galván 9b47b8f74f feat(Ads): Add content resume/pause requested events (#6738)
This change simplifies the integration of HLS interstitials on platforms
that do not support multiple video elements.
2024-06-04 08:45:02 +02:00
Álvaro Velad Galván 4820565144 feat: Fix processing EXT-X-DATERANGE on live streams (#6740) 2024-06-04 08:12:14 +02:00
Álvaro Velad Galván 93c612392c fix: Do not export functions in getNonDefaultConfiguration (#6739) 2024-06-04 08:11:39 +02:00
Wojciech Tyczyński 97910dc8a9 fix: Support for Zenterio (#6717)
Few bugfixes to support DT Zenterio platform:
- Zenterio seems to have a problem with the EME onKeyStatus event payload (the key statuses map), where the map key ID comes in as empty. This is not correct based on the EME spec:
https://w3c.github.io/encrypted-media/#dom-mediakeysession-keystatuses
- Add polyfills that are used to fix issues with older webkits, same as for older safari browsers
2024-06-03 10:07:04 -07:00
Álvaro Velad Galván 80139b0ba7 fix: Avoid filter manifest when the DRM is not initialized (#6737)
Regression of
https://github.com/shaka-project/shaka-player/commit/90710023466dcad4d1d14a2869ae50e8da4e93ee

Fixes https://github.com/shaka-project/shaka-player/issues/6710
2024-06-03 12:16:34 +02:00
Álvaro Velad Galván 2ec64442e2 feat(HLS): Add support for EXT-X-DATERANGE (#6718)
Closes https://github.com/shaka-project/shaka-player/issues/3523
2024-06-03 10:10:39 +02:00
Casey Occhialini 76863f2a58 fix: ensure all timelineregionenter events are fired (#6713)
Fixes #6711
2024-05-31 21:48:44 +02:00
Wojciech Tyczyński 6f84e411ed fix(PS4): Fix serverCertificate defaulted to null (#6716)
For some reason on PS4, the check `val.buffer.constructor == ArrayBuffer` returns `false` when it should be `true` which causes the object cloning to return `null` instead of the array buffer.

Modifying this to `val.buffer instanceof ArrayBuffer` now returns true which fixes the issue. This should work across devices.
Original author: @nick-michael

Co-authored-by: Nick Michael <nick-michael@users.noreply.github.com>
2024-05-31 09:44:04 -07:00