Closed Bug 973706 Opened 6 years ago Closed 6 years ago

Fix broken Casting:Stop functionality

Categories

(Firefox for Android :: General, defect)

x86_64
Linux
defect
Not set

Tracking

()

RESOLVED FIXED
Firefox 30

People

(Reporter: mfinkle, Unassigned)

Details

Attachments

(1 file)

I had tried to remove CastingApps.closeExternal during the final review stages, but now discovered that we need the code to support the Stop/Disconnect code. This patch adds it back.
Attachment #8377279 - Flags: review?(wjohnston)
Comment on attachment 8377279 [details] [diff] [review]
fix-casting-stop v0.1

Review of attachment 8377279 [details] [diff] [review]:
-----------------------------------------------------------------

::: mobile/android/chrome/content/CastingApps.js
@@ +249,5 @@
>      }
>  
>      let status = aRemoteMedia.status;
>      if (status == "completed") {
> +      this.closeExternal();

Can you provide more context here? AFAICT, the only difference here is that you're using this.session.removeMedia instead of aRemoteMedia, Are they not the same?
Comment on attachment 8377279 [details] [diff] [review]
fix-casting-stop v0.1

The patch context doesn't include it, but "closeExternal()" is currently being called from here too:
http://mxr.mozilla.org/mozilla-central/source/mobile/android/chrome/content/CastingApps.js#54

So we have two places in the code that want to "close the connection". Putting that code in a method is cleaner. The exiting code is calling a method that currently doesn't exist :)
Comment on attachment 8377279 [details] [diff] [review]
fix-casting-stop v0.1

Review of attachment 8377279 [details] [diff] [review]:
-----------------------------------------------------------------

Thanks
Attachment #8377279 - Flags: review?(wjohnston) → review+
https://hg.mozilla.org/mozilla-central/rev/56d6251080cf
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 30
You need to log in before you can comment on or make changes to this bug.