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-08-20 UTC."],[[["\u003cp\u003eIMAStreamManager is the primary class for managing and playing ad-supported streams in the IMA SDK.\u003c/p\u003e\n"],["\u003cp\u003eIt provides methods to initialize, control, and interact with stream playback, including ad insertion and cuepoints.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can access stream and content time information, manage ad tag parameters, and handle third-party stream integrations.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers features like seeking to previous cuepoints and stream time manipulation for content synchronization.\u003c/p\u003e\n"],["\u003cp\u003eIMAStreamManager must be destroyed explicitly using \u003ccode\u003edestroy()\u003c/code\u003e to ensure proper resource cleanup.\u003c/p\u003e\n"]]],["The `IMAStreamManager` class manages stream playback, including ad insertion. Key actions include initializing streams with `initializeWithAdsRenderingSettings:`, obtaining stream/content time conversions via `streamTimeForContentTime:` and `contentTimeForStreamTime:`, and retrieving cue points with `cuepoints` and `previousCuepointForStreamTime:`. It also handles live stream ad tag parameter replacement using `replaceAdTagParameters:`, and loading third-party streams through `loadThirdPartyStream:streamSubtitles:`. It notifies the `IMAStreamManagerDelegate` of stream events and cleans its internal state with `destroy`.\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;"]]