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.
the 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, a language name
to specify the set of subtitles if multiple sets exist for the same language,
and one or more subtitle key/value pairs. Here’s an example NSDictionary for
English:
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-01-14 UTC."],[[["\u003cp\u003e\u003ccode\u003eIMAVideoDisplay\u003c/code\u003e is a protocol used for ad playback, allowing publishers to manage video content within their applications.\u003c/p\u003e\n"],["\u003cp\u003eIt provides controls for playback, such as \u003ccode\u003eplay\u003c/code\u003e, \u003ccode\u003epause\u003c/code\u003e, \u003ccode\u003ereset\u003c/code\u003e, and \u003ccode\u003eseekStreamToTime\u003c/code\u003e, enabling basic video interactions.\u003c/p\u003e\n"],["\u003cp\u003ePublishers can use the \u003ccode\u003edelegate\u003c/code\u003e property to receive player events from the SDK.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eloadStream\u003c/code\u003e method facilitates the loading of video streams with optional subtitles, catering to dynamic ad insertion for VOD streams.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003evolume\u003c/code\u003e property allows adjusting the ad's volume relative to the device's overall volume.\u003c/p\u003e\n"]]],[],null,["IMAVideoDisplay \n\n @protocol IMAVideoDisplay \u003c../Protocols/IMAAdPlaybackInfo.html\u003e\n\nDeclares a simple video display class used for ad playback.\n- `\n ``\n ``\n `\n\n [delegate](#/c:objc(pl)IMAVideoDisplay(py)delegate)`\n ` \n Allows the publisher to send player events to the SDK. \n\n Declaration \n Swift \n\n weak var delegate: (any ../Protocols/IMAVideoDisplayDelegate.html)? { get set }\n\n Objective-C \n\n @property (nonatomic, weak, nullable) id\u003c../Protocols/IMAVideoDisplayDelegate.html\u003e delegate;\n\n- `\n ``\n ``\n `\n\n [volume](#/c:objc(pl)IMAVideoDisplay(py)volume)`\n ` \n Set and get the volume for the current ad. From 0 (muted) to 1 (loudest). This volume is\n relative to device volume, not absolute. Default value is 1. \n\n Declaration \n Swift \n\n var volume: Float { get set }\n\n Objective-C \n\n @property (nonatomic) float volume;\n\n- `\n ``\n ``\n `\n\n [-loadStream:withSubtitles:](#/c:objc(pl)IMAVideoDisplay(im)loadStream:withSubtitles:)`\n ` \n Called to inform the VideoDisplay to load the passed URL with the subtitles for the stream.\n Subtitles are available only for dynamic ad insertion VOD streams and can be ignored\n for client side ads or dynamic ad insertion live streams. \n\n Declaration \n Swift \n\n func loadStream(_ streamURL: URL, withSubtitles subtitles: [[String : String]])\n\n Objective-C \n\n - (void)loadStream:(nonnull NSURL *)streamURL\n withSubtitles:\n (nonnull NSArray\u003cNSDictionary\u003cNSString *, NSString *\u003e *\u003e *)subtitles;\n\n Parameters\n\n |-------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n | ` `*streamURL*` ` | the URL of the stream |\n | ` `*subtitles*` ` | the 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, a *language name* to specify the set of subtitles if multiple sets exist for the same language, and one or more subtitle key/value pairs. Here's an example NSDictionary for English: \"language\" -\u003e \"en\" \"language_name\" -\u003e \"English\" \"webvtt\" -\u003e \"https://somedomain.com/vtt/en.vtt\" \"ttml\" -\u003e \"https://somedomain.com/ttml/en.ttml\" |\n\n- `\n ``\n ``\n `\n\n [-play](#/c:objc(pl)IMAVideoDisplay(im)play)`\n ` \n Called to inform the VideoDisplay to play. \n\n Declaration \n Swift \n\n func play()\n\n Objective-C \n\n - (void)play;\n\n- `\n ``\n ``\n `\n\n [-pause](#/c:objc(pl)IMAVideoDisplay(im)pause)`\n ` \n Called to inform the VideoDisplay to pause. \n\n Declaration \n Swift \n\n func pause()\n\n Objective-C \n\n - (void)pause;\n\n- `\n ``\n ``\n `\n\n [-reset](#/c:objc(pl)IMAVideoDisplay(im)reset)`\n ` \n Called to remove all video assets from the player. \n\n Declaration \n Swift \n\n func reset()\n\n Objective-C \n\n - (void)reset;\n\n- `\n ``\n ``\n `\n\n [-seekStreamToTime:](#/c:objc(pl)IMAVideoDisplay(im)seekStreamToTime:)`\n ` \n Called to inform that the stream needs to be seeked to the given time. \n\n Declaration \n Swift \n\n func seekStream(toTime time: TimeInterval)\n\n Objective-C \n\n - (void)seekStreamToTime:(NSTimeInterval)time;\n\n Parameters\n\n |--------------|-----------------------------------------------|\n | ` `*time*` ` | the time to which the stream should be seeked |"]]