RelatedContentSource
@available(*, deprecated, message: "This class will be removed with the next major release.")
@objc(THEOplayerRelatedContentSource)
public class RelatedContentSource : NSObject, Codable
The Related Content Source object. Can be used to show additional content, besides the content currently shown, that might also be of interest to the viewer.
-
The duration property can be used to display a duration on the tile of the related content video.
Declaration
Swift
@objc public let duration: String?
-
The image property can be used to set the background image on the tile of the related content video.
Declaration
Swift
@objc public let image: String
-
The link property can be used to specify a target URL to navigate to, when clicking the tile of the related content video. Specifying a link will redirect to a new page.
Declaration
Swift
@objc public let link: String?
-
A source object specifying the source to play. Specifying a source will reset the player’s SourceDescription and allow the same player to play the new source without the need to redirect to a new page.
Declaration
Swift
@objc public let source: SourceDescription?
-
The title property can be used to display a title on the tile of the related content video.
Declaration
Swift
@objc public let title: String?
-
Constructs a RelatedContentSource with link
Declaration
Swift
@objc public convenience init(image: String, link: String, duration: String? = nil, title: String? = nil)
Parameters
image
The URL of the background image on the tile of the related content video.
link
The target URL to navigate to, when clicking the tile of the related content video. Specifying a link will redirect to a new page.
duration
The duration that will be displayed on the tile of the related content video, in seconds. Defaults to nil.
title
The title that will be displayed on the tile of the related content video. Defaults to nil.
-
Constructs a RelatedContentSource with link
Declaration
Swift
@objc public convenience init(image: String, link: String)
Parameters
image
The URL of the background image on the tile of the related content video.
link
The target URL to navigate to, when clicking the tile of the related content video. Specifying a link will redirect to a new page.
-
Constructs a RelatedContentSource with
SourceDescription
.Declaration
Swift
@objc public convenience init(image: String, source: SourceDescription, duration: String? = nil, title: String? = nil)
Parameters
image
The URL of the background image on the tile of the related content video.
source
A source object specifying the source to play. Specifying a source will reset the player’s SourceDescription and allow the same player to play the new source without the need to redirect to a new page.
duration
The duration that will be displayed on the tile of the related content video, in seconds. Defaults to nil.
title
The title that will be displayed on the tile of the related content video. Defaults to nil.
-
Constructs a RelatedContentSource with
SourceDescription
.Declaration
Swift
@objc public convenience init(image: String, source: SourceDescription)
Parameters
image
The URL of the background image on the tile of the related content video.
source
A source object specifying the source to play. Specifying a source will reset the player’s SourceDescription and allow the same player to play the new source without the need to redirect to a new page.