- 
                  
                  Create a new instance of THEOplayer with a frame. DeclarationSwift public init(with frame: CGRect? = nil, configuration: THEOplayerConfiguration? = nil)ParametersframeThe frame rectangle, which describes the THEOplayer view’s location and size in its superview’s coordinate system, defaults to nil. configurationA configuration for the new THEOplayer, defaults to nil. 
- 
                  
                  Create a new instance of THEOplayer with a frame. Remark This constructor is for the tvOS SDK only. 
- 
                  
                  Prepares THEOplayer with the initial view controller. Remark If you are using the SDK in a traditional app (e.g. not a client/server app) you should call this function in the AppDelegate’s application(_:didFinishLaunchingWithOptions:) method. 
- 
                  
                  THEOplayer’s Version. Remark Example:"2.77.0"DeclarationSwift @objc(playerVersion) public static var version: String { get }
- 
                  
                  THEOplayer’s Suite Version. Remark Example:"2020.4.0"DeclarationSwift @objc public static var playerSuiteVersion: String { get }
- 
                  
                  The frame rectangle, which describes the THEOplayer view’s location and size in its superview’s coordinate system. DeclarationSwift @objc public var frame: CGRect { get set }
- 
                  
                  The bounds rectangle, which describes the THEOplayer view’s location and size in its own coordinate system. DeclarationSwift @objc public var bounds: CGRect { get set }
- 
                  
                  The center of the THEOplayer view’s frame. DeclarationSwift @objc public var center: CGPoint { get set }
- 
                  
                  An integer bit mask that determines how the THEOplayer view resizes itself when its superview’s bounds change. DeclarationSwift @objc public var autoresizingMask: UIView.AutoresizingMask { get set }
- 
                  
                  Allows you to modify the player’s ABR behavior. See documentation for ABRConfigurationto see how this is done.DeclarationSwift @objc public var abr: ABRConfiguration { get set }
- 
                  
                  The network status of the player which can be used to monitor the network related errors. DeclarationSwift public var network: Network { get }
- 
                  
                  The list of Text Tracks. DeclarationSwift public var textTracks: TextTrackList { get }
- 
                  
                  The list of Audio Tracks. DeclarationSwift public var audioTracks: AudioTrackList { get }
- 
                  
                  The list of Video Tracks. DeclarationSwift public var videoTracks: VideoTrackList { get }
- 
                  
                  The length of the currently loaded video, in seconds. DeclarationSwift public var duration: Double? { get }
- 
                  
                  Sets or returns if the video should automatically start playing. Remark - If you set autoplay to true, this will set preload to ‘auto’.
- Preload will be back to the previous state if you set autoplay back to false.
- If you want to use autoplay, you should not modify the preload or the autoplay won’t work.
 DeclarationSwift @objc public var autoplay: Bool { get set }
- 
                  
                  Sets or returns the current source of the video. Remark - After invoking the setter, the player sets the provided playback source and applies the provided parameters in the source description.
- The source description is an object that should be constructed by the user and which should implement the SourceDescription protocol.
 DeclarationSwift @objc public var source: SourceDescription? { get set }
- 
                  
                  Returns the current source URL of the video. DeclarationSwift @objc public var src: String? { get }
- 
                  
                  Sets or returns the volume of the video. DeclarationSwift @objc public var volume: Float { get set }
- 
                  
                  Sets or returns whether the audio output of the video is muted. DeclarationSwift @objc public var muted: Bool { get set }
- 
                  
                  Return whether the video is seeking. DeclarationSwift @objc public var seeking: Bool { get }
- 
                  
                  Returns whether the video is paused. DeclarationSwift @objc public var paused: Bool { get }
- 
                  
                  Returns whether the video has ended. DeclarationSwift @objc public var ended: Bool { get }
- 
                  
                  Returns current playback rate of the player. Remark 1 referring to normal speed.DeclarationSwift @objc public var playbackRate: Double { get }
- 
                  
                  Sets or returns the presentationMode of the player. Remark - Default is set to ‘inline’.
- For all possibilities, see PresentationMode.
 DeclarationSwift @objc public var presentationMode: PresentationMode { get set }
