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

Issue 706882 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

When the presentationURL is not supported, PresentationRequest.start() should reject with NotFoundError, availability should return NotSupported.

Project Member Reported by avayvod@chromium.org, Mar 30 2017

Issue description

On Android, we just don't show the dialog and never reject or resolve the promise.
 

Comment 1 by mfo...@chromium.org, Mar 30 2017

Ideally, Android should also not report availability = true for unsupported URLs.

Summary: When the presentationURL is not supported, PresentationRequest.start() should reject with NotFoundError, availability should return NotSupported. (was: When the presentationURL is not supported, PresentationRequest.start() should reject with NotFoundError)
We don't, but we also don't report false.
I tried rejecting getAvailability() with NotSupportedError but our message advises to try PresentationRequest.start() in this case. I guess returning false is a better strategy then.
Also, the test page doesn't log the availability until I try to start a presentation - then I see both log messages output.
Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Apr 7 2017

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

commit 8a9962171b6d2f8e98c9d312c433087425b3f154
Author: avayvod <avayvod@chromium.org>
Date: Fri Apr 07 16:27:49 2017

[Android,Cast] Report correctly when devices are not available.

The ChromeMediaRouterDialogController now reports when the source URN is
not supported so that the native side can reject the PresentationRequest
correctly.
CastMediaRouteProvider now reports no sinks available if the source URN
is not supported or if Android MediaRouter's API are not present (like
on JB MR1). For the latter, we now do create ChromeMRP when MediaRouter
is null and check if it's null before using (was already checked
everywhere, except for one spot changed in this CL).

BUG= 706882 
TEST=manual at https://googlechrome.github.io/samples/presentation-api/

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

[modify] https://crrev.com/8a9962171b6d2f8e98c9d312c433087425b3f154/chrome/android/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouter.java
[modify] https://crrev.com/8a9962171b6d2f8e98c9d312c433087425b3f154/chrome/android/java/src/org/chromium/chrome/browser/media/router/ChromeMediaRouterDialogController.java
[modify] https://crrev.com/8a9962171b6d2f8e98c9d312c433087425b3f154/chrome/android/java/src/org/chromium/chrome/browser/media/router/cast/CastMediaRouteProvider.java
[modify] https://crrev.com/8a9962171b6d2f8e98c9d312c433087425b3f154/chrome/android/java_sources.gni
[add] https://crrev.com/8a9962171b6d2f8e98c9d312c433087425b3f154/chrome/android/junit/src/org/chromium/chrome/browser/media/router/cast/CastMediaRouteProviderTest.java
[modify] https://crrev.com/8a9962171b6d2f8e98c9d312c433087425b3f154/chrome/browser/media/android/router/media_router_dialog_controller_android.cc
[modify] https://crrev.com/8a9962171b6d2f8e98c9d312c433087425b3f154/chrome/browser/media/android/router/media_router_dialog_controller_android.h

Status: Fixed (was: Started)

Sign in to add a comment