AmpOctoshapeManager

open class AmpOctoshapeManager : NSObject, PlayerEventObserver, AmpOctoshapeObserver

Class in charge of managing the integration between the AMP SDK and the Octoshape SDK

  • Initializes a new AmpOctoshapeManager with the parameters provided and augments the AmpCore with Octoshape capabilities.

    Declaration

    Swift

    public init(ampPlayer: AmpPlayer, enableLogs:Bool, container:UIView)

    Parameters

    ampPlayer

    The player that should be augmented.

    octoshapeSystem

    A previously instantiated Octoshape System.

    Return Value

    A configured instance of an AmpOctoshapeManager.

  • Resumes the OctoshapeSystem, recreating any suspended socket via suspend method.

    Declaration

    Swift

    open func resume()
  • Suspends the OCOctoshapeSystem. To be called whenever the application which uses this class has to go in any kind of suspend like state that forces any kind of application sockets to shut down.

    Declaration

    Swift

    open func suspend()
  • Stops the playback of the Octoshape player.

    Declaration

    Swift

    open func stop()
  • Registers an observer to be notified of player events.

    Declaration

    Swift

    open func registerObserver(_ observer: AmpOctoshapeObserver) -> Int

    Parameters

    observer

    The observer to be registered.

    Return Value

    The id of the registered observer.

  • Removes a registered observer.

    Declaration

    Swift

    open func removeObserver(_ id: Int)

    Parameters

    id

    The id of the observer to be removed.