Interface Chromecast

  • All Implemented Interfaces:
    com.theoplayer.android.api.event.EventDispatcher

    
    public interface Chromecast
     implements EventDispatcher<E>
                        

    The chromecast API.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      abstract boolean isCasting() Returns whether THEOplayer is casting to a Chromecast.
      abstract CastError getError() The last error that occurred while Chromecasting, if any.
      abstract String getReceiverName() The name of the Chromecast device that the player is casting to, if any.
      abstract PlayerCastState getState() The state of the Chromecast.
      abstract void start() Start casting to the Chromecast.
      abstract void join() Synchronise the local player with an active Chromecast session.
      abstract void leave() Leave the active Chromecast session.
      abstract void stop() Stop casting to the Chromecast.
      abstract void setConnectionCallback(@Nullable() ChromecastConnectionCallback chromecastConnectionCallback) Sets a listener for the Chromecast connection changes.
      • Methods inherited from class com.theoplayer.android.api.event.EventDispatcher

        addEventListener, removeEventListener
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • isCasting

         abstract boolean isCasting()

        Returns whether THEOplayer is casting to a Chromecast.

      • getReceiverName

        @Nullable() abstract String getReceiverName()

        The name of the Chromecast device that the player is casting to, if any.

        Returns:

        The receiver name. (Nullable)

      • start

         abstract void start()

        Start casting to the Chromecast.

        • A dialog will prompt to choose the device.
      • join

         abstract void join()

        Synchronise the local player with an active Chromecast session.

      • leave

         abstract void leave()

        Leave the active Chromecast session.

        • Does not stop the session when other devices are connected.
        • Use stop to fully stop the session.
      • stop

         abstract void stop()

        Stop casting to the Chromecast.