I am using the ExoPlayer Cast Extension for playing an audio stream on a connected chromecast device.
The notification appears automatically when a Chromecast Session is connected.
How can i remove the progress bar from the notification? Could not find anything in the documentation.
Remove setMediaSession() from your MediaStyle().
Not using or assigning the token to mediaSession would mean that you won't have the controls you need to control your media service, also you loose feature like automatic setting of color(color temperature auto-detected from album-art) on your notification and would need to write custom indents for controlling the player.
If we create a custom receiver app using HTML5/Javascript to play music, is it possible that the state of a com.google.android.gms.cast.framework.media.RemoteMediaClient will be updated ?
The purpose is to send custom message (as play/pause) with specific data to this receiver and is to have all related states always in the instance of RemoteMediaClient.
If it is possible, how to attach the Media Player to the Receiver API ?
My sender app is an android application using the CAF SDK.
You can load media from a custom receiver: https://developers.google.com/cast/docs/caf_receiver/advanced#tip-loading-media-using-contentid-contenturl-and-entity
This will ensure that both the receiver and the sender app will stay in sync with regards to the media state of the current track and any media in a queue.
I have a continuous audio stream since I'm casting from my Internet radio application. How can I update the song information?
Do I need to create a custom receiver that updates the information?
Yes, you do need to write a custom receiver to handle that; neither the Default nor the Styled receiver can do that for you.
I'm playing a live HLS stream in a Chromecast app, and I'm wanting to update the MediaMetadata when programmes start/finish. However I can't find a method to do this. I can load the stream again with fresh MediaInfo, but I can't just update the existing metadata. Is there any way to do this?
At present I'm casting from an Android app.
Is there a way to send fresh MediaMetadata to the receiver, or can I pass a custom data message with the information, and update the metadata within the sender using javascript?
see 'CCL' in general for the interfaces to manipulate things like metaData on events like onRemoteStatusChange()...
Looking at that, IMO if you want to alter the message type below to "METADATA_CHANGE" OR whatever it would be for a change in the mediaInfo, then just send the message to the receiver and you should get the broadcast you want... onMediaDataChanged().
sample msg from receiver to CastMgr...
{"requestId":0,"status":{"applications":[{"appId":"33E59692","displayName":"test-receiver-app","namespaces":[{"name":"urn:x-cast:com.google.cast.player.message"},{"name":"urn:x-cast:com.google.cast.media"}],"sessionId":"0869F8A7-25CE-E55F-F571-346EBABB81FB","statusText":"Ready To Cast","transportId":"web-3"}],"isActiveInput":true,"volume":{"level":1.0,"muted":false}},"type":"RECEIVER_STATUS"}
onRemoteMediaPlayerStatusUpdated()
When the receiver goes from PLAY to IDLE at the end of a video , the status change event is called on all 'listeners' ie all implementations of IVideoCastConsumer that have registered as listeners for 'status-changed'.
In the Base CCL class of BaseCastManager, you can watch for this specific status change and then broadcast your onRemoteMediaPlayerMetadataUpdated() event and all observers will get appropriate callback on that.... OR listen on event and just send the correct type of message to the receiver.
If its not exactly intended to observe mediaMetaDataChanges IMO , looking it over may help you tweek the existing API with and #Override in order to get your desire result.
Hi i want to make an android app in which when an incoming call come.it will be received and play an mp3 file in the sdcard.i know how to receive the intent of incoming call and pick it up.but in outgoing i have to play mp3 file please suggest some good reference for implementing it.