GeckoSession.MediaDelegate.onRecordingStatusChanged() not called when navigating away
Categories
(GeckoView :: Media, defect, P1)
Tracking
(firefox67 wontfix, firefox67.0.1 wontfix, firefox68 fixed, firefox69 fixed)
People
(Reporter: sebastian, Assigned: fluffyemily)
References
Details
(Whiteboard: [geckoview:fenix:m6])
Attachments
(1 file)
47 bytes,
text/x-phabricator-request
|
jcristau
:
approval-mozilla-beta+
|
Details | Review |
STR:
- Go to a website that uses the camera (e.g. https://webrtc.github.io/samples/)
- Observe
onRecordingStatusChanged()
getting called with a CAMERA device - Navigate to another page
Expected:
onRecordingStatusChanged()
getting called again with an empty device list
Actual:
onRecordingStatusChanged()
not getting called.
Alternatively I could listen to a different event to clear the recording status - but which one? As a workaround I cleared the state from GeckoSession.NavigationDelegate.onLocationChange
- but I assume a location change does not mean that no device is recording anymore?
Reporter | ||
Comment 1•6 years ago
|
||
Comparing with GeckoSession.MediaDelegate.onMediaAdd() / onMediaRemove()
: I see onMediaRemove()
getting called when leaving the page that contains media.
Reporter | ||
Updated•6 years ago
|
Updated•6 years ago
|
Assignee | ||
Comment 2•6 years ago
|
||
This is caused because, when navigating away from a page while video is recording, the dispatcher is no longer present at the point we are fetching it causing the attempt to send the GeckoView:MediaRecordingStatusChanged
from JS to Java to fail. This fix is to fetch the dispatcher earlier in the function to ensure it remains present when the message is sent.
Assignee | ||
Comment 3•6 years ago
|
||
This is because in some circumstances, when navigating away from a page, the dispatcher is no longer present when trying to send the GeckoView:MediaRecordingStatusChanged
causing the message not to be sent. Fetching the dispatcher earlier ensures that it is present at the point of message sending.
Comment 5•6 years ago
|
||
Retroactively assigning to Emily since she fixed this bug. We should uplift to GV 68 Beta for Fenix MVP.
Comment 6•6 years ago
|
||
bugherder |
Assignee | ||
Comment 8•6 years ago
|
||
Comment on attachment 9068029 [details]
Bug 1554778 - Fetch dispatcher at the beginning of handleRecordingDeviceEvents
.
Beta/Release Uplift Approval Request
- User impact if declined: Important bugfix recording device status API for Fenix. Without this there are cases where the API methods are not called.
- Is this code covered by automated tests?: Yes
- Has the fix been verified in Nightly?: Yes
- Needs manual test from QE?: No
- If yes, steps to reproduce:
- List of other uplifts needed: Bug 1549633
- Risk to taking this patch: Low
- Why is the change risky/not risky? (and alternatives if risky):
- String changes made/needed:
Comment 9•6 years ago
|
||
Comment on attachment 9068029 [details]
Bug 1554778 - Fetch dispatcher at the beginning of handleRecordingDeviceEvents
.
approved for beta68
Comment 10•6 years ago
|
||
bugherder uplift |
Comment 11•2 years ago
|
||
Moving some media bugs to the new GeckoView::Media component.
Description
•