chromecast - How to update the volume indicator provided by the MinimalMediaRouteProvider -
when registering minimalmediarouteprovider/mediaroutebutton androids chromecast sdk, standard dialog connecting existing cromecast devices. once connected device, same dialog provides way set volume using draggable seek bar. having trouble synchronizing position of volume seek bar actual volume set in chromecast device.
as part of registering minimalmediarouteprovider provide com.google.cast.mediarouteadapter implementation. onsetvolume(volume) of interface called when user drags volume seekbar above. gives god way update volume level of connected chromecast channel using messagestream.setvolume(volume).
the problem once update volume, there no way tell minimalmediarouteprovider ui volume has changed can position accordingly - shows volume 0.
what proper way notify minimalmediarouteprovider current volume level can update volume ui?
looking @ mediaroute sample included support library 7, there seem way create mediaroutedescriptor, update volume there , communicate mediarouteprovider, but not clear how in content of chromecast/minimalmediarouteprovider.
you can call mediaroutestatelistener.onvolumechanged()
update volume seekbar.
i have more detailed answer here: https://stackoverflow.com/a/18867128/1334870
Comments
Post a Comment