[AD EVENTS] Merge resume, pause and click event on iOS and Android

This commit is contained in:
Axel Vencatareddy 2022-11-30 12:50:48 +01:00
parent 567c299b2a
commit 6e5ebfcc3b
2 changed files with 6 additions and 9 deletions

9
API.md
View File

@ -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_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. | | `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. | | `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, iOS | Fires when the ad is clicked. |
| `CLICK` | Android | Fires when the ad is clicked. |
| `COMPLETE` | Android, iOS | Fires when the ad completes playing. | | `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_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. | | `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. | | `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. | | `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. | | `MIDPOINT` | Android, iOS | Fires when the ad playhead crosses midpoint. |
| `PAUSED` | Android | Fires when the ad is paused. | | `PAUSED` | Android, iOS | Fires when the ad is paused. |
| `PAUSE` | iOS | Fires when the ad is paused. | | `RESUMED` | Android, iOS | Fires when the ad is resumed. |
| `RESUMED` | Android | Fires when the ad is resumed. |
| `RESUME` | iOS | Fires when the ad is resumed. |
| `SKIPPABLE_STATE_CHANGED` | Android | Fires when the displayed ads skippable state is changed. | | `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. | | `SKIPPED` | Android, iOS | Fires when the ad is skipped by the user. |
| `STARTED` | Android, iOS | Fires when the ad starts playing. | | `STARTED` | Android, iOS | Fires when the ad starts playing. |

View File

@ -137,7 +137,7 @@ class RCTIMAAdsManager: NSObject, IMAAdsLoaderDelegate, IMAAdsManagerDelegate {
result = "ALL_ADS_COMPLETED"; result = "ALL_ADS_COMPLETED";
break; break;
case .CLICKED: case .CLICKED:
result = "CLICKED"; result = "CLICK";
break; break;
case .COMPLETE: case .COMPLETE:
result = "COMPLETE"; result = "COMPLETE";
@ -158,10 +158,10 @@ class RCTIMAAdsManager: NSObject, IMAAdsLoaderDelegate, IMAAdsManagerDelegate {
result = "MIDPOINT"; result = "MIDPOINT";
break; break;
case .PAUSE: case .PAUSE:
result = "PAUSE"; result = "PAUSED";
break; break;
case .RESUME: case .RESUME:
result = "RESUME"; result = "RESUMED";
break; break;
case .SKIPPED: case .SKIPPED:
result = "SKIPPED"; result = "SKIPPED";