- 
                  
                  Returns the readystate of the player. Remark - Default is set to HAVE_NOTHING.
- For all possibilities, see ReadyState.
 DeclarationSwift @objc public var readyState: ReadyState { get }
- 
                  
                  Returns the last encountered player error. DeclarationSwift @objc public var error: String? { get }
- 
                  
                  Sets whether THEOplayer automatically manages the AVAudioSession.Remark - THEOPlayer uses playbackas default value for theAVAudioSession.Category.
- THEOPlayer uses moviePlaybackas default value for theAVAudioSession.Mode.
 DeclarationSwift @objc public static var automaticallyManageAudioSession: Bool { get set }
- THEOPlayer uses 
- 
                  
                  After invoking this method, the player starts playback. DeclarationSwift @objc public func play()
- 
                  
                  After invoking this method, the player pauses playback. DeclarationSwift @objc public func pause()
- 
                  
                  After invoking this method, the player stops playback completely and unloads all loaded resources. Remark Remark: - If the operation completes, the success flag is true and the error is nil.
- If the operation fails, the success flag is false and the error indicates the problem.
 DeclarationSwift public func stop(completionHandler: ((Bool?, Error?) -> Void)? = nil)ParameterscompletionHandlerAn optional closure to invoke when operation completes or fails, defaults to nil. The closure takes two optional arguments: A success flag and an error. 
- 
                  
                  Adds the given event listener of the given PlayerEventType. Remark When attaching a listener on the wrong object the application will crash. DeclarationSwift public func addEventListener<E>(type: EventType<E>, listener: @escaping (E) -> ()) -> EventListener where E : EventProtocolParameterstypePlayerEventTypeof the added event listener.listenerClosure called when event is dispatched. Return ValueEventListener that can be removed. 
- 
                  
                  Removes the given event listener of the given PlayerEventType. DeclarationSwift public func removeEventListener<E>(type: EventType<E>, listener: EventListener) where E : EventProtocolParameterstypePlayerEventTypeof the removed event listener.listenerEventListener object that has been returned on addEventListener. 
- 
                  
                  Requests the current playback position in the video, in seconds. DeclarationSwift public func requestCurrentTime(completionHandler: @escaping (Double?, Error?) -> Void)ParameterscompletionHandlerA closure to invoke when operation completes or fails. 
- 
                  
                  Sets the current playback position in the video. DeclarationSwift @objc public func setCurrentTime(_ newValue: Double, completionHandler: ((Any?, Error?) -> Swift.Void)? = nil)ParametersnewValueThe new playback position, in seconds. completionHandlerA closure to invoke when operation completes or fails, defaults to nil. 
- 
                  
                  Requests the height of the video in pixels for the current quality. DeclarationSwift public func requestVideoHeight(completionHandler: @escaping (Int?, Error?) -> Void)ParameterscompletionHandlerA closure to invoke when operation completes or fails. 
- 
                  
                  Requests the width of the video in pixels for the current quality. DeclarationSwift public func requestVideoWidth(completionHandler: @escaping (Int?, Error?) -> Void)ParameterscompletionHandlerA closure to invoke when operation completes or fails. 
- 
                  
                  Sets whether the player should preload a certain type of data. DeclarationSwift @objc public func setPreload(_ newValue: Preload, completionHandler: ((Any?, Error?) -> Swift.Void)? = nil)ParametersnewValueThe new preload value. completionHandlerA closure to invoke when operation completes or fails, defaults to nil. 
- 
                  
                  Requests the current ProgramDateTime of the player. DeclarationSwift @objc public func requestCurrentProgramDateTime(completionHandler: @escaping (Date?, Error?) -> Void)ParameterscompletionHandlerA closure to invoke when operation completes or fails. 
- 
                  
                  Sets the current ProgramDateTime of the player. DeclarationSwift @objc public func setCurrentProgramDateTime(_ newValue: Date, completionHandler: ((Any?, Error?) -> Swift.Void)? = nil)ParametersnewValueThe new ProgramDateTime. completionHandlerA closure to invoke when operation completes or fails, defaults to nil. 
