diff --git a/prebid-mobile/pbm-api/android/pbm-video-rewarded-adunit-android.md b/prebid-mobile/pbm-api/android/pbm-video-rewarded-adunit-android.md index aa1452d242..dd08df289a 100755 --- a/prebid-mobile/pbm-api/android/pbm-video-rewarded-adunit-android.md +++ b/prebid-mobile/pbm-api/android/pbm-video-rewarded-adunit-android.md @@ -32,6 +32,105 @@ RewardedVideoAdUnit("configId"); `configId`: String; Prebid Server configuration ID. +### Paramaters + +Parameters is a sub class of videoAdUnit.Create new Parameters class to define the parameters of the video ad unit. Parameters contain the OpenRTB video attributes. + + +**Parameters** + +`placement: [int] or [enum]`: OpenRTB placement + +`api: [int] or [enum]`: OpenRTB api frameworks + +`maxBitrate: int`: OpenRTB maxBirate + +`minBitrate: int`: OpenRTB minBitrate + +`maxDuration:int`: OpenRTB maxDuration + +`minDuration: int`: OpenRTB minDuration + +`mimes: [string]`: OpenRTB mime types + +`playbackMethod: [int]`: OpenRTB playbackMethod + +`protocols: [int] or [enum]`: OpenRTB Protocols + + +### placement + +[OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) Placement Type for the auction can be expressed as an integer array or can use an enum for easier readability. Option 1 (in-stream) is intentionally left out due to lack of in-stream support in Prebid SDK. + +In the context of a VideoInterstitialAdUnit, rewarded video ads are typically labled as interstitial. As such, Prebid SDK will default to value 5 if no placement value is supplied. + +* `2` or `InBanner` : In-Banner placement exists within a web banner that leverages the banner space to deliver a video experience as opposed to another static or rich media format. The format relies on the existence of display ad inventory on the page for its delivery. +* `3` or `InArticle` : In-Article placement loads and plays dynamically between paragraphs of editorial content; existing as a standalone branded message. +* `4` or `InFeed` : In-Feed placement is found in content, social, or product feeds. +* `5` or `Slider` or `Floating` or `Interstitial` : Open RTB supports one of three values for option 5 as eitehr Slider, Floating or Interstitial. If an enum value is supplied in placement, bidders will recieve value 5 for placement type and assume to be interstitial with the instl flag set to 1. + + +#### api + +Array of integers or enum representing the supported OpenRTB Frameworks: + +* `1` or `Signals.Api.VPAID_1` : VPAID 1.0 +* `2` or `Signals.Api.VPAID_2` : VPAID 2.0 +* `3` or `Signals.Api.MRAID_1` : MRAID-1 +* `4` or `Signals.Api.ORMMA` : ORMMA +* `5` or `Signals.Api.MARAID_2` : MRAID-2 +* `6` or `Signals.Api.MARAID_3` : MRAID-3 + + +#### maxBitrate + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) maximum bit rate in Kbps. + + +#### minBitrate + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) minimum bit rate in Kbps. + + +#### maxDuration + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) maximum video ad duration in seconds. + + +#### minDuration + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) minimum video ad duration in seconds. + + +#### mimes + +Array of string representing the supported [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) content MIME types (e.g., “video/x-ms-wmv”, “video/mp4”). + + +#### playbackMethod + +Array of [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) playback methods. If none are specified, any method may be used. Only one method is typically used in practice. It is strongly advised to use only the first element of the array. + +* `1` or `Signals.PlaybackMethod.AutoPlaySoundOn` : Initiates on Page Load with Sound On +* `2` or `Signals.PlaybackMethod.AutoPlaySoundOff` : Initiates on Page Load with Sound Off by Default +* `3` or `Signals.PlaybackMethod.ClickToPlay` : Initiates on Click with Sound On +* `4` or `Signals.PlaybackMethod.MouseOver` : Initiates on Mouse-Over with Sound On +* `5` or `Signals.PlaybackMethod.EnterSoundOn` : Initiates on Entering Viewport with Sound On +* `6` or `Signals.PlaybackMethod.EnterSoundOff`: Initiates on Entering Viewport with Sound Off by Default + + +#### protocols + +Array or enum of [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) supported Protocols. Values can be one of: + +* `1` or `Signals.Protocols.VAST_1_0` : VAST 1.0 +* `2` or `Signals.Protocols.VAST_2_0` : VAST 2.0 +* `3` or `Signals.Protocols.VAST_3_0` : VAST 3.0 +* `4` or `Signals.Protocols.VAST_1_0_Wrapper` : VAST 1.0 Wrapper +* `5` or `Signals.Protocols.VAST_2_0_Wrapper` : VAST 2.0 Wrapper +* `6` or `Signals.Protocols.VAST_3_0_Wrapper` : VAST 3.0 Wrapper +* `7` or `Signals.Protocols.VAST_4_0` : VAST 4.0 +* `8` or `Signals.Protocols.VAST_4_0_Wrapper` : VAST 4.0 Wrapper ## Methods @@ -47,6 +146,21 @@ RewardedVideoAdUnit("configId"); ```java //setup PB RewardedVideo RewardedVideoAdUnit adUnit = new RewardedVideoAdUnit("configId"); + +VideoAdUnit.Parameters parameters = new VideoAdUnit.Parameters(); + +parameters.setPlacement(5); // or alternative enum value Signals.Placement.Interstitial +parameters.setApi(Arrays.asList(1,2)); // or alternative enum values [Signals.Api.VPAID_1, Signals.Api.VPAID_2] +parameters.setMaxBitrate(1500); +parameters.setMinBitrate(300); +parameters.setMaxDuration(30); +parameters.setMinDuration(5); +parameters.setMimes(Arrays.asList("video/x-flv", "video/mp4")); +parameters.setPlaybackMethod(1); // or alternative enum value (Signals.PlaybackMethod.AutoPlaySoundOn) +parameters.setProtocols(Arrays.asList(2,3)); // or alternative enum values (Signals.Protocols.VAST_2_0, Signals.Protocols.VAST_3_0) + +adUnit.setParameters(parameters); + //setup AM RewardedVideo RewardedAd amRewardedAd = new RewardedAd(this, "adUnitId"); //load AM RewardedVideo @@ -96,6 +210,22 @@ adUnit.fetchDemand(request, new OnCompleteListener() { ```java //setup PB RewardedVideo RewardedVideoAdUnit adUnit = new RewardedVideoAdUnit("configId"); + +VideoAdUnit.Parameters parameters = new VideoAdUnit.Parameters(); + +parameters.setPlacement(5); // or alternative enum value Signals.Placement.Interstitial +parameters.setApi(Arrays.asList(1,2)); // or alternative enum values [Signals.Api.VPAID_1, Signals.Api.VPAID_2] +parameters.setMaxBitrate(1500); +parameters.setMinBitrate(300); +parameters.setMaxDuration(30); +parameters.setMinDuration(5); +parameters.setMimes(Arrays.asList("video/x-flv", "video/mp4")); +parameters.setPlaybackMethod(1); // or alternative enum value (Signals.PlaybackMethod.AutoPlaySoundOn) +parameters.setProtocols(Arrays.asList(2,3)); // or alternative enum values (Signals.Protocols.VAST_2_0, Signals.Protocols.VAST_3_0) + +adUnit.setParameters(parameters); + + //setup MP RewardedVideo SdkConfiguration sdkConfiguration = new SdkConfiguration.Builder("adUnitId").build(); MoPub.initializeSdk(this, sdkConfiguration, null); diff --git a/prebid-mobile/pbm-api/android/pbm-videointerstitialadunit-android.md b/prebid-mobile/pbm-api/android/pbm-videointerstitialadunit-android.md index 299dd3edfa..47378cdcdb 100755 --- a/prebid-mobile/pbm-api/android/pbm-videointerstitialadunit-android.md +++ b/prebid-mobile/pbm-api/android/pbm-videointerstitialadunit-android.md @@ -35,6 +35,105 @@ VideoInterstitialAdUnit("configId"); `configId`: String; Prebid Server configuration ID. +### Paramaters + +Parameters is a sub class of videoAdUnit.Create new Parameters class to define the parameters of the video ad unit. Parameters contain the OpenRTB video attributes. + + +**Parameters** + +`placement: [int] or [enum]`: OpenRTB Placement + +`api: [int] or [enum]`: OpenRTB api frameworks + +`maxBitrate: int`: OpenRTB maxBirate + +`minBitrate: int`: OpenRTB minBitrate + +`maxDuration:int`: OpenRTB maxDuration + +`minDuration: int`: OpenRTB minDuration + +`mimes: [string]`: OpenRTB mime types + +`playbackMethod: [int]`: OpenRTB playbackMethod + +`protocols: [int] or [enum]`: OpenRTB Protocols + + +#### placement + +[OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) Placement Type for the auction can be expressed as an integer array or can use an enum for easier readability. Option 1 (in-stream) is intentionally left out due to lack of in-stream support in Prebid SDK. + +In the context of a VideoAdUnit, rewarded video ads are typically labled as interstitial. As such, Prebid SDK will default to value 5 if no placement value is supplied. + +* `2` or `InBanner` : In-Banner placement exists within a web banner that leverages the banner space to deliver a video experience as opposed to another static or rich media format. The format relies on the existence of display ad inventory on the page for its delivery. +* `3` or `InArticle` : In-Article placement loads and plays dynamically between paragraphs of editorial content; existing as a standalone branded message. +* `4` or `InFeed` : In-Feed placement is found in content, social, or product feeds. +* `5` or `Slider` or `Floating` or `Interstitial` : Open RTB supports one of three values for option 5 as eitehr Slider, Floating or Interstitial. If an enum value is supplied in placement, bidders will recieve value 5 for placement type and assume to be interstitial with the instl flag set to 1. + +#### api + +Array of integers or enum representing the supported OpenRTB Frameworks: + +* `1` or `Signals.Api.VPAID_1` : VPAID 1.0 +* `2` or `Signals.Api.VPAID_2` : VPAID 2.0 +* `3` or `Signals.Api.MRAID_1` : MRAID-1 +* `4` or `Signals.Api.ORMMA` : ORMMA +* `5` or `Signals.Api.MARAID_2` : MRAID-2 +* `6` or `Signals.Api.MARAID_3` : MRAID-3 + + +#### maxBitrate + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) maximum bit rate in Kbps. + + +#### minBitrate + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) minimum bit rate in Kbps. + + +#### maxDuration + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) maximum video ad duration in seconds. + + +#### minDuration + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) minimum video ad duration in seconds. + + +#### mimes + +Array of string representing the supported [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) content MIME types (e.g., “video/x-ms-wmv”, “video/mp4”). + + +#### playbackMethod + +Array of [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) playback methods. If none are specified, any method may be used. Only one method is typically used in practice. It is strongly advised to use only the first element of the array. + +* `1` or `Signals.PlaybackMethod.AutoPlaySoundOn` : Initiates on Page Load with Sound On +* `2` or `Signals.PlaybackMethod.AutoPlaySoundOff` : Initiates on Page Load with Sound Off by Default +* `3` or `Signals.PlaybackMethod.ClickToPlay` : Initiates on Click with Sound On +* `4` or `Signals.PlaybackMethod.MouseOver` : Initiates on Mouse-Over with Sound On +* `5` or `Signals.PlaybackMethod.EnterSoundOn` : Initiates on Entering Viewport with Sound On +* `6` or `Signals.PlaybackMethod.EnterSoundOff`: Initiates on Entering Viewport with Sound Off by Default + + +#### protocols + +Array or enum of [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) supported Protocols. Values can be one of: + +* `1` or `Signals.Protocols.VAST_1_0` : VAST 1.0 +* `2` or `Signals.Protocols.VAST_2_0` : VAST 2.0 +* `3` or `Signals.Protocols.VAST_3_0` : VAST 3.0 +* `4` or `Signals.Protocols.VAST_1_0_Wrapper` : VAST 1.0 Wrapper +* `5` or `Signals.Protocols.VAST_2_0_Wrapper` : VAST 2.0 Wrapper +* `6` or `Signals.Protocols.VAST_3_0_Wrapper` : VAST 3.0 Wrapper +* `7` or `Signals.Protocols.VAST_4_0` : VAST 4.0 +* `8` or `Signals.Protocols.VAST_4_0_Wrapper` : VAST 4.0 Wrapper + ## Methods @@ -61,6 +160,20 @@ private void setupPBInterstitialVAST() { PrebidMobile.setPrebidServerAccountId("AccountID"); adUnit = new VideoInterstitialAdUnit("configID"); + + VideoAdUnit.Parameters parameters = new VideoAdUnit.Parameters(); + + parameters.setPlacement(5); // or alternative enum value Signals.Placement.Interstitial + parameters.setApi(Arrays.asList(1,2)); // or alternative enum values [Signals.Api.VPAID_1, Signals.Api.VPAID_2] + parameters.setMaxBitrate(1500); + parameters.setMinBitrate(300); + parameters.setMaxDuration(30); + parameters.setMinDuration(5); + parameters.setMimes(Arrays.asList("video/x-flv", "video/mp4")); + parameters.setPlaybackMethod(1); // or alternative enum value (Signals.PlaybackMethod.AutoPlaySoundOn) + parameters.setProtocols(Arrays.asList(2,3)); // or alternative enum values (Signals.Protocols.VAST_2_0, Signals.Protocols.VAST_3_0) + + adUnit.setParameters(parameters); } private void setupAMInterstitialVAST() { diff --git a/prebid-mobile/pbm-api/android/pbm-videooutstreamadunit-android.md b/prebid-mobile/pbm-api/android/pbm-videooutstreamadunit-android.md index 0cc2fea7da..c2b1915d09 100755 --- a/prebid-mobile/pbm-api/android/pbm-videooutstreamadunit-android.md +++ b/prebid-mobile/pbm-api/android/pbm-videooutstreamadunit-android.md @@ -25,7 +25,7 @@ Video Outstream is only supported with Google Ad Manager. Create a new Outstream Video Ad Unit associated with a Prebid Server configuration ID and a video player size. ```java -VideoAdUnit("configID", width, height, VideoAdUnit.PlacementType.placement); +VideoAdUnit("configID", width, height, VideoAdUnit.PlacementType.placement); //placement to be deprecated in favor of parameters.placement) ``` **Parameters** @@ -33,18 +33,118 @@ VideoAdUnit("configID", width, height, VideoAdUnit.PlacementType.placement); * `configId`: String; Prebid Server configuration ID. * `width`: Integer; Width of the video player. * `height`: Integer; Height of the video player. -* `placement` Enumeration. Possible values: +* `placement` (DEPRECATED FIELD) Enumeration. Possible values: * IN_BANNER * IN_ARTICLE * IN_FEED + +### Paramaters + +Parameters is a sub class of videoAdUnit.Create new Parameters class to define the parameters of the video ad unit. Parameters contain the OpenRTB video attributes. + + +**Parameters** + +`placement: [int] or [enum]`: OpenRTB placement + +`protocols: [int] or [enum]`: OpenRTB Protocols + +`api: [int] or [enum]`: OpenRTB api frameworks + +`maxBitrate: int`: OpenRTB maxBirate + +`minBitrate: int`: OpenRTB minBitrate + +`maxDuration:int`: OpenRTB maxDuration + +`minDuration: int`: OpenRTB minDuration + +`mimes: [string]`: OpenRTB mime types + +`playbackMethod: [int]`: OpenRTB playbackMethod + + +#### placement + +[OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) Placement Type for the auction can be expressed as an integer array or can use an enum for easier readability. Option 1 (in-stream) is intentionally left out due to lack of in-stream support in Prebid SDK. + +* `2` or `IN_BANNER` : In-Banner placement exists within a web banner that leverages the banner space to deliver a video experience as opposed to another static or rich media format. The format relies on the existence of display ad inventory on the page for its delivery. +* `3` or `IN_ARTICLE` : In-Article placement loads and plays dynamically between paragraphs of editorial content; existing as a standalone branded message. +* `4` or `IN_FEED` : In-Feed placement is found in content, social, or product feeds. +* `5` : `Slider` / `Floater` While OpenRTB uses "5" to also designate interstitial as a placement type, interstitial is not used in the standard outsream format. For Interstital, use the videointerstital or RewardedVideoAdUnit ad unit + + +#### api + +Array of integers or enum representing the supported OpenRTB Frameworks: + +* `1` or `Signals.Api.VPAID_1` : VPAID 1.0 +* `2` or `Signals.Api.VPAID_2` : VPAID 2.0 +* `3` or `Signals.Api.MRAID_1` : MRAID-1 +* `4` or `Signals.Api.ORMMA` : ORMMA +* `5` or `Signals.Api.MARAID_2` : MRAID-2 +* `6` or `Signals.Api.MARAID_3` : MRAID-3 + + +#### maxBitrate + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) maximum bit rate in Kbps. + + +#### minBitrate + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) minimum bit rate in Kbps. + + +#### maxDuration + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) maximum video ad duration in seconds. + + +#### minDuration + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) minimum video ad duration in seconds. + + +#### mimes + +Array of string representing the supported [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) content MIME types (e.g., “video/x-ms-wmv”, “video/mp4”). + + +#### playbackMethod + +Array of [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) playback methods. If none are specified, any method may be used. Only one method is typically used in practice. It is strongly advised to use only the first element of the array. + +* `1` or `Signals.PlaybackMethod.AutoPlaySoundOn` : Initiates on Page Load with Sound On +* `2` or `Signals.PlaybackMethod.AutoPlaySoundOff` : Initiates on Page Load with Sound Off by Default +* `3` or `Signals.PlaybackMethod.ClickToPlay` : Initiates on Click with Sound On +* `4` or `Signals.PlaybackMethod.MouseOver` : Initiates on Mouse-Over with Sound On +* `5` or `Signals.PlaybackMethod.EnterSoundOn` : Initiates on Entering Viewport with Sound On +* `6` or `Signals.PlaybackMethod.EnterSoundOff`: Initiates on Entering Viewport with Sound Off by Default + + +#### protocols + +Array or enum of [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) supported Protocols. Values can be one of: + +* `1` or `Signals.Protocols.VAST_1_0` : VAST 1.0 +* `2` or `Signals.Protocols.VAST_2_0` : VAST 2.0 +* `3` or `Signals.Protocols.VAST_3_0` : VAST 3.0 +* `4` or `Signals.Protocols.VAST_1_0_Wrapper` : VAST 1.0 Wrapper +* `5` or `Signals.Protocols.VAST_2_0_Wrapper` : VAST 2.0 Wrapper +* `6` or `Signals.Protocols.VAST_3_0_Wrapper` : VAST 3.0 Wrapper +* `7` or `Signals.Protocols.VAST_4_0` : VAST 4.0 +* `8` or `Signals.Protocols.VAST_4_0_Wrapper` : VAST 4.0 Wrapper + + ## Methods `VideoAdUnit` inherits all methods from the [AdUnit]({{site.baseurl}}/prebid-mobile/pbm-api/android/pbm-adunit-android.html) object. ## Example -``` +```java private PublisherAdView amBanner; AdUnit adUnit; @@ -57,7 +157,23 @@ void setupAndLoadAMBannerVAST() { private void setupPBBannerVAST() { PrebidMobile.setPrebidServerHost(Host.RUBICON); PrebidMobile.setPrebidServerAccountId("AccountID"); - adUnit = new VideoAdUnit("configId", 300, 250, VideoAdUnit.PlacementType.IN_BANNER); + adUnit = new VideoAdUnit("configId", 300, 250); + + VideoInterstitialAdUnit adUnit = new VideoInterstitialAdUnit("1001-1"); + + VideoAdUnit.Parameters parameters = new VideoAdUnit.Parameters(); + + parameters.setPlacement(2); // or alternative enum value Signals.Placement.InBanner + parameters.setApi(Arrays.asList(1,2)); // or alternative enum values [Signals.Api.VPAID_1, Signals.Api.VPAID_2] + parameters.setMaxBitrate(1500); + parameters.setMinBitrate(300); + parameters.setMaxDuration(30); + parameters.setMinDuration(5); + parameters.setMimes(Arrays.asList("video/x-flv", "video/mp4")); + parameters.setPlaybackMethod(1); // or alternative enum value (Signals.PlaybackMethod.AutoPlaySoundOn) + parameters.setProtocols(Arrays.asList(2,3)); // or alternative enum values (Signals.Protocols.VAST_2_0, Signals.Protocols.VAST_3_0) + + adUnit.setParameters(parameters); } private void setupAMBannerVAST() { diff --git a/prebid-mobile/pbm-api/ios/pbm-video-rewarded-adunit-ios.md b/prebid-mobile/pbm-api/ios/pbm-video-rewarded-adunit-ios.md index e2b3ded75a..d1be426cc1 100755 --- a/prebid-mobile/pbm-api/ios/pbm-video-rewarded-adunit-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-video-rewarded-adunit-ios.md @@ -20,6 +20,108 @@ Create a new Video Rewarded Ad Unit associated with a Prebid Server configuratio `configId(String)`: Prebid Server configuration ID. + +# Paramaters + +Parameters is a sub class of RewardedVideoAdUnit.Create new Parameters class to define the parameters of the video ad unit. Parameters contain the OpenRTB video attributes. + + +**Parameters** + +`placement: [int] or [enum]`: OpenRTB placement + +`api: [int] or [enum]`: OpenRTB api frameworks + +`maxBitrate: int`: OpenRTB maxBirate + +`minBitrate: int`: OpenRTB minBitrate + +`maxDuration:int`: OpenRTB maxDuration + +`minDuration: int`: OpenRTB minDuration + +`mimes: [string]`: OpenRTB mime types + +`playbackMethod: [int]`: OpenRTB playbackMethod + +`protocols: [int] or [enum]`: OpenRTB Protocols + + +### placement + +[OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) Placement Type for the auction can be expressed as an integer array or can use an enum for easier readability. Option 1 (in-stream) is intentionally left out due to lack of in-stream support in Prebid SDK. + +In the context of a RewardedVideoAdUnit, rewarded video ads are typically labled as interstitial. As such, Prebid SDK will default to value 5 if no placement value is supplied. + +* `2` or `InBanner` : In-Banner placement exists within a web banner that leverages the banner space to deliver a video experience as opposed to another static or rich media format. The format relies on the existence of display ad inventory on the page for its delivery. +* `3` or `InArticle` : In-Article placement loads and plays dynamically between paragraphs of editorial content; existing as a standalone branded message. +* `4` or `InFeed` : In-Feed placement is found in content, social, or product feeds. +* `5` or `Slider`, `Floating` or `Interstitial` : Open RTB supports one of three values for option 5 as eitehr Slider, Floating or Interstitial. If an enum value is supplied in placement, bidders will recieve value 5 for placement type and assume to be interstitial with the instl flag set to 1. + + +### api + +Array of integers or enum representing the supported [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) Frameworks: + +* `1` or `Signals.Api.VPAID_1` : VPAID 1.0 +* `2` or `Signals.Api.VPAID_2` : VPAID 2.0 +* `3` or `Signals.Api.MRAID_1` : MRAID-1 +* `4` or `Signals.Api.ORMMA` : ORMMA +* `5` or `Signals.Api.MARAID_2` : MRAID-2 +* `6` or `Signals.Api.MARAID_3` : MRAID-3 + + +### maxBitrate + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) maximum bit rate in Kbps. + + +### minBitrate + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) minimum bit rate in Kbps. + + +### maxDuration + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) maximum video ad duration in seconds. + + +### minDuration + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) minimum video ad duration in seconds. + + +### mimes + +Array of string representing the supported [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) content MIME types (e.g., “video/x-ms-wmv”, “video/mp4”). + + +### playbackMethod + +Array of [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) playback methods. If none are specified, any method may be used. Only one method is typically used in practice. It is strongly advised to use only the first element of the array. + +* `1` or `Signals.PlaybackMethod.AutoPlaySoundOn` : Initiates on Page Load with Sound On +* `2` or `Signals.PlaybackMethod.AutoPlaySoundOff` : Initiates on Page Load with Sound Off by Default +* `3` or `Signals.PlaybackMethod.ClickToPlay` : Initiates on Click with Sound On +* `4` or `Signals.PlaybackMethod.MouseOver` : Initiates on Mouse-Over with Sound On +* `5` or `Signals.PlaybackMethod.EnterSoundOn` : Initiates on Entering Viewport with Sound On +* `6` or `Signals.PlaybackMethod.EnterSoundOff`: Initiates on Entering Viewport with Sound Off by Default + + +### protocols + +Array or enum of [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) supported Protocols. Values can be one of: + +* `1` or `Signals.Protocols.VAST_1_0` : VAST 1.0 +* `2` or `Signals.Protocols.VAST_2_0` : VAST 2.0 +* `3` or `Signals.Protocols.VAST_3_0` : VAST 3.0 +* `4` or `Signals.Protocols.VAST_1_0_Wrapper` : VAST 1.0 Wrapper +* `5` or `Signals.Protocols.VAST_2_0_Wrapper` : VAST 2.0 Wrapper +* `6` or `Signals.Protocols.VAST_3_0_Wrapper` : VAST 3.0 Wrapper +* `7` or `Signals.Protocols.VAST_4_0` : VAST 4.0 +* `8` or `Signals.Protocols.VAST_4_0_Wrapper` : VAST 4.0 Wrapper + + See [AdUnit]({{site.baseurl}}/prebid-mobile/pbm-api/ios/pbm-adunit-ios.html) for additional parameters and methods. --- @@ -31,9 +133,22 @@ See [AdUnit]({{site.baseurl}}/prebid-mobile/pbm-api/ios/pbm-adunit-ios.html) for Import the GoogleMobileAds from [google-mobile-sdk](https://developers.google.com/admob/ios/download). **Swift** -``` +```swift //setup PB RewardedVideo let adUnit = RewardedVideoAdUnit(configId: "1001-1") + +//video parameters +parameters.mimes = ["video/mp4"] +parameters.protocols = [2,3,7] // or alternative enum values [Protocols.VAST_2_0, Protocols.VAST_3_0] +parameters.playbackMethod = [1] // or alternative enum value [PlaybackMethod.AutoPlaySoundOn] +parameters.api = [1,2] // or alternative enum values [Api.VPAID_1, Api.VPAID_2] +parameters.maxBitrate = 1500 +parameters.minBitrate = 300 +parameters.maxDuration = 30 +parameters.minDuration = 5 + +adUnit.parameters = parameters + //setup AM RewardedVideo let amRewardedAd = GADRewardedAd(adUnitID: "adUnitId") //load AM RewardedVideo @@ -56,7 +171,7 @@ let adUnit.fetchDemand(adObject: amRequest) { (resultCode: ResultCode) in Import the Mopub SDK from [Mopub](https://developers.mopub.com/publishers/ios/integrate/). **Swift** -``` +```swift //setup PB RewardedVideo let adUnit = RewardedVideoAdUnit(configId: "1001-1") //setup MP RewardedVideo diff --git a/prebid-mobile/pbm-api/ios/pbm-videointerstitialadunit-ios.md b/prebid-mobile/pbm-api/ios/pbm-videointerstitialadunit-ios.md index 29bec1a7aa..385bac77d3 100755 --- a/prebid-mobile/pbm-api/ios/pbm-videointerstitialadunit-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-videointerstitialadunit-ios.md @@ -19,6 +19,110 @@ Video Insterstital is only supported with Google Ad Manager. `configId(String)`: Prebid Server configuration ID. + +# Paramaters + +Parameters is a sub class of VideoInterstitialAdUnit.Create new Parameters class to define the parameters of the video ad unit. Parameters contain the OpenRTB video attributes. + + +**Parameters** + +`placement: [int] or [enum]`: OpenRTB placement + +`api: [int] or [enum]`: OpenRTB api frameworks + +`maxBitrate: int`: OpenRTB maxBirate + +`minBitrate: int`: OpenRTB minBitrate + +`maxDuration:int`: OpenRTB maxDuration + +`minDuration: int`: OpenRTB minDuration + +`mimes: [string]`: OpenRTB mime types + +`playbackMethod: [int]`: OpenRTB playbackMethod + +`protocols: [int] or [enum]`: OpenRTB Protocols + + +### placement + +[OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) Placement Type for the auction can be expressed as an integer array or can use an enum for easier readability. Option 1 (in-stream) is intentionally left out due to lack of in-stream support in Prebid SDK. + +In the context of a VideoInterstitialAdUnit, rewarded video ads are typically labled as interstitial. As such, Prebid SDK will default to value 5 if no placement value is supplied. + +* `2` or `InBanner` : In-Banner placement exists within a web banner that leverages the banner space to deliver a video experience as opposed to another static or rich media format. The format relies on the existence of display ad inventory on the page for its delivery. +* `3` or `InArticle` : In-Article placement loads and plays dynamically between paragraphs of editorial content; existing as a standalone branded message. +* `4` or `InFeed` : In-Feed placement is found in content, social, or product feeds. +* `5` or `Slider`, `Floating` or `Interstitial` : Open RTB supports one of three values for option 5 as eitehr Slider, Floating or Interstitial. If an enum value is supplied in placement, bidders will recieve value 5 for placement type and assume to be interstitial with the instl flag set to 1. + + +### api + +Array of integers or enum representing the supported [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) Frameworks: + +* `1` or `Signals.Api.VPAID_1` : VPAID 1.0 +* `2` or `Signals.Api.VPAID_2` : VPAID 2.0 +* `3` or `Signals.Api.MRAID_1` : MRAID-1 +* `4` or `Signals.Api.ORMMA` : ORMMA +* `5` or `Signals.Api.MARAID_2` : MRAID-2 +* `6` or `Signals.Api.MARAID_3` : MRAID-3 + + +### maxBitrate + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) maximum bit rate in Kbps. + + +### minBitrate + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) minimum bit rate in Kbps. + + +### maxDuration + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) maximum video ad duration in seconds. + + +### minDuration + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) minimum video ad duration in seconds. + + +### mimes + +Array of string representing the supported [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) content MIME types (e.g., “video/x-ms-wmv”, “video/mp4”). + + +### playbackMethod + +Array of [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) playback methods. If none are specified, any method may be used. Only one method is typically used in practice. It is strongly advised to use only the first element of the array. + +* `1` or `Signals.PlaybackMethod.AutoPlaySoundOn` : Initiates on Page Load with Sound On +* `2` or `Signals.PlaybackMethod.AutoPlaySoundOff` : Initiates on Page Load with Sound Off by Default +* `3` or `Signals.PlaybackMethod.ClickToPlay` : Initiates on Click with Sound On +* `4` or `Signals.PlaybackMethod.MouseOver` : Initiates on Mouse-Over with Sound On +* `5` or `Signals.PlaybackMethod.EnterSoundOn` : Initiates on Entering Viewport with Sound On +* `6` or `Signals.PlaybackMethod.EnterSoundOff`: Initiates on Entering Viewport with Sound Off by Default + + +### protocols + +Array or enum of [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) supported Protocols. Values can be one of: + +* `1` or `Signals.Protocols.VAST_1_0` : VAST 1.0 +* `2` or `Signals.Protocols.VAST_2_0` : VAST 2.0 +* `3` or `Signals.Protocols.VAST_3_0` : VAST 3.0 +* `4` or `Signals.Protocols.VAST_1_0_Wrapper` : VAST 1.0 Wrapper +* `5` or `Signals.Protocols.VAST_2_0_Wrapper` : VAST 2.0 Wrapper +* `6` or `Signals.Protocols.VAST_3_0_Wrapper` : VAST 3.0 Wrapper +* `7` or `Signals.Protocols.VAST_4_0` : VAST 4.0 +* `8` or `Signals.Protocols.VAST_4_0_Wrapper` : VAST 4.0 Wrapper + + + + See [AdUnit]({{site.baseurl}}/prebid-mobile/pbm-api/ios/pbm-adunit-ios.html) for additional parameters and methods. --- @@ -46,6 +150,22 @@ Import the GoogleMobileAds from [google-mobile-sdk](https://developers.google.co Prebid.shared.prebidServerHost = .Rubicon Prebid.shared.prebidServerAccountId = "accountId" adUnit = VideoInterstitialAdUnit(configId: "configId") + + + //video parameters + parameters.mimes = ["video/mp4"] + parameters.protocols = [2,3,7] // or alternative enum values [Protocols.VAST_2_0, Protocols.VAST_3_0] + parameters.playbackMethod = [1] // or alternative enum value [PlaybackMethod.AutoPlaySoundOn] + parameters.api = [1,2] // or alternative enum values [Api.VPAID_1, Api.VPAID_2] + parameters.maxBitrate = 1500 + parameters.minBitrate = 300 + parameters.maxDuration = 30 + parameters.minDuration = 5 + + adUnit.parameters = parameters + + self.adUnit = adUnit + } func setupAMInterstitialVAST() { diff --git a/prebid-mobile/pbm-api/ios/pbm-videooutstreamadunit-ios.md b/prebid-mobile/pbm-api/ios/pbm-videooutstreamadunit-ios.md index 981afc7b00..d33a6bd6fd 100755 --- a/prebid-mobile/pbm-api/ios/pbm-videooutstreamadunit-ios.md +++ b/prebid-mobile/pbm-api/ios/pbm-videooutstreamadunit-ios.md @@ -18,9 +18,8 @@ Video Outstream is only supported with Google Ad Manager. - TOC {:toc} -## Object -### VideoAdUnit + Create a new Video Outstream Ad Unit associated with a Prebid Server configuration ID and a video size. @@ -35,10 +34,13 @@ See [AdUnit]({{site.baseurl}}/prebid-mobile/pbm-api/ios/pbm-adunit-ios.html) for `size(CGSize)`: Width and height of the video ad unit. -`type:Enum`: OpenRTB Placement Type. +`type:Enum`: OpenRTB Placement Type. This field is being deprecated in favor of parameters.type + + + -#### CGSize +## CGSize Size of video ad unit. @@ -49,13 +51,117 @@ Size of video ad unit. `height`: Height of video ad unit in DIPs. -#### type +## type + +{% capture deprecate %} +VideoAdUnit type will be deprecated in future releases. Use parameters.placement below for future usage of type. +{% endcapture %} +{% include /alerts/alert_important.html content=deprecate %} OpenRTB Placement Type represented as an enumeration of values: -* `inBanner` is transformed into OpenRTB value 2 to bid adapters -* `inArticle` is transformed into OpenRTB value 3 to bid adapters -* `inFeed` is transformed into OpenRTB value 4 to bid adapters +* inBanner is transformed into OpenRTB value 2 to bid adapters +* inArticle is transformed into OpenRTB value 3 to bid adapters +* inFeed is transformed into OpenRTB value 4 to bid adapters + + +## Paramaters + +Parameters is a sub class of videoAdUnit.Create new Parameters class to define the parameters of the video ad unit. Parameters contain the OpenRTB video attributes. + + +**Parameters** + +`placement: [int] or [enum]`: OpenRTB placement + +`api: [int] or [enum]`: OpenRTB api frameworks + +`maxBitrate: int`: OpenRTB maxBirate + +`minBitrate: int`: OpenRTB minBitrate + +`maxDuration:int`: OpenRTB maxDuration + +`minDuration: int`: OpenRTB minDuration + +`mimes: [string]`: OpenRTB mime types + +`playbackMethod: [int]`: OpenRTB playbackMethod + +`protocols: [int] or [enum]`: OpenRTB Protocols + + +#### placement + +[OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) Placement Type for the auction can be expressed as an integer array or can use an enum for easier readability. Option 1 (in-stream) is intentionally left out due to lack of in-stream support in Prebid SDK. + +* `2` or `InBanner` : In-Banner placement exists within a web banner that leverages the banner space to deliver a video experience as opposed to another static or rich media format. The format relies on the existence of display ad inventory on the page for its delivery. +* `3` or `InArticle` : In-Article placement loads and plays dynamically between paragraphs of editorial content; existing as a standalone branded message. +* `4` or `InFeed` : In-Feed placement is found in content, social, or product feeds. +* `5` or `Slider` or `Floating` : While OpenRTB uses "5" to also designate interstitial as a placement type, interstitial is not used in the standard outsream format. For Interstital, use the videointerstital or RewardedVideoAdUnit ad unit + + +#### api + +Array of integers or enum representing the supported [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) Frameworks: + +* `1` or `Signals.Api.VPAID_1` : VPAID 1.0 +* `2` or `Signals.Api.VPAID_2` : VPAID 2.0 +* `3` or `Signals.Api.MRAID_1` : MRAID-1 +* `4` or `Signals.Api.ORMMA` : ORMMA +* `5` or `Signals.Api.MARAID_2` : MRAID-2 +* `6` or `Signals.Api.MARAID_3` : MRAID-3 + + +#### maxBitrate + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) maximum bit rate in Kbps. + + +#### minBitrate + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) minimum bit rate in Kbps. + + +#### maxDuration + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) maximum video ad duration in seconds. + + +#### minDuration + +Integer representing the [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) minimum video ad duration in seconds. + + +#### mimes + +Array of string representing the supported [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) content MIME types (e.g., “video/x-ms-wmv”, “video/mp4”). + + +#### playbackMethod + +Array of [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) playback methods. If none are specified, any method may be used. Only one method is typically used in practice. It is strongly advised to use only the first element of the array. + +* `1` or `Signals.PlaybackMethod.AutoPlaySoundOn` : Initiates on Page Load with Sound On +* `2` or `Signals.PlaybackMethod.AutoPlaySoundOff` : Initiates on Page Load with Sound Off by Default +* `3` or `Signals.PlaybackMethod.ClickToPlay` : Initiates on Click with Sound On +* `4` or `Signals.PlaybackMethod.MouseOver` : Initiates on Mouse-Over with Sound On +* `5` or `Signals.PlaybackMethod.EnterSoundOn` : Initiates on Entering Viewport with Sound On +* `6` or `Signals.PlaybackMethod.EnterSoundOff`: Initiates on Entering Viewport with Sound Off by Default + + +#### protocols + +Array or enum of [OpenRTB 2.5](https://www.iab.com/wp-content/uploads/2016/03/OpenRTB-API-Specification-Version-2-5-FINAL.pdf) supported Protocols. Values can be one of: + +* `1` or `Signals.Protocols.VAST_1_0` : VAST 1.0 +* `2` or `Signals.Protocols.VAST_2_0` : VAST 2.0 +* `3` or `Signals.Protocols.VAST_3_0` : VAST 3.0 +* `4` or `Signals.Protocols.VAST_1_0_Wrapper` : VAST 1.0 Wrapper +* `5` or `Signals.Protocols.VAST_2_0_Wrapper` : VAST 2.0 Wrapper +* `6` or `Signals.Protocols.VAST_3_0_Wrapper` : VAST 3.0 Wrapper +* `7` or `Signals.Protocols.VAST_4_0` : VAST 4.0 +* `8` or `Signals.Protocols.VAST_4_0_Wrapper` : VAST 4.0 Wrapper @@ -73,7 +179,7 @@ See [AdUnit]({{site.baseurl}}/prebid-mobile/pbm-api/ios/pbm-adunit-ios.html) for Import the GoogleMobileAds from [google-mobile-sdk](https://developers.google.com/admob/ios/download) into the UIViewController displaying the VideoAdUnit. **Swift** -``` +```swift var amBanner: DFPBannerView! var adUnit: AdUnit! @@ -91,11 +197,24 @@ Import the GoogleMobileAds from [google-mobile-sdk](https://developers.google.co Prebid.shared.prebidServerHost = .Rubicon Prebid.shared.prebidServerAccountId = "accountId" - adUnit = VideoAdUnit(configId: "configId", size: CGSize(width: 300, height: 250), type: .inBanner) + adUnit = VideoAdUnit(configId: "configId", size: CGSize(width: 300, height: 250)) + + let parameters = VideoBaseAdUnit.Parameters() + parameters.mimes = ["video/mp4"] + parameters.protocols = [2,3,7] // or alternative enum values [Protocols.VAST_2_0, Protocols.VAST_3_0] + parameters.playbackMethod = [1] // or alternative enum value [PlaybackMethod.AutoPlaySoundOn] + parameters.api = [1,2] // or alternative enum values [Api.VPAID_1, Api.VPAID_2] + parameters.maxBitrate = 1500 + parameters.minBitrate = 300 + parameters.maxDuration = 30 + parameters.minDuration = 5 + parameters.placement = 2 // or alternative enum value Signals.Placement.InBanner + + adUnit.parameters = parameters } func setupAMBannerVAST() { - setupAMBanner(id: "/5300653/test_adunit_vast_pavliuchyk") + setupAMBanner(id: "/networkID/adUnit") } func setupAMBanner(id: String) {