New issue
Advanced search Search tips

Issue 873322 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug-Regression



Sign in to add a comment

Cast option missing in media player for drive files

Project Member Reported by avkodipelli@chromium.org, Aug 10

Issue description

Chrome Version: 69.0.3497.33
Chrome OS Version: 10895.20.0
Chrome OS Platform: All(teemo, babytiger, banjo, big)
Network info: 

Please specify Cr-* of the system to which this bug/feature applies (add
the label below).

Steps To Reproduce:
(1) Setup chromecast and use same network for in chromebook.
(2) In chrome book, Open any video file from drive to play in local media player.
(3) observe video controls. 


Expected Result:
- Cast option for playing on TV.

Actual Result:
- cast option missing,

How frequently does this problem reproduce? (Always, sometimes, hard to
reproduce?)
- Always

Cast option is working from system tray as expected.

Feedback report: 85595194818
 
Cc: joelhockey@chromium.org lucmult@chromium.org noel@chromium.org
Owner: slangley@chromium.org
Hi Stuart,
Can SYD team look into this regression issue?

I guess it is a Chrome-side(Video player) issue, but sometimes we need to update a cast receiver app, which is a publicly hosted web app.
Testing/debugging the cast feature can be tricky, so I wrote down some information about it.

go/video-player-cast-dev
Cc: tapted@chromium.org
+Trent who has been working in this area.
Status: Assigned (was: Untriaged)
Labels: M-70
Issue also seen on 11012.0.0/70.0.3532.0
Need updates status as this is blocking stable release. Fix needs to be prioritized or RBS removed.
I don't think any of us will be set up to troubleshoot chromecast issues any time soon. Do we know when this regressed?

Does the cast option work using Right-Click -> Open with... -> Open with Gallery? This should be visible in m69.

I think we should just delete the video player app, and improve the UX for video in Gallery. Filed Issue 879966.

Since the cast option is visible in the system tray, I don't think this needs to be RBS. We're probably too late for m69 anyway.
Cc: -noel@chromium.org powerb@chromium.org
+poweb@ Do you/we have an opinion on how casting should be integrated into the file browsing experience on ChromeOS?
Labels: -M-69 -M-70 Target-70 FoundIn-69
[Updating milestone labels]
FWIW, I tried opening a video using the steps in Comment 6, and did not see any option to cast there either.

Opening a a video in a tab and casting using tab mirroring did work as expected (and kicked into media remoting as well).

So I don't think the issue is with media remoting per se, but integration into the player apps on ChromeOS.  Where is the code located for those?
The video player is using the Cast SDK, so that should be fixable.  Some workarounds may be required to support Chrome Apps, but there are other apps using the SDK successfully.

We don't have Remote Playback API supported on desktop yet, so gallery integration will have to wait on Bug 728609.


Project Member

Comment 12 by sheriffbot@chromium.org, Sep 5

This issue is marked as a release blocker with no milestone associated. Please add an appropriate milestone.

All release blocking issues should have milestones associated to it, so that the issue can tracked and the fixes can be pushed promptly.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Components: -Internals>Cast Internals>Cast>FileManager
Should VideoPlayer.CastedVideoLength be reporting data? I was hoping it could help spot when a regression occurred, but the data is all zeroes for the last year.

https://uma.googleplex.com/p/chrome/timeline_v2/?sid=475aabd2529069503df418c47c8c164f
Screenshot from 2018-09-06 16-00-32.png
26.1 KB View Download
Project Member

Comment 15 by sheriffbot@chromium.org, Sep 10

This issue is marked as a release blocker with no milestone associated. Please add an appropriate milestone.

All release blocking issues should have milestones associated to it, so that the issue can tracked and the fixes can be pushed promptly.

Thanks for your time! To disable nags, add the Disable-Nags label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Labels: M-70
Friendly ping, please provide an update on this issue. Is this still RBS (if not please remove the label)? When is the ETA on the work that needs to be done to resolve this? Thanks.
Labels: -ReleaseBlock-Stable
No ETA, removing RBS.
Cc: mlamouri@chromium.org
I fired up a video on my home network that has cast devices on it: I see these errors

video_player_scripts.js:9414 Refused to load the script 'chrome-extension://pkedcjkdefgpdelpbcmbmeomcjbeemfm/cast_sender.js' because it violates the following Content Security Policy directive: "script-src 'self' blob: filesystem: chrome://resources chrome-extension://hhaomjibdihmijegdhdafkllkbggdgoj chrome-extension://enhhojjnijigcajfphajepfemndkmdlo chrome-extension://ljoplibgfehghmibaoaepfagnmbbfiga". Note that 'script-src-elem' was not explicitly set, so 'script-src' is used as a fallback.

