Closed Bug 1009327 Opened 11 years ago Closed 11 years ago

Add "manual connect" to Android about:devices page

Categories

(Firefox for Android Graveyard :: Screencasting, defect)

All
Android
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 32

People

(Reporter: nalexander, Assigned: nalexander)

References

Details

Attachments

(2 files)

No description provided.
Still no styling.
Attachment #8421439 - Flags: review?(mark.finkle)
Comment on attachment 8421439 [details] [diff] [review] Add "manual connect" to Android about:devices page. r=mfinkle >diff --git a/mobile/android/chrome/content/aboutDevices.js b/mobile/android/chrome/content/aboutDevices.js >+ _prefsBranch: Services.prefs.getBranch("browser.casting."), >+ let manual = document.getElementById("manual"); >+ manual.addEventListener("submit", (evt) => { >+ this.connectManually(evt); >+ }, false); You're using a <form> which might have some side effects, one of which might be the need to preventDefault, but you could just use a <div> for containment and styling, and attach an event to the button itself. And use a <button> >+ let fixedTarget = {}; >+ fixedTarget.target = "roku:ecp"; >+ fixedTarget.location = "http://" + ip + ":8060"; We should think about creating a <select> list, with "Roku" for now, and use it to pick the target and port. We'll likely add "Chromecast" (maybe) and "Netcast" when support for those lands. >+ this._prefsBranch.setCharPref("fixedTargets", JSON.stringify(fixedTargets)); Not sure we need to hold the prefsBranch as a data member for just this usage. You could just make it local to this method. Do you want to take a swing at not using a <form> and adding a <select> for the initial landing? I have more feedback on making this work a bit nicer, but that can wait for v2.
Attachment #8421439 - Flags: review?(mark.finkle) → feedback+
(In reply to Mark Finkle (:mfinkle) from comment #2) > Comment on attachment 8421439 [details] [diff] [review] > Add "manual connect" to Android about:devices page. r=mfinkle > > >diff --git a/mobile/android/chrome/content/aboutDevices.js b/mobile/android/chrome/content/aboutDevices.js > > >+ _prefsBranch: Services.prefs.getBranch("browser.casting."), > > >+ let manual = document.getElementById("manual"); > >+ manual.addEventListener("submit", (evt) => { > >+ this.connectManually(evt); > >+ }, false); > > You're using a <form> which might have some side effects, one of which might > be the need to preventDefault, but you could just use a <div> for > containment and styling, and attach an event to the button itself. And use a > <button> I did wonder about this, but followed some existing stuff from aboutFeedback. Happy to update. > >+ let fixedTarget = {}; > >+ fixedTarget.target = "roku:ecp"; > >+ fixedTarget.location = "http://" + ip + ":8060"; > > We should think about creating a <select> list, with "Roku" for now, and use > it to pick the target and port. We'll likely add "Chromecast" (maybe) and > "Netcast" when support for those lands. That's a good idea. > >+ this._prefsBranch.setCharPref("fixedTargets", JSON.stringify(fixedTargets)); > > Not sure we need to hold the prefsBranch as a data member for just this > usage. You could just make it local to this method. > > Do you want to take a swing at not using a <form> and adding a <select> for > the initial landing? I have more feedback on making this work a bit nicer, > but that can wait for v2. This patch is so small, might as well suggest what we eventually want and I'll incorporate more.
Take two; I'll add a part 2 with fixed-but-not-found target display.
Attachment #8422862 - Flags: review?(mark.finkle)
Attachment #8422862 - Flags: review?(mark.finkle) → review+
Assignee: nobody → nalexander
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 32
I can not add my Roku device manually; I filled in the IP address field with Roku's valid IP address, I tapped on the 'Connect manually' button and nothing happens. The following log is outputted in logcat when I tap on the 'Connect manually' button: E/GeckoConsole(7901): aboutDevices :: Updating device list with 0 services.
Please file a new bug and block it against this.
Depends on: 1028932
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: