Commit Graph

4678 Commits

Author SHA1 Message Date
Álvaro Velad Galván 65b86b4044 chore: Improve logs in cast sender (#9302) 2025-10-28 12:04:38 +01:00
Wojciech Tyczyński 708e520591 chore: Squash for..of loops in DRM probe support (#9295) 2025-10-27 14:32:02 +01:00
Álvaro Velad Galván 39968729d5 feat(Ads): Allow init Media Tailor without container (#9294) 2025-10-27 12:31:55 +01:00
Wojciech Tyczyński 2cd7bd7c15 fix: Delay position change during codec switch (#9293)
To prevent race condition on slower platforms, position change needs to
be done on `loadedmetadata` event after MediaSource is swapped.
2025-10-27 12:19:39 +01:00
Álvaro Velad Galván 6c683d7cac feat(Ads): Add getCurrentAd method (#9291) 2025-10-27 12:18:17 +01:00
Álvaro Velad Galván d10c5bc445 fix: Make sure the player is attached when loading a new stream (#9292) 2025-10-27 12:04:21 +01:00
Álvaro Velad Galván b376cc9264 fix(Cast): Allow serialize nested events (#9283) 2025-10-24 16:42:28 +02:00
Álvaro Velad Galván f115986e4e chore(Ads): Remove useless log (#9285)
The problem is that this log is displayed when any DATE-RANGE is
received so it is not useful because not all DATE-RANGE are
intersittials.
2025-10-24 16:42:14 +02:00
Álvaro Velad Galván 1f2065203b fix(Ads): Avoid fire an error when calling to onHLSMetadata when it's not necessary (#9286) 2025-10-24 16:41:52 +02:00
Álvaro Velad Galván de4c7b6cdc fix(Cast): Allow serialize nested events (#9281) 2025-10-24 13:22:29 +02:00
Álvaro Velad Galván 1916b22730 fix(Cast): Allow serialize arrays (#9277) 2025-10-24 11:23:57 +02:00
Álvaro Velad Galván 76cea8d75a feat: Handle AdManager in CastProxy, CastSender and CastReceiver (#9266)
Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2025-10-23 22:12:32 +02:00
Álvaro Velad Galván c08f27d93e fix(Ads): Update HLS ad skip control (#9276)
In Shaka we were using  the draft spec instead the final

Spec:
https://datatracker.ietf.org/doc/html/draft-pantos-hls-rfc8216bis#appendix-D.7
2025-10-23 21:00:47 +02:00
Wojciech Tyczyński 578c087d42 fix(webOS): Disable smooth codec switch on webOS (#9273)
During my tests I wasn't able to find a webOS TV which could handle
smooth codec switching properly. Let's disable it on all platform,
similar to what we've done on Tizen back in the day.
2025-10-23 16:45:26 +02:00
Wojciech Tyczyński 8e67e0bafc chore: Simplify codec switch check (#9274)
Move all logic related to smooth switch check to device API.
2025-10-23 16:45:02 +02:00
Wojciech Tyczyński 1dde5c7f50 perf: Optimize restrictions check (#9261)
Current ManifestFilterer logic checks all variants and throws
RESTRICTIONS_CANNOT_BE_MET if none of variants is playable. It's
redundant, because if at least one variant is playable, we will not emit
this error anyway, so we can quickly stop further processing if we
detect playable variant.
2025-10-22 15:10:22 +02:00
Álvaro Velad Galván f20c5e42c3 feat(Queue): Allow set a custom player (#9256)
This is useful when using cast proxy
2025-10-22 13:40:18 +02:00
Álvaro Velad Galván de5ff7b6c2 fix: Avoid create a cast sender on Cast devices (#9258) 2025-10-22 13:14:09 +02:00
Álvaro Velad Galván cdf5f6db73 fix: Add usage of AccessibilityPurpose.VISUALLY_IMPAIRED when using src= (#9255)
Fixes https://github.com/shaka-project/shaka-player/issues/9253
2025-10-22 13:04:36 +02:00
Álvaro Velad Galván 9741079cab fix: Fix usage of isRemotePlayback when casting (#9251) 2025-10-22 10:24:18 +02:00
Subhan Ahmed 329049864a fix(Xbox): Implement requiresClearAndEncryptedInitSegments method for xbox (#9254)
### Summary
When playing a live HLS stream on Xbox, I was running into the following
error as soon as the playhead hit a discontinuity:

```
CHUNK_DEMUXER_ERROR_APPEND_FAILED: Sample encryption info is not available.
```

I noticed that [this
fix](https://github.com/shaka-project/shaka-player/pull/6719) was added
a while back to address this exact issue. A few months ago, [another
PR](https://github.com/shaka-project/shaka-player/pull/8210) was
submitted to abstract the feature detection logic, which I believe
unfortunately caused a regression.

The `requiresClearAndEncryptedInitSegments` helper was implemented in
both the Abstract Device and the Default Browser, but it looks like it
wasn't implemented in the Xbox class. This resulted in
`requiresClearAndEncryptedInitSegments` always returning false on that
platform (defaulting to the Abstract Device class's implementation,
which returns `false`).

This made the following logic (that fixed the
CHUNK_DEMUXER_ERROR_APPEND_FAILED error) fail:
```
if (device.requiresClearAndEncryptedInitSegments()) {
  const doubleInitSegment = new Uint8Array(initSegment.byteLength +
    modifiedInitSegment.byteLength);
  doubleInitSegment.set(modifiedInitSegment);
  doubleInitSegment.set(initSegment, modifiedInitSegment.byteLength);
  return doubleInitSegment;
}
```

### Fix
Overriding this function in the Xbox class fixes the problem. 

### Result
Playback now proceeds through HLS discontinuities on Xbox without
CHUNK_DEMUXER_ERROR_APPEND_FAILED.
2025-10-22 10:24:10 +02:00
Álvaro Velad Galván 7a7099821e feat: Preload Manager update language configuration for audio and text (#9244)
Close https://github.com/shaka-project/shaka-player/issues/8159
2025-10-21 15:48:44 +02:00
Álvaro Velad Galván 822dc0c2da feat(Ads): Support noJump and skipAfter on Alternative Media Presentations (#9246) 2025-10-21 14:28:27 +02:00
Álvaro Velad Galván b2a946ddcf fix(Ads): Do not start interstitials when the main video paused (#9242)
IMA has the same behavior

Fixes https://github.com/shaka-project/shaka-player/issues/9240
2025-10-20 16:05:55 +02:00
Álvaro Velad Galván c52b51bc05 fix: Don't cancel trick play on VOD end (#9239)
Currently, when trick play is performed and the content ends, if the
user presses play again, the trick play has been canceled. This is not
desired.
2025-10-17 20:12:29 +02:00
Álvaro Velad Galván 3c91c16a97 feat: Temporarily increase of segmentPrefetchLimit at high playback rates (#9231) 2025-10-17 11:18:21 +02:00
Álvaro Velad Galván 0890c2c22a fix: Validate prefetched variant in preload manager (#9213)
Fixes https://github.com/shaka-project/shaka-player/issues/9211
2025-10-17 11:17:56 +02:00
Álvaro Velad Galván 8a0cdfb9a5 fix: Make selectVideoTrack more resilient when using HLS with audio groups (#9232) 2025-10-17 09:43:36 +02:00
Álvaro Velad Galván a384e0c02d fix(HLS): Fix bandwidth detection (#9230)
Previously, AVERAGE-BANDWIDTH was prioritized over BANDWIDTH, but this
produces undesirable results when peaks are reproduced and the ABR is
unable to act.
2025-10-16 14:29:14 +02:00
Álvaro Velad Galván ee003012d4 fix(Offline): Fix playback of streams with audio muxed in video (#9229)
Fixes https://github.com/shaka-project/shaka-player/issues/9223
2025-10-16 12:47:57 +02:00
Álvaro Velad Galván e7c0a01e8a feat(HLS): Remove enableAudioGroups usage (#9228)
Many HLS streams use different audio groups for SD, HD, or 4K,
preventing the player from adapting correctly.
2025-10-16 11:40:45 +02:00
Álvaro Velad Galván c3cb63fd94 fix(Queue): Fix start time when go to previous item (#9222)
In this case we do not want to save the original position
2025-10-16 09:36:12 +02:00
Álvaro Velad Galván c3ccf8f802 fix(HLS): Fix handling of multiple audio groups (#9220) 2025-10-15 16:07:54 +02:00
Álvaro Velad Galván 772b557b16 fix(Ads): Only support mutipleMediaElements when not using native controls (#9217) 2025-10-15 13:46:27 +02:00
Julian Domingo 1ad34975ac feat(HLS): Add a mediaTypes field to shaka.extern.DrmInfo (#9198)
Close https://github.com/shaka-project/shaka-player/issues/9197
2025-10-14 12:53:25 -07:00
Álvaro Velad Galván 9aed4df063 feat: Add native chapters support (#9208) 2025-10-14 16:08:50 +02:00
Álvaro Velad Galván 1d1898d3c7 chore: Simplify fully loaded for src= (#9207) 2025-10-14 16:02:38 +02:00
Álvaro Velad Galván 7ccb20a641 feat(HLS): Add support for com.apple.hls.chapters (#9195)
Spec:
https://developer.apple.com/documentation/http-live-streaming/providing-javascript-object-notation-json-chapters

Add disableChapters config
Update the UI to show chapters if there is only one language Add support
to download chapters

---------

Co-authored-by: Wojciech Tyczyński <tykus160@gmail.com>
2025-10-14 15:20:51 +02:00
Wojciech Tyczyński ed70317a24 perf(Chapters): Check does parser exist before fetching chapters track (#9204)
Do not waste precious bandwidth if we're not even able to parse the
track.
2025-10-14 14:56:57 +02:00
Wojciech Tyczyński 1c7cf18858 chore: Simplify getTextData_() signature (#9205) 2025-10-14 13:50:01 +02:00
Álvaro Velad Galván aa7a9fc391 fix(ABR): Check for the existence of variables (#9201)
Fixes https://github.com/shaka-project/shaka-player/issues/9194
2025-10-14 13:17:21 +02:00
Álvaro Velad Galván 0ecc68c8ad feat(DASH): Add programinformation event (#9202) 2025-10-14 13:16:23 +02:00
Álvaro Velad Galván b4252a603c fix(Ads): Returns VAST <Ad> tag's id attribute in getAdId() (#9200)
Fixes https://github.com/shaka-project/shaka-player/issues/9199
2025-10-14 11:00:45 +02:00
Constanza Dibueno f5261362b9 fix(CMCDv2): Memory leaks with ts param on request mode (#9193)
Fixes https://github.com/shaka-project/shaka-player/issues/9187

This PR fixes:
- Memory leaks on requestTimestampMap_  map

The issue was identified in the request mode workflow, where the
requestTimestampMap was growing with each request. Cleanup logic has
been implemented for better handling. Response mode already handles its
own cleanup, and Event mode does not depend on this map.
2025-10-14 09:28:09 +02:00
Álvaro Velad Galván 454a28582f feat(Ads): Apply disableTrackingEvents config to MediaTailor (#9189)
Also rename disableInterstitialTrackingEvents to disableTrackingEvents
2025-10-13 23:00:56 +02:00
Álvaro Velad Galván 3ccae4826f chore(Ads): Create shaka.ads.AbstractAd class to remove duplicate code (#9190) 2025-10-10 17:44:56 +02:00
Subhan Ahmed a09d18e8f4 feat(ads): Add option to disable snapback behavior in ad settings (#9188)
This PR introduces a new `ads.disableSnapback` configuration option to
Shaka Player. When enabled, this option disables snapback behavior
during ad breaks, allowing playback to continue from the user's seek
position instead of rewinding to unplayed ads.
2025-10-10 10:24:02 +02:00
Romualdas Paskevicius f7c7d2a178 fix(UI): Add LCEVC label in resolution menu (#9186)
This PR adds `isLCEVC` check to the `basicResolutionComparison` and
appends `'LCEVC'` to the label text in `getResolutionLabel_` if the
track is LCEVC. This makes it easier to tell LCEVC profiles apart and
fixes an issue we were seeing when many different Dual-Track profiles
are contained in the manifest, it might be hard to differentiate them
(e.g. base and LCEVC profile with the same 1080p resolution).
2025-10-09 16:37:59 +02:00
Álvaro Velad Galván 1e0dceee8f fix: Fix HDR detection on WebOS on compiled builds (#9185)
Fixes https://github.com/shaka-project/shaka-player/issues/9184
2025-10-09 15:16:48 +02:00
Álvaro Velad Galván 840ca96571 feat(Ads): Add basic SVTA2053-2 support (#9172)
Spec: https://www.svta.org/product/svta2053-2/

A new admanager has been created to manage this.

The new admanager works with SSAI and SGAI.

This new ad manager essentially manages ad tracking, but it's also
possible to have all ad events and disable tracking via configuration.
2025-10-09 13:27:34 +02:00