I created a one sample app to validate filters for playing video on Chromecast.
When my device connects to Chromecast, it shows that it is connected and I'm able to play a video on Chromecast device. However, If I want to switch another video, I'm able to switch it and video plyaing also works fine.
But In this case, I want to update the UI, weather I'm playing a first video or second video? Is there any specific callback to know the mediaplayer status based on user selection on different videos.
Thanks in Advance!!
There is a lot of callbacks/listeners that report various changes that happen on the Cast side, such as OnMetadataUpdatedListener or OnStatusUpdatedListener (on Android sender side, similar ones exist on other platforms); I suggest you read our documentation and look through our sample or reference apps and then come back here with issues that you are running into, if any.
Related
Our customers can upload videos to our servers, when they download our Android application they can play the videos amongst other features. One of them other features is being able to cast these videos to chromecast devices. When they tap to play a video our server sends over a url similar to:
https://xxxxx.net/dl/standard-user/xxx/video-xxx?mime=true
At the moment we are using LocalCast to stream the content to a chromecast, but we get the error:
This CheomeCast device does not support the video or cant access it.
We can definitely access it because our server only keeps healthy/working links. We want to add something into our code to see if the video is playable on ChromeCast if it is not playable on ChromeCast then we want to grey out the cast button for that particular video.
How would we check to see if the video is playable on ChromeCast? Client side that is. We want to check once the video url has been passed to the device.
We have searched online and searched Googles official documentation but cant seem to find enough information to solve the problem
Thanks all
I'm developing a Chromecast application (receiver, HTML5 and Javascript) which communicates with an Android app, all is fine, but I have a problem trying to play two "sounds" at a time in the receiver.
It's a kind of game where I need to play a song at the beggining and play some sound effects during it.
Is this possible? And if it is anyone could help me to do it? I have tried it and it works nice in the browser but in the Chromecast only one of the "sound" is played, the song or the effect, never both.
Thank you very much
You cannot have more than one active Media Element in your DOM in chromecast. For what you want to do, however, you can use Web Audio APIs and accomplish the same for short audio files.
I can't find a way to do this. is it possible to control the media stream that is current playing on chromecast, like youtube, video app, music app, or whatever from a generic Android application?
I've tried many ways to do it, but I had no success. I'm able to join the chromecast while it's playing a video from youtube for example and get it's session id and some other info, but I can't play/pause the streaming. Is it possible to do it?
Thanks in advance.
It very much depends on the application that is running on the receiver; not all applications use the Media namespace (from the Cast SDK) for control; if they don't, you will not be able to do anything of the sort that you are trying to do. If they do, then you should be able to send control commands.
I need to play a video stored on my xampp server, as if it was a live stream through an android application.
For example: After installing my application on a smartphone, when a user A(say) makes an access to the xampp server to play the video, the video starts to play on his smartphone device. Now, suppose a user B (say) plays the same video through the server it starts from the same instance as to where User A is now watching the video. Thus, the video being played though stored, becomes live.
I need to demonstrate a concept through this application, and as I have no prior experience in Android Development, so it would be great if anyone can give me any ideas, on how can I approach this, any suggestions/sample code/alternate methods to achieve this please let me know.
Thanks for the time you put in reading my question.
My music application constantly plays music in the background, however I'd like to be able to detect when another application starts playing audio (such as the YouTube app) so I can pause/mute/stop the audio in my application.
This will allow a user to continue browsing the web whilst listening to music, but then if they wish to watch a video at any point, they can do so without audio conflict.
One solution might be to listen for a broadcast which states when an application begins using the AudioManager. Does such an Intent Action exist?
Edit: As in the answer provided below, there appears to be a method of detecting the loss of audio focus in 2.2 with AudioManager.OnAudioFocusChangeListener.
Great, but is there a solution for the more common versions of Android? Ideally 1.5+.
http://developer.android.com/reference/android/media/AudioManager.OnAudioFocusChangeListener.html
this thread also has additional information that might get you heading in the right direction.
http://groups.google.com/group/android-developers/browse_thread/thread/db6822d84feaac6/219d8cba07795c61?hl=en&lnk=gst&q=OnAudioFocusChangeListener#219d8cba07795c61