- 
                  
                  Sets the playback rate of the player. DeclarationSwift @objc public func setPlaybackRate(_ newValue: Double, completionHandler: ((Any?, Error?) -> Swift.Void)? = nil)ParametersnewValueThe new playback rate. completionHandlerA closure to invoke when operation completes or fails, defaults to nil. 
- 
                  
                  Request the buffered TimeRanges of the player. DeclarationSwift @objc public func requestBuffered(completionHandler: @escaping ([TimeRange]?, Error?) -> Void)ParameterscompletionHandlerA closure to invoke when operation completes or fails. 
- 
                  
                  Request the played TimeRanges of the player. DeclarationSwift @objc public func requestPlayed(completionHandler: @escaping ([TimeRange]?, Error?) -> Void)ParameterscompletionHandlerA closure to invoke when operation completes or fails. 
- 
                  
                  Adds the THEOplayer view to the end of the parameter view’s list of subviews. DeclarationSwift @objc public func addAsSubview(of view: UIView)ParametersviewThe view on which the THEOplayer view will be added as a subview. 
- 
                  
                  Inserts the THEOplayer view at the specified index of the parameter view’s list of subviews. DeclarationSwift @objc public func insertAsSubview(of view: UIView, at: Int)ParametersviewThe view on which the THEOplayer view will be added as a subview. atThe index in the array of the subviews property at which to insert the THEOplayer view. Subview indices start at 0 and cannot be greater than the number of subviews. 
- 
                  
                  Inserts the THEOplayer view below another view in the parameter view’s hierarchy. DeclarationSwift @objc public func insertAsSubview(of view: UIView, belowSubview siblingSubview: UIView)ParametersviewThe view on which the THEOplayer view will be added as a subview. siblingSubviewThe sibling view that will be above the THEOplayer view. 
- 
                  
                  Inserts the THEOplayer view above another view in the parameter view’s hierarchy. DeclarationSwift @objc public func insertAsSubview(of view: UIView, aboveSubview siblingSubview: UIView)ParametersviewThe view on which the THEOplayer view will be added as a subview. siblingSubviewThe sibling view that will be behind the inserted THEOplayer view. 
- 
                  
                  Returns a Boolean value indicating whether THEOplayer is contained in the given array of UIview. Remark Example: self.theoplayer.isContained(in: self.view.subviews)DeclarationSwift @objc public func isContained(in views: [UIView]) -> BoolParametersviewsThe array of views in which to search for THEOplayer. 
- 
                  
                  Requests Metrics data. DeclarationSwift @objc public func requestMetrics(completionHandler: @escaping (Any?, Error?) -> Void)ParameterscompletionHandlerA closure to invoke when operation completes to retreive Metrics or when an error is thrown. 
- 
                  
                  Request the seekable TimeRanges of the player. DeclarationSwift @objc public func requestSeekable(completionHandler: @escaping ([TimeRange]?, Error?) -> Void)ParameterscompletionHandlerA closure to invoke when operation completes or fails. 
- 
                  
                  Register a content protection integration Remark Remark: - This function allows for registering a ContentProtectionIntegrationFactoryfor a specific integrationId and keySystem.
- If a source is
set with the DRMConfiguration.integrationproperty set to this id, on a platform where the player will use the keySystem that corresponds with the givenKeySystemId, thisContentProtectionIntegrationFactorywill be used to construct aContentProtectionIntegrationbased on theDRMConfiguration.
- This ContentProtectionIntegrationallows for altering licenseand certificate requests and responses.
 DeclarationSwift public static func registerContentProtectionIntegration(integrationId: String, keySystem: KeySystemId, integrationFactory: ContentProtectionIntegrationFactory)ParametersintegrationIdAn id of the integration. keySystemThe KeySystemIdfor which theContentProtectionIntegrationFactoryshould be used.integrationFactoryFactory that will construct a ContentProtectionIntegration.
- This function allows for registering a 
- 
                  
                  Unloads the THEOplayer. Remark All future calls to this object will throw an error.DeclarationSwift @objc public func destroy()
