1. Are you ready for the Galaxy S20? Here is everything we know so far!

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

Discussion in 'Android Development' started by Sonofsun3042, Oct 1, 2020.

  1. Sonofsun3042

    Sonofsun3042 Lurker
    Thread Starter

    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:
    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.

    Ali Ehsan likes this.

    1. Download the Forums for Android™ app!



Share This Page