RelatedContent_Objc
@available(*, deprecated, message: "This protocol will be removed with the next major release.")
@objc(THEOplayerRelatedContent)
public protocol RelatedContent_Objc
The Related Content API can be used to show new content related to the current content.
-
List of the current
RelatedContentSource
.Declaration
Swift
var sources: [RelatedContentSource] { get set }
-
Show the related content screen.
Declaration
Swift
func show()
-
Hide the related content screen.
Declaration
Swift
func hide()
-
Whether the related content screen is showing.
Declaration
Swift
var showing: Bool { get }
-
Adds the event listener of the given
EventType
.Remark
When attaching a listener on the wrong object the application will crash.
Declaration
Swift
@discardableResult func addEventListener(type: String, listener: @escaping (RelatedContentEvent) -> ()) -> EventListener
Parameters
type
EventType
of the added event listener. SeeRelatedContentEventTypes
for possible values.listener
Closure called when event is dispatched.
Return Value
The newly added
EventListener
. -
Removes the event listener for the given
EventType
.Declaration
Swift
func removeEventListener(type: String, listener: EventListener)
Parameters
type
EventType
of the event listener to be removed. SeeRelatedContentEventTypes
for possible values.listener
EventListener
which was added byaddEventListener(...)
.