Interface CastIntegration

  • All Implemented Interfaces:
    com.theoplayer.android.api.Integration

    
    public interface CastIntegration
     implements Integration
                        

    The Cast Integration 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 Unit start() Start casting to the Chromecast.
      abstract Unit join() Synchronise the local player with an active Chromecast session.
      abstract Unit leave() Leave the active Chromecast session.
      abstract Unit stop() Stop casting to the Chromecast.
      abstract Unit setConnectionCallback(ChromecastConnectionCallback chromecastConnectionCallback) Sets a listener for the Chromecast connection changes.
      • Methods inherited from class com.theoplayer.android.api.Integration

        getType
      • 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.

      • getError

         abstract CastError getError()

        The last error that occurred while Chromecasting, if any. (Nullable)

      • getReceiverName

         abstract String getReceiverName()

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

        Returns:

        The receiver name. (Nullable)

      • start

         abstract Unit start()

        Start casting to the Chromecast.

        A dialog will prompt to choose the device.

      • join

         abstract Unit join()

        Synchronise the local player with an active Chromecast session.

      • leave

         abstract Unit leave()

        Leave the active Chromecast session.

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

      • stop

         abstract Unit stop()

        Stop casting to the Chromecast.