IMAAVPlayerVideoDisplay Class Reference

IMAAVPlayerVideoDisplay Class Reference

Overview

An implementation of the IMAVideoDisplay protocol.

This object is intended to be initialized with the content player. The SDK will use this player to play the stream.

Inheritance diagram for IMAAVPlayerVideoDisplay:
<IMAVideoDisplay>

Instance Methods

(instancetype) - initWithAVPlayer:
 Creates an IMAAVPlayerVideoDisplay that will play the stream in the passed in video player. More...
 
(void) - reset
 Resets the IMAAVPlayerVideoDisplay and removes any observers on the player item. More...
 
(void) - loadURL:withSubtitles:
 Called to inform the VideoDisplay to load the passed URL with the subtitles for the stream. More...
 

Properties

AVPlayer * player
 The player used for stream playback. More...
 
id
< IMAAVPlayerVideoDisplayDelegate > 
avPlayerVideoDisplayDelegate
 Allows the publisher to receive IMAAVPlayerVideoDisplay specific events. More...
 
NSArray< NSDictionary * > * subtitles
 The subtitles for the current stream. More...
 
id< IMAVideoDisplayDelegate > delegate
 Allows the player to send events to the SDK. More...
 

Method Documentation

- (instancetype) initWithAVPlayer: (AVPlayer *)  player

Creates an IMAAVPlayerVideoDisplay that will play the stream in the passed in video player.

Parameters
playerThe AVPlayer instance used for playing the stream
Returns
An IMAAVPlayerVideoDisplay instance
- (void) reset

Resets the IMAAVPlayerVideoDisplay and removes any observers on the player item.

- (void) loadURL: (NSURL *)  url
withSubtitles: (NSArray< NSDictionary * > *)  subtitles 

Called to inform the VideoDisplay to load the passed URL with the subtitles for the stream.

Subtitles are available only for dynamic ad insertion VOD streams and can be ignored for client side ads or dynamic ad insertion live streams.

Parameters
urlThe URL of the stream
subtitlesThe subtitles for the stream. Each entry in the subtitles array is an NSDictionary that corresponds to a language. Each dictionary will have a language key with a two letter language string value and one or more subtitle key/value pairs. Here's an example NSDictionary for English:

"language" -> "en" "webvtt" -> "https://somedomain.com/vtt/en.vtt" "ttml" -> "https://somedomain.com/ttml/en.ttml"

Property Documentation

- (AVPlayer*) player
readnonatomicstrong

The player used for stream playback.

- (id<IMAAVPlayerVideoDisplayDelegate>) avPlayerVideoDisplayDelegate
readwritenonatomicweak

Allows the publisher to receive IMAAVPlayerVideoDisplay specific events.

- (NSArray<NSDictionary *>*) subtitles
readnonatomicstrong

The subtitles for the current stream.

Will be nil until the stream starts playing.

- (id<IMAVideoDisplayDelegate>) delegate
readwritenonatomicweakinherited

Allows the player to send events to the SDK.

Send feedback about...

IMA DAI SDK for tvOS
Need help? Visit our support page.