• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Google ChromeCast Android does not run smoothly when using local http url

My app would like to integrate the Google Chromecast feature and it is similar to Google Photos app. It allows the user to browse files, then cast to chrome cast devices. Following this link: https://github.com/googlecast/CastVideos-android.

I had set up a
local HTTP URL for my casting file like this URL below:
http://192.168.1.45:8989/local/storage/emulated/0/DCIM/AnyRestore/20200908_113828.mp4
The result is video file is successfully cast, but it is usually
interrupted, lag without any reason (although Wifi speed is very stable).

Then I had tried to hardcoding to change the
global URL look similar to this one:
https://commondatastorage.googleapis.com/gtv-videos-bucket/CastVideos/mp4/BigBuckBunny.mp4 like the sample app above. Magically
it works and runs smoothly.

So this is my question:
1. Can you help me answer what is the difference between using a local URL and a global URL which affect to ChromeCast process? Our app normally works in offline mode, so I prefer a local URL rather than a global URL.
2. I recognized that the Google Photo app seems to use a local URL (not global URL) because when I forced this app to stop, the casting process is also stopped at the same time. Does anyone help me confirm this and explain how the Google Photo app handle the ChromeCast feature? It is very helpful to me.

Thank you so much for your help.
 
Back
Top Bottom