Open Bug 1464822 Opened 6 years ago Updated 2 years ago

EME: Some encrypted content can't ever worked on Android

Categories

(Core :: Audio/Video: Playback, enhancement, P3)

Unspecified
Android
enhancement

Tracking

()

People

(Reporter: jya, Unassigned)

References

(Blocks 1 open bug)

Details

When used with a CDM on Android, the PDMFactory will always use an AndroidDecoderModule.cpp

https://searchfox.org/mozilla-central/rev/5a744713370ec47969595e369fd5125f123e6d24/dom/media/platforms/PDMFactory.cpp#459

When we then attempt to create an audio decoder: https://searchfox.org/mozilla-central/rev/5a744713370ec47969595e369fd5125f123e6d24/dom/media/platforms/android/AndroidDecoderModule.cpp#139

or a video decoder:
https://searchfox.org/mozilla-central/rev/5a744713370ec47969595e369fd5125f123e6d24/dom/media/platforms/android/AndroidDecoderModule.cpp#120

We wrap then Android RemoteDataDecoder inside a EMEMediaDataDecoderProxy (https://searchfox.org/mozilla-central/rev/5a744713370ec47969595e369fd5125f123e6d24/dom/media/platforms/android/RemoteDataDecoder.cpp#423)

However, this assumes that the original RemoteDataDecoder can decode the codec to start with.

However, this is not always the case, and the AndroidDecoderModule::SupportsMimeType normally would have checked which codecs were actually supported (https://searchfox.org/mozilla-central/rev/5a744713370ec47969595e369fd5125f123e6d24/dom/media/platforms/android/AndroidDecoderModule.cpp#78)

Opus, Vorbis, Wave and other codecs aren't supported by default. VP8 and VP9 also aren't supported unless hardware accelerated.

The Android's RemoteDataDecoder shouldn't be unconditionally used whenever a CDMProxy is set... It can't work for any of the codecs mentioned above.
Here is an example of a stream that do not play: https://shaka-player-demo.appspot.com/demo/#asset=https://storage.googleapis.com/shaka-demo-assets/_bugs/firefox-clear-then-encrypted/short.mpd;license=https://cwip-shaka-proxy.appspot.com/no_auth;lang=en-US;play;build=uncompiled

it's encrypted Opus.

Now, it may be that on Android we can't play that file anyway (chrome fails to play it too, but for other reasons)
Priority: -- → P3
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.