Skip to content
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

Android-based Chromecast devices error out on MediaCapabilities#decodingInfo(). #4569

Closed
JulianDomingo opened this issue Oct 11, 2022 · 1 comment · Fixed by #4570
Closed
Assignees
Labels
platform: Cast Issues affecting Cast devices priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Milestone

Comments

@JulianDomingo
Copy link
Contributor

Have you read the FAQ and checked for duplicate open issues?
Yes, #3818 relates to the same API, but not for issues on Chromecast.

What version of Shaka Player are you using?
v4.2.2. All latest release branches exhibit the same behavior where MediaCapabilities#decodingInfo is included in Shaka's variant filtering logic.

Can you reproduce the issue with our latest release version?
Yes (see above).

Can you reproduce the issue with the latest code from main?
Yes (see above).

Are you using the demo app or your own custom app?
Custom app (Cast receiver application), but demo app is inapplicable for Chromecast devices.

If custom app, can you reproduce the issue using our demo app?
No, but only because native Chrome browser does not implement MediaCapabilities#decodingInfo() the same way as the Chromecast platform.

What browser and OS are you using?
Chrome, CastOS.

For embedded devices (smart TVs, etc.), what model and firmware version are you using?
Chromecast with Google TV, Google Nest Hub

What are the manifest and license server URIs?
Any TS-based HLS playlist will work, e.g., https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8.

What configuration are you using? What is the output of player.getConfiguration()?
Default player configuration.

What did you do?
Simply load the sample manifest above on a Cast receiver application. Most Cast developers today use https://casttool.appspot.com/cactool/ for debugging. Go to chrome://inpsect and open the dev console for the Cast receiver session process, and observe the following error thrown:

shaka-player.compiled.debug.js:290 MediaCapabilities.decodingInfo() failed. {
   "type":"media-source",
   "audio":{
      "contentType":"video/mp2t; codecs=\"mp4a.40.2\"",
      "channels":2,
      "bitrate":8247438,
      "samplerate":1,
      "spatialRendering":false
   },
   "video":{
      "contentType":"video/mp2t; codecs=\"avc1.42E01E\"",
      "width":1920,
      "height":800,
      "bitrate":8247438,
      "framerate":1
   }
}
TypeError: Failed to execute 'decodingInfo' on 'MediaCapabilities': The audio configuration dictionary is not valid.
    at $jscomp.generator.Engine_.program_ 

What did you expect to happen?
Content loading should execute error-free.

What actually happened?
Player LOAD fails and throws the MediaCapabilities#decodingInfo() error above. As you can see, the error is due to the Chromecast platform not respecting the MIME type video/mp2t for the audio configuration object passed to MediaCapabilities#decodingInfo().

Technically, W3C specs indicate a valid audio configuration CANNOT contain a video/ prefix (see https://w3c.github.io/media-capabilities/#dictdef-audioconfiguration => https://w3c.github.io/media-capabilities/#valid-audio-mime-type). However, it seems browsers today make an exception to this rule for TS-based media.

@JulianDomingo JulianDomingo added type: bug Something isn't working correctly platform: Cast Issues affecting Cast devices labels Oct 11, 2022
@JulianDomingo JulianDomingo self-assigned this Oct 11, 2022
@JulianDomingo
Copy link
Contributor Author

A trivial solution is to always enable MCap polyfills for Android-based Cast devices, too.

@github-actions github-actions bot added this to the v4.3 milestone Oct 11, 2022
JulianDomingo added a commit that referenced this issue Oct 13, 2022
… devices (#4569). (#4570)

See #4569 for more
context.

This affects any Chromecast model which contains the substring `Android`
in their userAgent. For TS content, this causes Shaka to incorrectly
filter all stream variants leaving nothing for the player to select for
playback (resulting in a `4032` error):
https://github.com/shaka-project/shaka-player/blob/757b34e5959f14c9a5b5aed173cc99d98a794a40/lib/util/stream_utils.js#L484-L491.
joeyparrish pushed a commit to joeyparrish/shaka-player that referenced this issue Oct 14, 2022
… devices (shaka-project#4569). (shaka-project#4570)

See shaka-project#4569 for more
context.

This affects any Chromecast model which contains the substring `Android`
in their userAgent. For TS content, this causes Shaka to incorrectly
filter all stream variants leaving nothing for the player to select for
playback (resulting in a `4032` error):
https://github.com/shaka-project/shaka-player/blob/757b34e5959f14c9a5b5aed173cc99d98a794a40/lib/util/stream_utils.js#L484-L491.
joeyparrish pushed a commit that referenced this issue Oct 14, 2022
… devices (#4569). (#4570)

See #4569 for more
context.

This affects any Chromecast model which contains the substring `Android`
in their userAgent. For TS content, this causes Shaka to incorrectly
filter all stream variants leaving nothing for the player to select for
playback (resulting in a `4032` error):
https://github.com/shaka-project/shaka-player/blob/757b34e5959f14c9a5b5aed173cc99d98a794a40/lib/util/stream_utils.js#L484-L491.
joeyparrish pushed a commit that referenced this issue Oct 18, 2022
… devices (#4569). (#4570)

See #4569 for more
context.

This affects any Chromecast model which contains the substring `Android`
in their userAgent. For TS content, this causes Shaka to incorrectly
filter all stream variants leaving nothing for the player to select for
playback (resulting in a `4032` error):
https://github.com/shaka-project/shaka-player/blob/757b34e5959f14c9a5b5aed173cc99d98a794a40/lib/util/stream_utils.js#L484-L491.
joeyparrish pushed a commit that referenced this issue Oct 18, 2022
… devices (#4569). (#4570)

See #4569 for more
context.

This affects any Chromecast model which contains the substring `Android`
in their userAgent. For TS content, this causes Shaka to incorrectly
filter all stream variants leaving nothing for the player to select for
playback (resulting in a `4032` error):
https://github.com/shaka-project/shaka-player/blob/757b34e5959f14c9a5b5aed173cc99d98a794a40/lib/util/stream_utils.js#L484-L491.
@avelad avelad closed this as completed Oct 31, 2022
@joeyparrish joeyparrish added the priority: P1 Big impact or workaround impractical; resolve before feature release label Oct 31, 2022
@github-actions github-actions bot added the status: archived Archived and locked; will not be updated label Dec 30, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform: Cast Issues affecting Cast devices priority: P1 Big impact or workaround impractical; resolve before feature release status: archived Archived and locked; will not be updated type: bug Something isn't working correctly
Projects
None yet
3 participants