New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 667269 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: ----



Sign in to add a comment

Casting cannot be disengaged with cast button

Reported by arnaud.l...@gmail.com, Nov 21 2016

Issue description

Device name: Nexus 7

From "Settings > About Chrome"
Application version: 54.0.2840.85 and 55.0.2883.53
Operating system: Android 6.0.1 and 7.0.0

URLs (if applicable): http://www.staging-rmp.com/cast/

Steps to reproduce:
(1) Navigate to http://www.staging-rmp.com/cast/. This template is from https://github.com/googlecast/CastVideos-chrome.
(2) Try to cast from Chrome Android. See that casting work.
(3) Try to stop casting from the application cast button (this is the official cast button provided by Google as described on https://developers.google.com/cast/docs/chrome_sender_integrate). One would expect options to disengage casting to appear. Instead an overlay menu appears ("Cast to" and a waiting bar with "Finding devices"). This goes on forever and casting is never disengaged.

Expected result: One should be able to disengage casting


Actual result: Casting cannot be disengaged.
Note that this issue has been escalated to Google cast team which suggests this should be treated as a Chrome bug. See here for more info: https:/
/github.com/googlecast/CastVideos-chrome/issues/3.
Also note that this issue is specific to Android (e.g. it does not happen from latest Chrome on Windows 10 or latest macOS).

Thanks
Arnaud

 
Cc: avayvod@chromium.org
Components: Internals>Cast Internals>Media
Owner: aber...@chromium.org
Status: Assigned (was: Unconfirmed)
Cc: -avayvod@chromium.org
Owner: avayvod@chromium.org
It is about a year since I stopped working on cast. Reassigning to avayvod@ who now owns cast.
Components: -Internals>Media Blink>PresentationAPI
Status: Started (was: Assigned)
We've been investigating this with Prameet last week (this is the Cast Web SDK issue, not video flinging).
Labels: -Pri-3 Pri-2

Comment 5 by mfo...@chromium.org, Nov 22 2016

Suggest closing this issue and using an internal bug for Web SDK issue.

Sorry, I meant it's an issue with the Cast Web SDK implementation via Presentation API in Chrome.
The comment about VideoFling was due to removing Internals > Media component.
The issue seems to be with how Chrome interacts with the DialogFragments for the Cast dialogs - when Chrome tries to show the controller dialog, the chooser dialog shows up that can't find any devices.
I haven't debugged yet why the wrong dialog is shown by Android but it might be the FragmentManager has a pending transaction to show one.
This is the line where Android decides to show the wrong dialog:
https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/media/router/MediaRouteControllerDialogManager.java?rcl=0&l=77
Labels: M-56
Seems like the problem is that the MediaRouteControllerDialogManager.Fragment inherits from BaseMediaRouteDialogManager.Fragment that inherits from MediaRouteChooserDialogFragment - which is incorrect.

The bug seems to have been introduced by a crasher fix https://codereview.chromium.org/2241803002 and merged to Chrome 53 :(
Project Member

Comment 9 by bugdroid1@chromium.org, Nov 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/cebca8e4a6d6e86016a8b26812e74d706d2e8a16

commit cebca8e4a6d6e86016a8b26812e74d706d2e8a16
Author: avayvod <avayvod@chromium.org>
Date: Fri Nov 25 16:55:50 2016

[MediaRouter, Android] Rebase the controller dialog fragment.

MediaRouteControllerDialogManager.Fragment inherits from
BaseMediaRouteDialogManager.Fragment which inherits from
MediaRouteChooserDialogFragment. I changed the former to inherit
directly from the MediaRouteControllerDialogFragment and merged the base
dialog fragment logic with both Chrome's custom fragment classes.

In the essence, the rebasing is needed so that two final subclasses could
inherit from the right MediaRouteXXXDialogFragment (Chooser and Controller)
- that's the only behavioral change that fixes the problem.

BUG= 667269 
TEST=manual on any cast-enabled mobile-friendly website.
TBR=mlamouri@chromium.org

Review-Url: https://codereview.chromium.org/2523413002
Cr-Commit-Position: refs/heads/master@{#434528}

[modify] https://crrev.com/cebca8e4a6d6e86016a8b26812e74d706d2e8a16/chrome/android/java/src/org/chromium/chrome/browser/media/router/BaseMediaRouteDialogManager.java
[modify] https://crrev.com/cebca8e4a6d6e86016a8b26812e74d706d2e8a16/chrome/android/java/src/org/chromium/chrome/browser/media/router/MediaRouteChooserDialogManager.java
[modify] https://crrev.com/cebca8e4a6d6e86016a8b26812e74d706d2e8a16/chrome/android/java/src/org/chromium/chrome/browser/media/router/MediaRouteControllerDialogManager.java

Labels: Merge-Request-56

Comment 11 by dimu@chromium.org, Nov 25 2016

Labels: -Merge-Request-56 Merge-Approved-56 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M56 (branch: 2924)
Project Member

Comment 12 by bugdroid1@chromium.org, Nov 30 2016

Labels: -merge-approved-56 merge-merged-2924
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/5104d9e1162765f2b5e9d08f34dfae9ca925b9eb

commit 5104d9e1162765f2b5e9d08f34dfae9ca925b9eb
Author: Anton Vayvod <avayvod@google.com>
Date: Wed Nov 30 17:18:36 2016

[MediaRouter, Android] Rebase the controller dialog fragment.

MediaRouteControllerDialogManager.Fragment inherits from
BaseMediaRouteDialogManager.Fragment which inherits from
MediaRouteChooserDialogFragment. I changed the former to inherit
directly from the MediaRouteControllerDialogFragment and merged the base
dialog fragment logic with both Chrome's custom fragment classes.

In the essence, the rebasing is needed so that two final subclasses could
inherit from the right MediaRouteXXXDialogFragment (Chooser and Controller)
- that's the only behavioral change that fixes the problem.

BUG= 667269 
TEST=manual on any cast-enabled mobile-friendly website.
TBR=mlamouri@chromium.org

Review-Url: https://codereview.chromium.org/2523413002
Cr-Commit-Position: refs/heads/master@{#434528}
(cherry picked from commit cebca8e4a6d6e86016a8b26812e74d706d2e8a16)

Review URL: https://codereview.chromium.org/2546463002 .

Cr-Commit-Position: refs/branch-heads/2924@{#190}
Cr-Branched-From: 3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a-refs/heads/master@{#433059}

[modify] https://crrev.com/5104d9e1162765f2b5e9d08f34dfae9ca925b9eb/chrome/android/java/src/org/chromium/chrome/browser/media/router/BaseMediaRouteDialogManager.java
[modify] https://crrev.com/5104d9e1162765f2b5e9d08f34dfae9ca925b9eb/chrome/android/java/src/org/chromium/chrome/browser/media/router/MediaRouteChooserDialogManager.java
[modify] https://crrev.com/5104d9e1162765f2b5e9d08f34dfae9ca925b9eb/chrome/android/java/src/org/chromium/chrome/browser/media/router/MediaRouteControllerDialogManager.java

Status: Fixed (was: Started)

Sign in to add a comment