- 
                  
                  API to configure TextTrack styles (for subtitles) Remark Only available on the native pipeline.Sample usage var tts = self.theoplayer?.textTrackStyle theoplayer.textTrackStyle?.backgroundColor = [TextTrackStyleRuleColor(UIColor.green)] theoplayer.textTrackStyle?.fontColor = [TextTrackStyleRuleColor(UIColor.red)] theoplayer.textTrackStyle?.edgeStyle = [TextTrackStyleRuleString(TextTrackStyleEdgeStyle.raised)] theoplayer.textTrackStyle?.fontFamily = [TextTrackStyleRuleString("American Typewriter")] theoplayer.textTrackStyle?.fontSize = [TextTrackStyleRuleNumber(120)] //20% increase theoplayer.textTrackStyle?.marginTop = [TextTrackStyleRuleNumber(0)] // top theoplayer.textTrackStyle?.marginLeft = [TextTrackStyleRuleNumber(0)] // leftDeclarationSwift @objc var textTrackStyle: TextTrackStyle? { get }
- 
                  
                  The Cast object helps you configure and control casting to external devices with THEOplayer. DeclarationSwift public var cast: Cast? { get }
- 
                  
                  The Fullscreenapi of theoplayer.DeclarationSwift var fullscreen: Fullscreen { get }
- 
                  
                  Attaches a gesture recognizer to THEOplayer. Remark Only available on iOS.DeclarationSwift @objc public func addGestureRecognizer(_ gestureRecognizer: UIGestureRecognizer)
- 
                  
                  Detaches a gesture recognizer from THEOplayer. Remark Only available on iOS.DeclarationSwift @objc public func removeGestureRecognizer(_ gestureRecognizer: UIGestureRecognizer)
- 
                  
                  List of the gesture recognizers attached to THEOplayer. Remark Only available on iOS.DeclarationSwift @objc public var gestureRecognizers: [UIGestureRecognizer]? { get }
- 
                  
                  The Yospace object to access the Yospace internal API. Requires the Yospace SDK to be included.DeclarationSwift var yospace: Yospace? { get }
- 
                  
                  A PictureInPictureobject to configure Picture-In-Picture.DeclarationSwift var pip: PictureInPicture? { get }
- 
                  
                  A RelatedContentobject to configure Related Content.DeclarationSwift var related: RelatedContent { get }
- 
                  
                  Whether the fullscreen mode is coupled to device orientation, defaults to false. When enabled, landscape mode will trigger fullscreen mode and portrait mode will trigger non-fullscreen mode. Remark Changes in the device orientation or fullscreen state will also trigger their coupled mode if enabled.DeclarationSwift @objc var fullscreenOrientationCoupling: Bool { get set }
- 
                  
                  Add a JavaScript message listener. When using a custom JavaScript file, you can communicate to native code through the window.webkit.messageHandlers.'messageName'.postMessage()method.DeclarationSwift @objc func addJavascriptMessageListener(name: String, listener: @escaping ([String : Any]) -> ())ParametersnameThe name of the message. listenerThe callback invoked in native code. 
- 
                  
                  Remove a JavaScript message listener previously added with addJavascriptMessageListener(...)DeclarationSwift @objc func removeJavascriptMessageListener(name: String)ParametersnameThe name of the message to be removed. 
- 
                  
                  Evaluates a JavaScript string. The method sends the result of the script evaluation (or an error) to the completion handler. The completion handler always runs on the main thread. DeclarationSwift @objc func evaluateJavaScript(_ javaScriptString: String, completionHandler: ((Any?, Error?) -> Void)? = nil)ParametersjavaScriptStringThe JavaScript string to evaluate. completionHandlerA block to invoke when script evaluation completes or fails. 
- 
                  
                  A VR object to access and control 360/VR playback. DeclarationSwift var vr: VR? { get set }
- 
                  
                  The Cache object to access the caching API. DeclarationSwift static var cache: Cache { get }
- 
                  
                  The Verizon Media object to access the Verizon Media API. Remark Only available on web pipeline.DeclarationSwift var verizonMedia: VerizonMedia { get }
 THEOplayer Class Reference
      THEOplayer Class Reference