From 6e5ebfcc3b940a785e274c1bfe090a2ce0a192d9 Mon Sep 17 00:00:00 2001 From: Axel Vencatareddy Date: Wed, 30 Nov 2022 12:50:48 +0100 Subject: [PATCH] [AD EVENTS] Merge resume, pause and click event on iOS and Android --- API.md | 9 +++------ ios/Video/Features/RCTIMAAdsManager.swift | 6 +++--- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/API.md b/API.md index 43c34d45..bf748016 100644 --- a/API.md +++ b/API.md @@ -1240,8 +1240,7 @@ Enum `AdEvent` possible values for [Android](https://developers.google.com/inter | `AD_PERIOD_STARTED` | iOS | Fired every time the stream switches from content to advertising or slate. This will be fired even when an ad is played a second time or when seeking into an ad (only used for dynamic ad insertion). | | `AD_PROGRESS` | Android | Fires when the ad's current time value changes. Calling getAdData() on this event will return an AdProgressData object. | | `ALL_ADS_COMPLETED` | Android, iOS | Fires when the ads manager is done playing all the valid ads in the ads response, or when the response doesn't return any valid ads. | -| `CLICKED` | iOS | Fires when the ad is clicked. | -| `CLICK` | Android | Fires when the ad is clicked. | +| `CLICK` | Android, iOS | Fires when the ad is clicked. | | `COMPLETE` | Android, iOS | Fires when the ad completes playing. | | `CONTENT_PAUSE_REQUESTED` | Android | Fires when content should be paused. This usually happens right before an ad is about to cover the content. | | `CONTENT_RESUME_REQUESTED` | Android | Fires when content should be resumed. This usually happens when an ad finishes or collapses. | @@ -1254,10 +1253,8 @@ Enum `AdEvent` possible values for [Android](https://developers.google.com/inter | `LOADED` | Android, iOS | Fires when ad data is available. | | `LOG` | Android, iOS | Fires when a non-fatal error is encountered. The user need not take any action since the SDK will continue with the same or next ad playback depending on the error situation. | | `MIDPOINT` | Android, iOS | Fires when the ad playhead crosses midpoint. | -| `PAUSED` | Android | Fires when the ad is paused. | -| `PAUSE` | iOS | Fires when the ad is paused. | -| `RESUMED` | Android | Fires when the ad is resumed. | -| `RESUME` | iOS | Fires when the ad is resumed. | +| `PAUSED` | Android, iOS | Fires when the ad is paused. | +| `RESUMED` | Android, iOS | Fires when the ad is resumed. | | `SKIPPABLE_STATE_CHANGED` | Android | Fires when the displayed ads skippable state is changed. | | `SKIPPED` | Android, iOS | Fires when the ad is skipped by the user. | | `STARTED` | Android, iOS | Fires when the ad starts playing. | diff --git a/ios/Video/Features/RCTIMAAdsManager.swift b/ios/Video/Features/RCTIMAAdsManager.swift index f7b219a0..059ec639 100644 --- a/ios/Video/Features/RCTIMAAdsManager.swift +++ b/ios/Video/Features/RCTIMAAdsManager.swift @@ -137,7 +137,7 @@ class RCTIMAAdsManager: NSObject, IMAAdsLoaderDelegate, IMAAdsManagerDelegate { result = "ALL_ADS_COMPLETED"; break; case .CLICKED: - result = "CLICKED"; + result = "CLICK"; break; case .COMPLETE: result = "COMPLETE"; @@ -158,10 +158,10 @@ class RCTIMAAdsManager: NSObject, IMAAdsLoaderDelegate, IMAAdsManagerDelegate { result = "MIDPOINT"; break; case .PAUSE: - result = "PAUSE"; + result = "PAUSED"; break; case .RESUME: - result = "RESUME"; + result = "RESUMED"; break; case .SKIPPED: result = "SKIPPED";