-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
fix(Cast): Force TS content to be transmuxed on Chromecast #6262
fix(Cast): Force TS content to be transmuxed on Chromecast #6262
Conversation
Although Chromecast natively supports TS content, it does not work in all cases. In particular, we have some sample live streams where some TS segments can be parsed by external tools as valid TS, but cause the Chromecast to throw a parsing error. We should reject TS content on Chromecast, and allow the builtin transmuxer to take over parsing. This also removes the use of cast.__platform__.canDisplayType to patch MediaSource.isTypeSupported on Chromecast. Current versions of Shaka Player are doing very rough filtering with isTypeSupported before calling MediaCapabilities.decodingInfo. And our MediaCapabilities polyfill calls cast.__platform__.canDisplayType directly, bypassing any polyfill we might install on isTypeSupported. So there is no longer any purpose to canDisplayType in isTypeSupported. Closes shaka-project#5278
Incremental code coverage: 80.00% |
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.
Not a request for this particular CL, but IMHO this file is better to have unit tests given it has some logic.
@joeyparrish Since TS causes so many problems, I wonder if we shouldn't reject it on all platforms and always use the transmuxer... |
We are practically there already. I'm okay with it. Or maybe it should be a config that's on by default, to give partners a choice about risking the native TS on a platform to save some CPU cycles. |
I would add a configuration to be able to use native TS or not, and if you do not have a transmuxer, always use the native one. And the default should always be to use the transmuxer for TS. With this code you always block TS even if it works in some cases (for example in VOD). My opinion is that it should be configurable... |
I agree. That sounds good to me. Let's make it an option that is not platform-specific, which defaults to always transmuxing TS when we can. |
Although Chromecast natively supports TS content, it does not work in all cases. In particular, we have some sample live streams where some TS segments can be parsed by external tools as valid TS, but cause the Chromecast to throw a parsing error. We should reject TS content on Chromecast, and allow the builtin transmuxer to take over parsing. This also removes the use of `cast.__platform__.canDisplayType` to patch MediaSource.isTypeSupported on Chromecast. Current versions of Shaka Player are doing very rough filtering with isTypeSupported before calling MediaCapabilities.decodingInfo. And our MediaCapabilities polyfill calls `cast.__platform__.canDisplayType` directly, bypassing any polyfill we might install on isTypeSupported. So there is no longer any purpose to canDisplayType in isTypeSupported. Closes #5278
Although Chromecast natively supports TS content, it does not work in all cases. In particular, we have some sample live streams where some TS segments can be parsed by external tools as valid TS, but cause the Chromecast to throw a parsing error. We should reject TS content on Chromecast, and allow the builtin transmuxer to take over parsing. This also removes the use of `cast.__platform__.canDisplayType` to patch MediaSource.isTypeSupported on Chromecast. Current versions of Shaka Player are doing very rough filtering with isTypeSupported before calling MediaCapabilities.decodingInfo. And our MediaCapabilities polyfill calls `cast.__platform__.canDisplayType` directly, bypassing any polyfill we might install on isTypeSupported. So there is no longer any purpose to canDisplayType in isTypeSupported. Closes #5278
Although Chromecast natively supports TS content, it does not work in all cases. In particular, we have some sample live streams where some TS segments can be parsed by external tools as valid TS, but cause the Chromecast to throw a parsing error. We should reject TS content on Chromecast, and allow the builtin transmuxer to take over parsing. This also removes the use of `cast.__platform__.canDisplayType` to patch MediaSource.isTypeSupported on Chromecast. Current versions of Shaka Player are doing very rough filtering with isTypeSupported before calling MediaCapabilities.decodingInfo. And our MediaCapabilities polyfill calls `cast.__platform__.canDisplayType` directly, bypassing any polyfill we might install on isTypeSupported. So there is no longer any purpose to canDisplayType in isTypeSupported. Closes #5278
Although Chromecast natively supports TS content, it does not work in all cases. In particular, we have some sample live streams where some TS segments can be parsed by external tools as valid TS, but cause the Chromecast to throw a parsing error.
We should reject TS content on Chromecast, and allow the builtin transmuxer to take over parsing.
This also removes the use of
cast.__platform__.canDisplayType
to patch MediaSource.isTypeSupported on Chromecast. Current versions of Shaka Player are doing very rough filtering with isTypeSupported before calling MediaCapabilities.decodingInfo. And our MediaCapabilities polyfill callscast.__platform__.canDisplayType
directly, bypassing any polyfill we might install on isTypeSupported. So there is no longer any purpose to canDisplayType in isTypeSupported.Closes #5278