Search code examples
androidchromecast

How to tell if MediaStatus for Chromecast is loading?


Currently there is no MedaiStatus.PLAYER_STATE_LOADING state to tell if the video is being loaded to the chromecast device.

Is there a way i can ask the GoogleCast device if I am loading data, as apposed to Buffering, Idle, Playing, or Paused?


Solution

  • We don't have such event exposed through the SDK. There is a couple of nice diagrams here that show the flow and events that are captured (see section Media Events). If there is a any reason that you need a certain event (exposed by MediaElement) that are not exposed through the SDK, you should consider doing the following:

    • Listen to that event on the MediaElement directly and inform your senders accordingly. The receiver SDK does exactly the same thing; it gets all its media events from the media element.
    • Open a feature request on our SDK tracker. There, you need to explain in detail why you need that feature and basically build a case that shows it is a valuable feature not just for your particular case, but in general.