loadCastSDK @ video_player_scripts.js:9414
video_player.html:1 Unchecked runtime.lastError while running fileManagerPrivateInternal.getDownloadUrl: Unknown error.
    at MediaManager.<anonymous> (chrome-extension://jcgeabjmjgoblfofpppfkcoakmfobdko/js/video_player_scripts.js:9281:31)
    at MediaManager.getUrl (chrome-extension://jcgeabjmjgoblfofpppfkcoakmfobdko/js/video_player_scripts.js:9279:10)
    at MediaManager.isAvailableForCast (chrome-extension://jcgeabjmjgoblfofpppfkcoakmfobdko/js/video_player_scripts.js:9225:15)
video_player_scripts.js:9403 Google Cast extension load failed.
(anonymous) @ video_player_scripts.js:9403
Which is this code:

function loadCastSDK(extensionId, callback) {
  var script = document.createElement('script');

  var onError = function() {
    script.removeEventListener('error', onError);
    document.body.removeChild(script);
    console.error('Google Cast extension load failed.');
  }.wrap();

  // Load the Cast Sender SDK provided by the given Cast extension.
  // Legacy Cast extension relies on the extension ID being set by bootstrap
  // code, so set the ID here.
  window.chrome['cast'] = window.chrome['cast'] || {};
  window.chrome['cast']['extensionId'] = extensionId;
  script.src = 'chrome-extension://' + extensionId + '/cast_sender.js';
  script.addEventListener('error', onError);
  script.addEventListener('load', onLoadCastSDK.bind(null, callback));
  document.body.appendChild(script);
}

Labels: -M-70 M-73
I think the CSP (Content Security Policy) is defined here:
https://cs.chromium.org/chromium/src/ui/file_manager/video_player/manifest.json

I think we have to allow pkedcjkdefgpdelpbcmbmeomcjbeemfm on this manifest in content_security_policy attribute.


we also need it for audio player as well I think
I changed "enhhojjnijigcajfphajepfemndkmdlo" with "pkedcjkdefgpdelpbcmbmeomcjbeemfm" at
https://cs.chromium.org/chromium/src/ui/file_manager/video_player/js/cast/cast_extension_discoverer.js?rcl=66bac866841ba32ba0dee4ea86638518f01cd7cc&l=19
https://cs.chromium.org/chromium/src/ui/file_manager/video_player/manifest.json?rcl=aaf987e6929e763d57a2e7ab1235de2c1c98d870&l=72

When I load a video from Downloads into video player, I can see the cast icon, and it allows me to select which device to cast to.  I get error:
Unchecked runtime.lastError while running fileManagerPrivateInternal.getDownloadUrl: Unknown error.
    at MediaManager.<anonymous> (chrome-extension://jcgeabjmjgoblfofpppfkcoakmfobdko/js/video_player_scripts.js:9490:31)
    at MediaManager.getUrl (chrome-extension://jcgeabjmjgoblfofpppfkcoakmfobdko/js/video_player_scripts.js:9488:10)
    at MediaManager.isAvailableForCast (chrome-extension://jcgeabjmjgoblfofpppfkcoakmfobdko/js/video_player_scripts.js:9434:15)

When I cast, the device starts presenting, but the video never plays.  I get error in video player:
Error on sending command to cast. {code: "session_error", description: "INVALID_MEDIA_SESSION_ID", details: {…}}
onCastCommandError_ @ video_player_scripts.js:9331
(anonymous) @ video_player_scripts.js:9174
wrappedCallback @ video_player_scripts.js:45
T.onMessage @ cast_sender.js:74
K.i @ cast_sender.js:55

Project Member

Comment 26 by bugdroid1@chromium.org, Nov 28

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

commit 5acc3f10060d9b3e252508dadfc14f7f579ac7fe
Author: Joel Hockey <joelhockey@chromium.org>
Date: Wed Nov 28 07:26:29 2018

Add stable media router extension to CSP for video and audio players

Add pkedcjkdefgpdelpbcmbmeomcjbeemfm in addition to
enhhojjnijigcajfphajepfemndkmdlo

Bug: 873322
Change-Id: Ic584d17466bf14dbe79122878186dedb18408d4b
Reviewed-on: https://chromium-review.googlesource.com/c/1353030
Reviewed-by: Luciano Pacheco <lucmult@chromium.org>
Reviewed-by: Stuart Langley <slangley@chromium.org>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611582}
[modify] https://crrev.com/5acc3f10060d9b3e252508dadfc14f7f579ac7fe/ui/file_manager/audio_player/manifest.json
[modify] https://crrev.com/5acc3f10060d9b3e252508dadfc14f7f579ac7fe/ui/file_manager/video_player/manifest.json

If possible can you fix Bug 689773 as well?  We removed XHR probing from the Cast SDK code a long time ago.  The current implementation is particularly inefficient because it's doing both XHR and <script>. 

Sign in to add a comment