Sending video to Chromecast broke when 1483656 landed

VERIFIED FIXED in Firefox 65

Status

()

defect
P1
normal
VERIFIED FIXED
5 months ago
5 months ago

People

(Reporter: kbrosnan, Assigned: timdream)

Tracking

({regression})

unspecified
Firefox 66
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(relnote-firefox 65+, firefox64 disabled, firefox65+ verified, firefox66+ verified)

Details

Attachments

(3 attachments)

Reporter

Description

5 months ago

Using a Chromecast 2 and Firefox for Android casting a video broke.

Expected:

  • cast icon appears in the url bar

Actual:

  • no cast icon in the url bar

15:31.64 INFO: No more inbound revisions, bisection finished.
15:31.64 INFO: Last good revision: 5d797c6f6f132d76c04dd556c5c2e9fc0ad3cbcb
15:31.64 INFO: First bad revision: 8427d9f7e96a4af62562b697055f294b1e0ab2cb
15:31.64 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=5d797c6f6f132d76c04dd556c5c2e9fc0ad3cbcb&tochange=8427d9f7e96a4af62562b697055f294b1e0ab2cb

Release Note Request (optional, but appreciated)
[Why is this notable]: broken feature in 64
[Affects Firefox for Android]: only
[Suggested wording]: Unable to cast video to Chromecast devices
[Links (documentation, blog post, etc)]:

This is pretty sad, I remembered I manually tested it...

Assignee: nobody → timdream
Status: NEW → ASSIGNED

Hi Kevin,

I can see the casting button showing up on Nightly 66.

Did you try Beta 65? We flipped a pref for Fx65, so this may only be broken on 64, which still uses XBL video controls.

Let me know if 65/66 works for you. If so given that we are weeks away from shipping 65, fixing 64 is probably not possible.

Flags: needinfo?(kbrosnan)

On a related note, this can be greatly benefited if there were tests!

I can see we test for video discovery but we don't test for the visibility of the casting button.

https://searchfox.org/mozilla-central/rev/5053031ba7621fa8f63f42de4c204ab3561e4e59/mobile/android/tests/browser/chrome/test_video_discovery.html

It was probably hard to do in Robocop but I don't know why we didn't do it in a browser chrome test...

OK now I realized what happened. You meant the icon on the URL bar, not the icon on the control bar.

Yeah that's still broken on Nightly.

Flags: needinfo?(kbrosnan)

At least that means we are not breaking Fx64 currently.

This should be fixed by correcting the two lines here.

  [Func="IsChromeOrXBL"] attribute boolean mozAllowCasting;
  [Func="IsChromeOrXBL"] attribute boolean mozIsCasting;

The Func should be IsChromeOrXBLOrUAWidget so that UA Widget can set it, allowing CastingApp.js to look at this property in its compartment. 🤦‍♂️

I would need to do a full Fennec build to verify this.

(In reply to Tim Guan-tin Chien [:timdream] (please needinfo) from comment #7)

https://treeherder.mozilla.org/#/jobs?repo=try&revision=d9ff3e7302ccdd3925678a8e04c5dda0d46b85db

Yeah, it worked locally on my device.

They are needed so the chrome script (CastingApp.js) can read back the state
of the video element.

Comment 10

5 months ago
Pushed by tchien@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/ac94b0e3484b
Make special casting properties available to UA Widget r=smaug

Need uplift.

Flags: needinfo?(timdream)
See Also: → 1520254

Comment 12

5 months ago
bugherder
Status: ASSIGNED → RESOLVED
Closed: 5 months ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 66

Comment on attachment 9036399 [details]
Bug 1518664 - Make special casting properties available to UA Widget r=smaug

[Beta/Release Uplift Approval Request]

Feature/Bug causing the regression: Bug 1483656

User impact if declined: No screencast button on URL bar.

Is this code covered by automated tests?: No

Has the fix been verified in Nightly?: No

Needs manual test from QE?: No

If yes, steps to reproduce:

List of other uplifts needed: None

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): Just a 2 line fix to expose what's left out in bug 1483656

String changes made/needed: none

Flags: needinfo?(timdream)
Attachment #9036399 - Flags: approval-mozilla-beta?
Flags: qe-verify+

Comment on attachment 9036399 [details]
Bug 1518664 - Make special casting properties available to UA Widget r=smaug

[Triage Comment]
Simple fix to bring back the casting option to the URL bar. Approved for 65.0b12. I do think we should have QA verify the fix.

Attachment #9036399 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

Hi all,
Unfortunately, we don't have Chromecast in order to verify this bug. Kevin, could you please verify this? if this is possible. Thanks!

Flags: needinfo?(kbrosnan)

I just tried this on 2 Android Devices, Pixel 3 and Pixel using Beta 12. In both cases when I load the test mp4 I do get an Android icon in the URL bar. If I press this I can successfully cast the page to the Chromecast on my network. (When you say the Cast icon I was thinking of the Google cast icon, but I assume this is the intended behavior - this is not something I usually do so just asking :)

Reporter

Comment 18

5 months ago
Flags: needinfo?(kbrosnan)

Here is a screenshot from the Pixel 3. I currently do not see the cast icon in the URL bar on either of my devices running B12.

Tim, any idea why we're seeing the wrong icon here?

Flags: needinfo?(timdream)
Posted image screen.png

The screencast button shows up on my artifact build (central 3aa256c255f6) at both the video controls and the url bar.

Noted that I am testing this in the MV office without a streaming device -- it seems that someone plugged in a Roku here, somewhere.

Flags: needinfo?(timdream)

I also see the generic Android icon on a Pixel 3 running Android 9 and an HTC M8 running Android 7.1.2.

My devices from Comment 19 were both running Android Pie. I just tried that same steps on a Nexus 6 running Android 7.1.1 and it does work - I see the icon in both the URL bar and on the player. So the issue may be confined to Android Pie

Reporter

Comment 24

5 months ago

I can confirm the fix on Android 8 devices (Nexus 5x and Note 9). I saw the cast icon once on Android 9 (Pixel 2XL) but now after refreshing the page I don't see the icon. Force killing the app does not seem to help. I'm going to file a followup bug for the Android 9 issue. This patch does fix the problem for most of our users so I would recommend OKing the uplift.

Thanks for the help here. Based on the latest comments I will remove the qe-verify flag and mark 66, and 65 status as verified.
Bug 1521216 is filed for Android Pie.

Status: RESOLVED → VERIFIED
Flags: qe-verify+
You need to log in before you can comment on or make changes to this bug.