call requestAds when video playing

This commit is contained in:
Robby Widyahartono 2019-12-10 13:40:26 +07:00
parent 6a49f539c9
commit e455ea0756

View File

@ -274,7 +274,7 @@ static int const RCTVideoUnset = -1;
[[NSNotificationCenter defaultCenter] postNotificationName:@"RCTVideo_progress" object:nil userInfo:@{@"progress": [NSNumber numberWithDouble: currentTimeSecs / duration]}]; [[NSNotificationCenter defaultCenter] postNotificationName:@"RCTVideo_progress" object:nil userInfo:@{@"progress": [NSNumber numberWithDouble: currentTimeSecs / duration]}];
if( currentTimeSecs >= 0 && self.onVideoProgress) { if( currentTimeSecs >= 0 && self.onVideoProgress) {
if(!_isRequestAds) { if(!_isRequestAds && currentTimeSecs >= 0.0001) {
[self requestAds]; [self requestAds];
_isRequestAds = true; _isRequestAds = true;
} }