Steps to repro:
1) Open MR dialog and note the name of Cast device to rename. Leave dialog open.
2) Rename the cast device (e.g. Home app, chrome://cast)
3) Wait about 20-30 seconds.
Expected result: dialog should now display the updated device name.
Actual result: device name stays the same until device is re-discovered.
There are a few bugs:
1) CastMediaSinkServiceImpl does not update the sink if the IP endpoint stays the same, which appears to be the case here. The fix is to update the relevant fields (device name, capabilities) without having to open a new cast socket, and notify observers.
2) QueryResultManager does not support updating a sink. The MediaSink is stored as a key in a map, which makes them immutable. The fix is to use sink ID as keys instead, and store MediaSink as part of the value, and update the MediaSink when new sink query result is received.
3) (Only for in-browser Cast MRP) CastAppDiscoveryService does not notify sink queries when a sink is updated. The fix is to do that.
Comment 1 by bugdroid1@chromium.org
, Jun 1 2018