Closed Bug 1161440 Opened 4 years ago Closed 4 years ago

[Presentation WebAPI] trusted UI for device selection on Firefox OS

Categories

(Firefox OS Graveyard :: Gaia::System::System UI, defect)

ARM
Gonk (Firefox OS)
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: schien, Assigned: schien)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [ft:conndevices][partner-blocker])

Attachments

(1 file, 1 obsolete file)

We need a trusted UI for device selection in order to implement Presentation WebAPI.

The available device list can be obtained via navigator.mozPresentationDeviceInfo API [1]. The device selection event/result will be delivered via mozChromeEvent/mozContentEvent, see [2] for more detail.

[1] https://dxr.mozilla.org/mozilla-central/source/dom/webidl/PresentationDeviceInfoManager.webidl
[2] https://dxr.mozilla.org/mozilla-central/source/b2g/components/B2GPresentationDevicePrompt.js#62
feature-b2g: --- → 2.5+
Priority: -- → P1
This bug is for Firefox OS device as controller (e.g. phone). Do we have any user story for b2g phone controlling TV?
Flags: needinfo?(jcheng)
we only have these for now but yes i think it will be a good idea to have a b2g/desktop user story as well
Bug 1187861 - [TV 2.5] Control video or audio playback on TV from Fennec 
Bug 1187863 - [TV 2.5] Display “remote control my TV” icon on Fennec when compatible TV is around
Whiteboard: [ft:conndevices][partner-blocker]
feature-b2g: 2.5+ → ---
Priority: P1 → --
Flags: needinfo?(jcheng)
Attached patch [WIP] gaia.patch (obsolete) — Splinter Review
This is a WIP for Mozlando demo. I reuse multi_screen_controller.js so it can handle both device selection for both Presentation API and multi screen.
Attachment #8691877 - Attachment is obsolete: true
Attachment #8692808 - Flags: review?(lchang)
Assignee: nobody → schien
Comment on attachment 8692808 [details] [review]
[gaia] schien:bug1161440 > mozilla-b2g:master

Looks good except some nits. Please take a look at my comments on GitHub. Thanks.
Attachment #8692808 - Flags: review?(lchang)
Comment on attachment 8692808 [details] [review]
[gaia] schien:bug1161440 > mozilla-b2g:master

patch updated according to review comments.
Attachment #8692808 - Flags: review?(lchang)
I left some questions on GitHub. Thanks.
Flags: needinfo?(schien)
Thanks for the quick review. patch updated again!
Flags: needinfo?(schien)
Comment on attachment 8692808 [details] [review]
[gaia] schien:bug1161440 > mozilla-b2g:master

Looks good now. Thanks.
Attachment #8692808 - Flags: review?(lchang) → review+
We still need some more gecko patches to default enable presentation API on B2G phone. I decided to remove the change in settings.json and custom-prefs.js so that we can land UI code first. @lchang how do you think?
Flags: needinfo?(lchang)
It's totally fine for me.
Flags: needinfo?(lchang)
The test of MultiScreenController is failed:
https://treeherder.mozilla.org/#/jobs?repo=gaia&revision=196483fe13bdeb95b4de53b6224cfe0858f375d6&selectedJob=3091177

Would you mind fixing it before landing? Also, it would be better if you add some unit tests for protecting your code.
Flags: needinfo?(schien)
Keywords: checkin-needed
Comment on attachment 8692808 [details] [review]
[gaia] schien:bug1161440 > mozilla-b2g:master

test case updated, request for review again.
Flags: needinfo?(schien)
Attachment #8692808 - Flags: review+ → review?(lchang)
Comment on attachment 8692808 [details] [review]
[gaia] schien:bug1161440 > mozilla-b2g:master

It's almost done except some suggestions on GitHub.
Attachment #8692808 - Flags: review?(lchang)
Comment on attachment 8692808 [details] [review]
[gaia] schien:bug1161440 > mozilla-b2g:master

update according to review comments.
Attachment #8692808 - Flags: review?(lchang)
Comment on attachment 8692808 [details] [review]
[gaia] schien:bug1161440 > mozilla-b2g:master

Looks great! Thanks.
Attachment #8692808 - Flags: review?(lchang) → review+
You need to log in before you can comment on or make changes to this bug.