Custom skin support added for ios. onReceiveAdEvent prop added to catch ad events on ios.
This commit is contained in:
9
Video.js
9
Video.js
@@ -253,6 +253,13 @@ export default class Video extends Component {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
_onReceiveAdEvent = (event) => {
|
||||
if (this.props.onReceiveAdEvent) {
|
||||
this.props.onReceiveAdEvent(event.nativeEvent);
|
||||
}
|
||||
};
|
||||
|
||||
getViewManagerConfig = viewManagerName => {
|
||||
if (!NativeModules.UIManager.getViewManagerConfig) {
|
||||
return NativeModules.UIManager[viewManagerName];
|
||||
@@ -328,6 +335,7 @@ export default class Video extends Component {
|
||||
onGetLicense: nativeProps.drm && nativeProps.drm.getLicense && this._onGetLicense,
|
||||
onPictureInPictureStatusChanged: this._onPictureInPictureStatusChanged,
|
||||
onRestoreUserInterfaceForPictureInPictureStop: this._onRestoreUserInterfaceForPictureInPictureStop,
|
||||
onReceiveAdEvent: this._onReceiveAdEvent,
|
||||
});
|
||||
|
||||
const posterStyle = {
|
||||
@@ -499,6 +507,7 @@ Video.propTypes = {
|
||||
onPictureInPictureStatusChanged: PropTypes.func,
|
||||
needsToRestoreUserInterfaceForPictureInPictureStop: PropTypes.func,
|
||||
onExternalPlaybackChange: PropTypes.func,
|
||||
onReceiveAdEvents: PropTypes.func,
|
||||
|
||||
/* Required by react-native */
|
||||
scaleX: PropTypes.number,
|
||||
|
Reference in New Issue
Block a user