@@ -86,8 +86,6 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
||||
}
|
||||
|
||||
/* IMA Ads */
|
||||
private var _adTagUrl: String?
|
||||
private var _adLanguage: String?
|
||||
#if USE_GOOGLE_IMA
|
||||
private var _imaAdsManager: RCTIMAAdsManager!
|
||||
/* Playhead used by the SDK to track content video progress and insert mid-rolls. */
|
||||
@@ -374,7 +372,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
||||
|
||||
if currentTimeSecs >= 0 {
|
||||
#if USE_GOOGLE_IMA
|
||||
if !_didRequestAds && currentTimeSecs >= 0.0001 && _adTagUrl != nil {
|
||||
if !_didRequestAds && currentTimeSecs >= 0.0001 && _source?.adParams.adTagUrl != nil {
|
||||
_imaAdsManager.requestAds()
|
||||
_didRequestAds = true
|
||||
}
|
||||
@@ -527,7 +525,7 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
||||
}
|
||||
|
||||
#if USE_GOOGLE_IMA
|
||||
if _adTagUrl != nil {
|
||||
if _source?.adParams.adTagUrl != nil {
|
||||
// Set up your content playhead and contentComplete callback.
|
||||
_contentPlayhead = IMAAVPlayerContentPlayhead(avPlayer: _player!)
|
||||
|
||||
@@ -1216,16 +1214,11 @@ class RCTVideo: UIView, RCTVideoPlayerViewControllerDelegate, RCTPlayerObserverH
|
||||
// MARK: - RCTIMAAdsManager
|
||||
|
||||
func getAdLanguage() -> String? {
|
||||
return _adLanguage
|
||||
return _source?.adParams.adLanguage
|
||||
}
|
||||
|
||||
func getAdTagUrl() -> String? {
|
||||
return _adTagUrl
|
||||
}
|
||||
|
||||
@objc
|
||||
func setAdTagUrl(_ adTagUrl: String?) {
|
||||
_adTagUrl = adTagUrl
|
||||
return _source?.adParams.adTagUrl
|
||||
}
|
||||
|
||||
#if USE_GOOGLE_IMA
|
||||
|
||||
Reference in New Issue
Block a user