Commit 505b94f9 authored by Stanisław Chmiela's avatar Stanisław Chmiela
Browse files

Add sending onReadyForDisplay callback

parent eb3fc237
Loading
Loading
Loading
Loading
+7 −0
Changes for RCTVideo.m: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -308,6 +308,13 @@ static NSString *const readyForDisplayKeyPath = @"readyForDisplay";
      }
      _playerBufferEmpty = NO;
    }
   } else if (object == _playerLayer) {
      if([keyPath isEqualToString:readyForDisplayKeyPath] && [change objectForKey:NSKeyValueChangeNewKey]) {
        if([change objectForKey:NSKeyValueChangeNewKey]) {
          [_eventDispatcher sendInputEventWithName:@"onReadyForDisplay"
                                              body:@{@"target": self.reactTag}];
        }
    }
  } else {
      [super observeValueForKeyPath:keyPath ofObject:object change:change context:context];
  }