will1971 / google-cast-sdk

Automatically exported from code.google.com/p/google-cast-sdk
0 stars 0 forks source link

Different loadMedia behavior in Chrome with Cast extension vs. with "Media Router" enabled. #759

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Testing Chrome sender app.
2. Use chrome.cast.Session.addMediaListener() to set a callback function named 
onMediaChange().
3. Use chrome.cast.Session.loadMedia() to load media.

What is the expected output? What do you see instead?
Expect onMediaChange() callback to be called in all connected sender apps after 
media is loaded by the receiver app.
With Chrome Cast extension, it is called in both the sender app doing the load, 
and other connected sender apps.
With no Cast extension and "chrome://flags/#enable-media-router" enabled 
instead, I see my onMediaChange() callback called on other connected senders, 
but not in the sender app which called loadMedia().

What version of the product are you using? On what operating system?
Chrome Version 49.0.2623.47 beta-m (64-bit) on Windows 10.

Please provide any additional information below.

Original issue reported on code.google.com by ed.win...@harman.com on 15 Feb 2016 at 4:43

GoogleCodeExporter commented 8 years ago
After executing "chrome://flags/#enable-media-router, did you observe cast icon 
on the browser menu? If so, did you see your cast device on the list? please 
reply.

Original comment by vinot...@google.com on 17 Feb 2016 at 12:43

GoogleCodeExporter commented 8 years ago
Yes, after enabling the flag, cast icon was seen in browser and expected cast 
devices were seen in cast menu.

Original comment by ewin...@gmail.com on 17 Feb 2016 at 1:43

GoogleCodeExporter commented 8 years ago
Please raise the issue on concerned forum (https://code.google.com/p/chromium/)

Original comment by vinot...@google.com on 17 Feb 2016 at 2:17

GoogleCodeExporter commented 8 years ago
In the new Cast SDK implementation based on Media Router in Chrome, you first 
get a success callback from the loadMedia call which gets passed in a media 
session and  since the app has already been notified through the success 
callback, the media listener callback is not called.  The app really should be 
passing in the same handler to loadMedia success callback and the media 
listener.

We'll investigate if we should keep the old behavior of making both callbacks 
for backward compatibility, but in the meantime you could use the idea of 
passing the same handler as both loadMedia success callback and media listener.

Original comment by vadi...@chromium.org on 17 Feb 2016 at 6:25