VerizonMediaAdBreak
@available(*, deprecated, message: "This protocol will be removed with the next major release.")
public protocol VerizonMediaAdBreak : EventDispatcherProtocol
The Verizon Media ad break API.
-
Start time of the ad break, in seconds.
Declaration
Swift
var startTime: Double { get }
-
End time of the ad break relative to the content duration, in seconds.
Declaration
Swift
var endTime: Double? { get }
-
The duration of the ad break, in seconds.
Declaration
Swift
var duration: Double? { get }
-
A list of ads in this break.
Declaration
Swift
var ads: VerizonMediaAdArray { get }
-
A unique identifier
Declaration
Swift
var identifier: AnyHashable { get }
-
Offset after which the ad may be skipped, in seconds.
Remark
- If the offset is -1, the ad is unskippable.
- If the offset is 0 , the ad is immediately skippable.
- Otherwise it must be a positive number indicating the offset.
Declaration
Swift
var skipOffset: Double { get set }
-
Adds the event listener of the given
EventType
.Remark
When attaching a listener on the wrong object, the application will crash.
Declaration
Swift
func addEventListener<E>(type: EventType<E>, listener: @escaping (E) -> ()) -> EventListener where E : EventProtocol
Parameters
type
EventType
of the added event listener. SeeVerizonMediaAdBreakEventTypes
for possible values.listener
Closure called when event is dispatched.
Return Value
The newly added
EventListener
. -
Removes the event listener of the given
EventType
.Declaration
Swift
func removeEventListener<E>(type: EventType<E>, listener: EventListener) where E : EventProtocol
Parameters
type
EventType
of the event listener to be removed. SeeVerizonMediaAdBreakEventTypes
for possible values.listener
EventListener
which was added byaddEventListener(...)