Specify bitrate and media 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
Note: iOS does not provide any detailed information on the
current network speed, so the iOS SDK tries to be conservative when on cellular
connection.
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];
}
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-28 UTC.
[null,null,["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eVAST responses may contain multiple media files with varying bitrates and formats, and the SDK automatically selects the appropriate bitrate based on network conditions (500 kbit/s maximum for cellular and unlimited for WiFi).\u003c/p\u003e\n"],["\u003cp\u003eOn iOS, the SDK uses a conservative approach for cellular connections due to limited network speed information.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can specify preferred video formats and bitrates using \u003ccode\u003eIMAAdsRenderingSettings\u003c/code\u003e during Ads Manager initialization to override the SDK's default behavior.\u003c/p\u003e\n"]]],[],null,["# Specify bitrate and media format\n\nVAST responses can contain multiple media files with different\nbitrates and in different formats. The SDK chooses the appropriate bitrate\nbased on the current network conditions:\n\n- max 500 kbit/s for cellular connection\n- unlimited for WiFi\n\n**Note:** iOS does not provide any detailed information on the\ncurrent network speed, so the iOS SDK tries to be conservative when on cellular\nconnection.\n\nIf you want to specify preferred video formats and bitrate, use an\n[IMAAdsRenderingSettings](/interactive-media-ads/docs/sdks/ios/client-side/reference/Classes/IMAAdsRenderingSettings)\ninstance to pass this information at the time of Ads Manager initialization. \n\n```objective-c\n- (void)adsLoader:(IMAAdsLoader *)loader adsLoadedWithData:(IMAAdsLoadedData *)adsLoadedData {\n self.adsManager = adsLoadedData.adsManager;\n self.adsManager.delegate = self;\n IMAAdsRenderingSettings *settings = [[IMAAdsRenderingSettings alloc] init];\n settings.bitrate = 1024; // kbits\n settings.mimeTypes = @[ @\"video/mp4\", @\"application/x-mpegURL\"];\n [self.adsManager initializeWithContentPlayhead:nil adsRenderingSettings:settings];\n}\n```"]]