feat(ad): add data to onReceiveAdEvent (#3378)
* feat(ad): add adData to onReceiveAdEvent * fix: remove adData from response if empty * fix: add getAdData to stub file * chore: fix build without IMA * fix: rename `adData` to `data` --------- Co-authored-by: olivier <olivier.bouillet@ifeelsmart.com>
This commit is contained in:
committed by
GitHub
parent
de4159f0c2
commit
d05231d76b
@@ -98,10 +98,18 @@ class RCTIMAAdsManager: NSObject, IMAAdsLoaderDelegate, IMAAdsManagerDelegate, I
|
||||
if _video.onReceiveAdEvent != nil {
|
||||
let type = convertEventToString(event: event.type)
|
||||
|
||||
_video.onReceiveAdEvent?([
|
||||
"event": type,
|
||||
"target": _video.reactTag!
|
||||
]);
|
||||
if (event.adData != nil) {
|
||||
_video.onReceiveAdEvent?([
|
||||
"event": type,
|
||||
"data": event.adData ?? [String](),
|
||||
"target": _video.reactTag!
|
||||
]);
|
||||
} else {
|
||||
_video.onReceiveAdEvent?([
|
||||
"event": type,
|
||||
"target": _video.reactTag!
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user