Identifier used during dynamic ad insertion to uniquely identify a stream. This can be used in
the Stream Activity Monitor Debug Console to debug the stream session.
Returns the previous cuepoint for the given stream time. Returns nil if no such cuepoint exists.
This is used to implement features like snap back, and called when the publisher detects that
the user seeked in order to force the user to watch an ad break they may have skipped over.
Requests SDK to retrieve the ad metadata and then load the provided streamManifestUrl and
streamSubtitles into the player. This should be manually triggered once the stream manifest has
been retrieved from the third party video stitcher. Note that this is only used for Pod serving
VOD with a third party video stitcher, and is a no-op for other stream request types.
[[["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\u003eThe IMAStreamManager class is the primary tool for playing streams and managing ads within them.\u003c/p\u003e\n"],["\u003cp\u003eIt provides functionalities like getting stream/content time, cuepoints for ad breaks, and replacing ad tag parameters.\u003c/p\u003e\n"],["\u003cp\u003ePublishers can initialize the stream manager, handle stream events via a delegate, and utilize cuepoints for features like snap back.\u003c/p\u003e\n"],["\u003cp\u003eIt supports dynamic ad insertion for live streams and third-party stream loading for VOD with a video stitcher.\u003c/p\u003e\n"],["\u003cp\u003eStream managers can be destroyed to clean up internal state for proper deallocation.\u003c/p\u003e\n"]]],[],null,["# GoogleInteractiveMediaAds Framework Reference\n\nIMAStreamManager\n================\n\n @interface IMAStreamManager : NSObject\n\nThe IMAStreamManager class is responsible for playing streams.\n- `\n ``\n ``\n `\n\n ### [delegate](#/c:objc(cs)IMAStreamManager(py)delegate)\n\n `\n ` \n The IMAStreamManagerDelegate to notify with events during stream playback. \n\n #### Declaration\n\n Swift \n\n weak var delegate: (any NSObjectProtocol & ../Protocols/IMAStreamManagerDelegate.html)? { get set }\n\n Objective-C \n\n @property (nonatomic, weak, nullable) NSObject\u003c../Protocols/IMAStreamManagerDelegate.html\u003e *delegate;\n\n- `\n ``\n ``\n `\n\n ### [streamId](#/c:objc(cs)IMAStreamManager(py)streamId)\n\n `\n ` \n Identifier used during dynamic ad insertion to uniquely identify a stream. This can be used in\n the Stream Activity Monitor Debug Console to debug the stream session. \n\n #### Declaration\n\n Swift \n\n var streamId: String? { get }\n\n Objective-C \n\n @property (nonatomic, copy, readonly, nullable) NSString *streamId;\n\n- `\n ``\n ``\n `\n\n ### [cuepoints](#/c:objc(cs)IMAStreamManager(py)cuepoints)\n\n `\n ` \n The cuepoints for the current stream, populated after `kIMAAdEvent_CUEPOINTS_CHANGED` event is\n dispatched. Will be empty for live streams. \n\n #### Declaration\n\n Swift \n\n var cuepoints: [../Classes/IMACuepoint.html] { get }\n\n Objective-C \n\n @property (nonatomic, readonly) NSArray\u003c../Classes/IMACuepoint.html *\u003e *_Nonnull cuepoints;\n\n- `\n ``\n ``\n `\n\n ### [-initializeWithAdsRenderingSettings:](#/c:objc(cs)IMAStreamManager(im)initializeWithAdsRenderingSettings:)\n\n `\n ` \n Initializes and loads the stream. \n\n #### Declaration\n\n Swift \n\n func initialize(with adsRenderingSettings: ../Classes/IMAAdsRenderingSettings.html?)\n\n Objective-C \n\n - (void)initializeWithAdsRenderingSettings:\n (nullable ../Classes/IMAAdsRenderingSettings.html *)adsRenderingSettings;\n\n #### Parameters\n\n |------------------------------|-----------------------------------------------------------------------------------------------------------|\n | ` `*adsRenderingSettings*` ` | the IMAAdsRenderingSettings. Pass in to influence ad rendering. Use nil to default to standard rendering. |\n\n- `\n ``\n ``\n `\n\n ### [-streamTimeForContentTime:](#/c:objc(cs)IMAStreamManager(im)streamTimeForContentTime:)\n\n `\n ` \n Returns the stream time with ads for a given content time. Returns the given content time\n for live streams. \n\n #### Declaration\n\n Swift \n\n func streamTime(forContentTime contentTime: TimeInterval) -\u003e TimeInterval\n\n Objective-C \n\n - (NSTimeInterval)streamTimeForContentTime:(NSTimeInterval)contentTime;\n\n #### Parameters\n\n |---------------------|-----------------------------------------------|\n | ` `*contentTime*` ` | the content time without any ads (in seconds) |\n\n #### Return Value\n\n the stream time that corresponds with the given content time once ads are inserted\n- `\n ``\n ``\n `\n\n ### [-contentTimeForStreamTime:](#/c:objc(cs)IMAStreamManager(im)contentTimeForStreamTime:)\n\n `\n ` \n Returns the content time without ads for a given stream time. Returns the given stream time\n for live streams. \n\n #### Declaration\n\n Swift \n\n func contentTime(forStreamTime streamTime: TimeInterval) -\u003e TimeInterval\n\n Objective-C \n\n - (NSTimeInterval)contentTimeForStreamTime:(NSTimeInterval)streamTime;\n\n #### Parameters\n\n |--------------------|------------------------------------------------|\n | ` `*streamTime*` ` | the stream time with inserted ads (in seconds) |\n\n #### Return Value\n\n the content time that corresponds with the given stream time once ads are removed\n- `\n ``\n ``\n `\n\n ### [-previousCuepointForStreamTime:](#/c:objc(cs)IMAStreamManager(im)previousCuepointForStreamTime:)\n\n `\n ` \n Returns the previous cuepoint for the given stream time. Returns nil if no such cuepoint exists.\n This is used to implement features like snap back, and called when the publisher detects that\n the user seeked in order to force the user to watch an ad break they may have skipped over. \n\n #### Declaration\n\n Swift \n\n func previousCuepoint(forStreamTime streamTime: TimeInterval) -\u003e ../Classes/IMACuepoint.html?\n\n Objective-C \n\n - (nullable ../Classes/IMACuepoint.html *)previousCuepointForStreamTime:\n (NSTimeInterval)streamTime;\n\n #### Parameters\n\n |--------------------|-----------------------------------------|\n | ` `*streamTime*` ` | the stream time that the was seeked to. |\n\n #### Return Value\n\n the previous IMACuepoint for the given stream time.\n- `\n ``\n ``\n `\n\n ### [-replaceAdTagParameters:](#/c:objc(cs)IMAStreamManager(im)replaceAdTagParameters:)\n\n `\n ` \n Replaces all of the ad tag parameters used for upcoming ad requests for a\n live stream.\n Note that this call is a no-op for VOD streams. \n\n #### Declaration\n\n Swift \n\n func replaceAdTagParameters(_ adTagParameters: [String : String]?)\n\n Objective-C \n\n - (void)replaceAdTagParameters:\n (nullable NSDictionary\u003cNSString *, NSString *\u003e *)adTagParameters;\n\n #### Parameters\n\n |-------------------------|---------------------------------------------------|\n | ` `*adTagParameters*` ` | the new ad tag parameters for the current stream. |\n\n- `\n ``\n ``\n `\n\n ### [-loadThirdPartyStream:streamSubtitles:](#/c:objc(cs)IMAStreamManager(im)loadThirdPartyStream:streamSubtitles:)\n\n `\n ` \n Requests SDK to retrieve the ad metadata and then load the provided streamManifestUrl and\n streamSubtitles into the player. This should be manually triggered once the stream manifest has\n been retrieved from the third party video stitcher. Note that this is only used for Pod serving\n VOD with a third party video stitcher, and is a no-op for other stream request types. \n\n #### Declaration\n\n Swift \n\n func loadThirdPartyStream(_ streamURL: URL, streamSubtitles: [[String : String]])\n\n Objective-C \n\n - (void)loadThirdPartyStream:(nonnull NSURL *)streamURL\n streamSubtitles:\n (nonnull NSArray\u003cNSDictionary\u003cNSString *, NSString *\u003e *\u003e *)\n streamSubtitles;\n\n #### Parameters\n\n |-------------------------|------------------------------------------------------------|\n | ` `*streamURL*` ` | the manifest url for the stream with dynamic ad insertion. |\n | ` `*streamSubtitles*` ` | the subtitles array for the stream. |\n\n- `\n ``\n ``\n `\n\n ### [-destroy](#/c:objc(cs)IMAStreamManager(im)destroy)\n\n `\n ` \n Cleans the stream manager's internal state for proper deallocation. \n\n #### Declaration\n\n Swift \n\n func destroy()\n\n Objective-C \n\n - (void)destroy;"]]