I got in touch with some people at TiVo OS and they're willing to help
out with proper device support.
This is a draft as we'll have to figure out the details (eg; max
resolution probing, HDR capabilities) along the way.
Caveats
- Earlier versions of BMW run on Linux, with user agent "Mozilla/5.0
(X11; Linux aarch64) AppleWebKit/573.36 (KHTML, like Gecko)
Chrome/126.1.0.0.0 Safari/537.36 BMW/156", which is TiVo under the hood.
Current implementation wouldn't match this but there's a few config
variables that need to be adjusted (eg; CrossBoundaryStrategy RESET).
- I have yet to check if newer BMW's (run on Android) contain TiVoOS in
their user agent.
- TiVo is a new player in the TV market, they ship their OS with various
vendors. I shall yet have to receive proper info of what runs where.
---------
Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>
Ran a multi codec test and transitioning from AAC to AC3 fails silently
on Hisense VIDAA (there's no audio), despite `changeType` indicating
else wise.
We should disable SMOOTH for this device, similar to Tizen and webOS.
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.
### 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.
The goal is to simplify and abstract feature logic detection. Currently
lots of places depend on various calls to `shaka.util.Platform` and
mainteinance of this is hard & not easy to read.
By introducing device API ideally rest of the player logic would look
into device features instead of directly checking platform. Additionally
we can more easily cache needed values, so we won't have to parse user
agent several times anymore.
---------
Co-authored-by: Álvaro Velad Galván <ladvan91@hotmail.com>