Closed
Bug 1222306
Opened 9 years ago
Closed 9 years ago
[TV 2.5] Expose remote control service via mDNS
Categories
(Firefox OS Graveyard :: Gaia::TV::System, defect)
Tracking
(blocking-b2g:2.6+)
RESOLVED
DUPLICATE
of bug 1197749
blocking-b2g | 2.6+ |
People
(Reporter: lchang, Assigned: etsai)
References
Details
(Whiteboard: [ft:conndevices])
Attachments
(1 file)
To provide a seamless experience, we would like to expose remote control service via mDNS.
Updated•9 years ago
|
Blocks: conn_priority
Updated•9 years ago
|
Whiteboard: [ft:conndevices]
Updated•9 years ago
|
Whiteboard: [ft:conndevices] → [ft:conndevices][partner-blocker][partner-cherry-pick]
Updated•9 years ago
|
feature-b2g: --- → 2.5+
Comment 1•9 years ago
|
||
We can use |nsIDNSServiceDiscovery.registerService()|[1] to broadcast the control page via mDNS. DNS-SD already defined a "http" service type for it [2].
Here is the pseudo code for it.
let serviceInfo = Cc["@mozilla.org/toolkit/components/mdnsresponder/dns-info;1"].createInstance(Ci.nsIDNSServiceInfo);
serviceInfo.serviceType = "_http._tcp";
serviceInfo.serviceName = Services.prefs.getCharPref("dom.presentation.device.name");
serviceInfo.port = ... //the port number of http server
let attributes = Cc["@mozilla.org/hash-property-bag;1"].createInstance(Ci.nsIWritablePropertyBag2);
attributes.setPropertyAsACString("path", "/index.html");
serviceInfo.attributes = attributes;
let mdns = Cc["@mozilla.org/toolkit/components/mdnsresponder/dns-sd;1"].getService(Ci.nsIDNSServiceDiscovery);
mdns.registerService(serviceInfo, some_listener);
[1] https://dxr.mozilla.org/mozilla-central/source/netwerk/dns/mdns/nsIDNSServiceDiscovery.idl#201
[2] http://www.dns-sd.org/txtrecords.html#http
Comment 2•9 years ago
|
||
It's seems that we don't expose |attributes| to fennec now[1].
[1] https://dxr.mozilla.org/mozilla-central/source/mobile/android/base/mdns/MulticastDNSManager.java#197
Assignee | ||
Comment 3•9 years ago
|
||
Updated•9 years ago
|
feature-b2g: 2.5+ → 2.6+
Updated•9 years ago
|
blocking-b2g: --- → 2.6?
feature-b2g: 2.6+ → ---
Whiteboard: [ft:conndevices][partner-blocker][partner-cherry-pick] → [ft:conndevices][partner-blocker]
Updated•9 years ago
|
blocking-b2g: 2.6? → 2.6+
Whiteboard: [ft:conndevices][partner-blocker] → [ft:conndevices]
Updated•9 years ago
|
Assignee: nobody → etsai
Assignee | ||
Updated•9 years ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•