Merge branch 'master' into AndroidRangePlayback
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
#if USE_GOOGLE_IMA
|
||||
import Foundation
|
||||
import GoogleInteractiveMediaAds
|
||||
|
||||
@@ -76,6 +77,10 @@ class RCTIMAAdsManager: NSObject, IMAAdsLoaderDelegate, IMAAdsManagerDelegate {
|
||||
// MARK: - IMAAdsManagerDelegate
|
||||
|
||||
func adsManager(_ adsManager: IMAAdsManager, didReceive event: IMAAdEvent) {
|
||||
// Mute ad if the main player is muted
|
||||
if (_video.isMuted()) {
|
||||
adsManager.volume = 0;
|
||||
}
|
||||
// Play each ad once it has been loaded
|
||||
if event.type == IMAAdEventType.LOADED {
|
||||
adsManager.start()
|
||||
@@ -185,3 +190,4 @@ class RCTIMAAdsManager: NSObject, IMAAdsLoaderDelegate, IMAAdsManagerDelegate {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user