-
Notifications
You must be signed in to change notification settings - Fork 1.4k
fix(HLS): Fix missing DRM variants with preferredKeySystems #9452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
fix(HLS): Fix missing DRM variants with preferredKeySystems #9452
Conversation
When we filter HLS variants by decoding info, those not yet loaded will have no DRM info (yet). Because of this, we should consider all variants without DRM info as compatible with any known-DRM variants. When we have the right info later, we should re-check the decoding info. This code path is specific to the preferredKeySystems config, so applications that don't use that config would not experience this bug. Applications or content not using DRM would also not run into this bug. Due to the way CAF processes Shaka's tracks further, Shaka's missing variants can lead to CAF missing entire languages for apps using preferredKeySystems.
|
Incremental code coverage: 100.00% |
|
@shaka-bot test |
|
@avelad: Lab tests started with arguments:
|
| const variants = this.streamToVariants_.get(stream) || new Set(); | ||
| for (const variant of variants) { | ||
| variant.decodingInfos = []; | ||
| } | ||
|
|
||
| if (this.manifest_) { | ||
| await this.playerInterface_.filter(this.manifest_); | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code block is causing load hangs on android-based Cast devices, which can be repro'd by using a fresh top-of-tree build of v4.16.11, and patching this entire PR.
But the load hangs stop if I specifically comment out this block of code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it truly hangs, that means the Promise isn't resolved. I'll need to dig through the individual awaits within this call to find the one that's hanging.
|
I'm going to simplify this as much as possible and avoid making the filtering situation more complex than it already is. |
|
@joeyparrish do you have any update? |
When we filter HLS variants by decoding info, those not yet loaded will have no DRM info (yet). Because of this, we should consider all variants without DRM info as compatible with any known-DRM variants. When we have the right info later, we should re-check the decoding info.
This code path is specific to the preferredKeySystems config, so applications that don't use that config would not experience this bug. Applications or content not using DRM would also not run into this bug.
Due to the way CAF processes Shaka's tracks further, Shaka's missing variants can lead to CAF missing entire languages for apps using preferredKeySystems.