# IMALiveStreamRequest

    @interface IMALiveStreamRequest : https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAStreamRequest.html

Data object describing a live stream request.
- `


  ### [assetKey](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMALiveStreamRequest#/c:objc(cs)IMALiveStreamRequest(py)assetKey)


  ` This is used to determine which stream should be played.
  The live stream request asset key is an identifier which can be
  [found in the DFP UI](https://goo.gl/wjL9DI).

  @type {!string}

  #### Declaration

  Swift

      var assetKey: String { get }

  Objective-C

      @property (nonatomic, copy, readonly) NSString *_Nonnull assetKey;

- `


  ### [useHLSInterstitials](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMALiveStreamRequest#/c:objc(cs)IMALiveStreamRequest(py)useHLSInterstitials)


  ` Specifies whether to use HLS interstitials for this stream. This will request that DAI use HLS
  interstitials, or return an error if interstitials are not supported. If IMAAVPlayerVideoDisplay
  is used in the stream request, the SDK will perform a compatibility check to ensure the device
  can handle HLS interstitial playback, and will throw an error at request time otherwise. If a
  custom video display is used, the compatibility check will not be performed.

  #### Declaration

  Swift

      var useHLSInterstitials: Bool { get set }

  Objective-C

      @property (nonatomic) BOOL useHLSInterstitials;

- `


  ### [-initWithAssetKey:networkCode:adDisplayContainer:videoDisplay:userContext:](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMALiveStreamRequest#/c:objc(cs)IMALiveStreamRequest(im)initWithAssetKey:networkCode:adDisplayContainer:videoDisplay:userContext:)


  ` Initializes a live stream request instance with the given assetKey. Uses the given ad display
  container to display the stream.

  #### Declaration

  Swift

      init(assetKey: String, networkCode: String?, adDisplayContainer: https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdDisplayContainer.html, videoDisplay: any https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Protocols/IMAVideoDisplay.html, userContext: Any?)

  Objective-C

      - (nonnull instancetype)
            initWithAssetKey:(nonnull NSString *)assetKey
                 networkCode:(nullable NSString *)networkCode
          adDisplayContainer:(nonnull https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdDisplayContainer.html *)adDisplayContainer
                videoDisplay:(nonnull id<https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Protocols/IMAVideoDisplay.html>)videoDisplay
                 userContext:(nullable id)userContext;

  #### Parameters

  |---|---|
  | ` assetKey ` | the stream assetKey |
  | ` networkCode ` | the network code for the stream (optional but recommended). |
  | ` adDisplayContainer ` | the IMAAdDisplayContainer for rendering the ad UI |
  | ` videoDisplay ` | the IMAVideoDisplay for playing the stream |
  | ` userContext ` | The user context for tracking requests (optional) |

  #### Return Value

  the IMALiveStreamRequest instance
- `


  ### [-initWithAssetKey:networkCode:adDisplayContainer:videoDisplay:pictureInPictureProxy:userContext:](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMALiveStreamRequest#/c:objc(cs)IMALiveStreamRequest(im)initWithAssetKey:networkCode:adDisplayContainer:videoDisplay:pictureInPictureProxy:userContext:)


  ` Initializes a live stream request instance with the given assetKey. Uses the given ad display
  container to display the stream. Uses the picture in picture proxy to track PIP events.

  #### Declaration

  Swift

      init(assetKey: String, networkCode: String?, adDisplayContainer: https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdDisplayContainer.html, videoDisplay: any https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Protocols/IMAVideoDisplay.html, pictureInPictureProxy: https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAPictureInPictureProxy.html?, userContext: Any?)

  Objective-C

      - (nonnull instancetype)
               initWithAssetKey:(nonnull NSString *)assetKey
                    networkCode:(nullable NSString *)networkCode
             adDisplayContainer:(nonnull https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdDisplayContainer.html *)adDisplayContainer
                   videoDisplay:(nonnull id<https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Protocols/IMAVideoDisplay.html>)videoDisplay
          pictureInPictureProxy:
              (nullable https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAPictureInPictureProxy.html *)pictureInPictureProxy
                    userContext:(nullable id)userContext;

  #### Parameters

  |---|---|
  | ` assetKey ` | the stream assetKey |
  | ` networkCode ` | the network code for the stream (optional but recommended). |
  | ` adDisplayContainer ` | the IMAAdDisplayContainer for rendering the ad UI |
  | ` videoDisplay ` | the IMAVideoDisplay for playing the stream |
  | ` pictureInPictureProxy ` | the IMAPictureInPictureProxy for tracking PIP events |
  | ` userContext ` | The user context for tracking requests (optional) |

  #### Return Value

  the IMALiveStreamRequest instance
- `


  ### [-initWithAssetKey:adDisplayContainer:videoDisplay:userContext:](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMALiveStreamRequest#/c:objc(cs)IMALiveStreamRequest(im)initWithAssetKey:adDisplayContainer:videoDisplay:userContext:)


  ` Deprecated

  Use initWithAssetKey:networkCode:adDisplayContainer:videoDisplay:userContext: instead.
  Initializes a live stream request instance with the given assetKey. Uses the given ad display
  container to display the stream.

  #### Declaration

  Swift

      init(assetKey: String, adDisplayContainer: https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdDisplayContainer.html, videoDisplay: any https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Protocols/IMAVideoDisplay.html, userContext: Any?)

  Objective-C

      - (nonnull instancetype)
            initWithAssetKey:(nonnull NSString *)assetKey
          adDisplayContainer:(nonnull https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdDisplayContainer.html *)adDisplayContainer
                videoDisplay:(nonnull id<https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Protocols/IMAVideoDisplay.html>)videoDisplay
                 userContext:(nullable id)userContext;

  #### Parameters

  |---|---|
  | ` assetKey ` | the stream assetKey |
  | ` adDisplayContainer ` | the IMAAdDisplayContainer for rendering the ad UI |
  | ` videoDisplay ` | the IMAVideoDisplay for playing the stream |
  | ` userContext ` | The user context for tracking requests (optional) |

  #### Return Value

  the IMALiveStreamRequest instance
- `


  ### [-initWithAssetKey:adDisplayContainer:videoDisplay:pictureInPictureProxy:userContext:](https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMALiveStreamRequest#/c:objc(cs)IMALiveStreamRequest(im)initWithAssetKey:adDisplayContainer:videoDisplay:pictureInPictureProxy:userContext:)


  ` Deprecated

  Use initWithAssetKey:networkCode:adDisplayContainer:videoDisplay:pictureInPictureProxy:userContext: instead.
  Initializes a live stream request instance with the given assetKey. Uses the given ad display
  container to display the stream. Uses the picture in picture proxy to track PIP events.

  #### Declaration

  Swift

      init(assetKey: String, adDisplayContainer: https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdDisplayContainer.html, videoDisplay: any https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Protocols/IMAVideoDisplay.html, pictureInPictureProxy: https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAPictureInPictureProxy.html?, userContext: Any?)

  Objective-C

      - (nonnull instancetype)
               initWithAssetKey:(nonnull NSString *)assetKey
             adDisplayContainer:(nonnull https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAAdDisplayContainer.html *)adDisplayContainer
                   videoDisplay:(nonnull id<https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Protocols/IMAVideoDisplay.html>)videoDisplay
          pictureInPictureProxy:
              (nullable https://developers.google.com/ad-manager/dynamic-ad-insertion/sdk/ios/reference/Classes/IMAPictureInPictureProxy.html *)pictureInPictureProxy
                    userContext:(nullable id)userContext;

  #### Parameters

  |---|---|
  | ` assetKey ` | the stream assetKey |
  | ` adDisplayContainer ` | the IMAAdDisplayContainer for rendering the ad UI |
  | ` videoDisplay ` | the IMAVideoDisplay for playing the stream |
  | ` pictureInPictureProxy ` | the IMAPictureInPictureProxy for tracking PIP events |
  | ` userContext ` | The user context for tracking requests (optional) |

  #### Return Value

  the IMALiveStreamRequest instance