Closed Bug 1499137 Opened Last year Closed Last year

Prime Videos no longer plays on Android

Categories

(Core :: Audio/Video: Playback, defect, P2)

ARM
Android
defect

Tracking

()

RESOLVED FIXED
mozilla64
Tracking Status
firefox-esr60 --- unaffected
firefox62 --- unaffected
firefox63 --- unaffected
firefox64 --- fixed

People

(Reporter: jya, Assigned: jhlin)

References

Details

(Keywords: regression)

Attachments

(1 file)

This is a recent regression.

Watching Prime Videos no longer work.

This is a recent regression
How to reproduce.

On Firefox Nightly on Android, go to https://www.primevideo.com
select to get Desktop content.

Attempt to watch a video.

What happes: playback shows the Amazon Prime jingle, after 5s an error occur
What should happen: the video plays
Blocks: 1495907
Keywords: regression
The cause: remote decoder process is killed [1] (after all codec proxies are released [2]) while the MediaDrmBridge is still alive, which the CDM proxy is aware of and will reuse it in future decoding session, which causes errors.

[1] https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/MediaManager.java#53
[2] https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/RemoteManager.java#205
For context: I had to add the termination code to support crash reporting in Firefox Reality. The problem I was having was when the gecko parent process crashed, the spawned crash reporter service needs to wait for all the processes to end before restarting the application to handle the crash data. When the media service was started, it would never shutdown on parent process crash and the crash service would get stuck waiting until the system killed it. Firefox Reality would then never get restarted and the crash would not get reported.
Why kill the decoder process when the parent crashed? Right now it's killed even when the parent doesn't crash.
Killing the decoder process when the parent process is dead sounds reasonable to me. Perhaps we should kill the process through death recipient (or explicit command if the crash reporter can issue one) rather than when service unbinding.

Also, I think we should move the list of active MediaDrmProxy [1] to RemoteManager so it can keep track of that and unbind the manager service only when all codecs and DRM bridges are gone. 

[1] https://searchfox.org/mozilla-central/source/mobile/android/geckoview/src/main/java/org/mozilla/gecko/media/MediaDrmProxy.java#43
The 2nd part in the previous comment alone should be able to address the regression in this bug. To meet the soft code freeze deadline, I will open another bug for the 1st part in case I cannot make it by this weekend.
Rank: 15
Priority: -- → P2
Attachment #9017362 - Attachment description: Bug 1499137 - unbind media manager service only when both codecs and DRM bridges are gone. r?jchen!,jya! → Bug 1499137 - unbind media manager service only when both codecs and DRM bridges are gone. r?snorp!,jya!
Pushed by jolin@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d72b8e9bac3f
unbind media manager service only when both codecs and DRM bridges are gone. r=jya,snorp
https://hg.mozilla.org/mozilla-central/rev/d72b8e9bac3f
Status: NEW → RESOLVED
Closed: Last year
Resolution: --- → FIXED
Target Milestone: --- → mozilla64
Assignee: nobody → jolin
https://hg.mozilla.org/projects/larch/rev/d72b8e9bac3f8eead0f679b5ad07f9b1b6a7e7d8
Bug 1499137 - unbind media manager service only when both codecs and DRM bridges are gone. r=jya,snorp
You need to log in before you can comment on or make changes to this bug.