Specifying bitrate and video format

Stay organized with collections Save and categorize content based on your preferences.

VAST responses can contain multiple media files with different bitrates and in different formats. The SDK chooses the appropriate bitrate based on the current network conditions:

  • max 500 kbit/s for cellular connection
  • unlimited for WiFi

If you want to specify preferred video formats and bitrate, use an IMAAdsRenderingSettings instance to pass this information at the time of Ads Manager initialization.

- (void)adsLoader:(IMAAdsLoader *)loader adsLoadedWithData:(IMAAdsLoadedData *)adsLoadedData {
  self.adsManager = adsLoadedData.adsManager;
  self.adsManager.delegate = self;
  IMAAdsRenderingSettings *settings = [[IMAAdsRenderingSettings alloc] init];
  settings.bitrate = 1024;  // kbits
  settings.mimeTypes = @[ @"video/mp4", @"application/x-mpegURL"];
  [self.adsManager initializeWithContentPlayhead:nil adsRenderingSettings:settings];
}