diff --git a/RCTVideoManager.m b/RCTVideoManager.m index 7c0dfbc2..bcbd3f3e 100644 --- a/RCTVideoManager.m +++ b/RCTVideoManager.m @@ -43,6 +43,7 @@ RCT_EXPORT_VIEW_PROPERTY(volume, float); RCT_EXPORT_VIEW_PROPERTY(rate, float); RCT_EXPORT_VIEW_PROPERTY(seek, float); RCT_EXPORT_VIEW_PROPERTY(currentTime, float); +RCT_EXPORT_VIEW_PROPERTY(fullscreen, BOOL); - (NSDictionary *)constantsToExport { diff --git a/Video.js b/Video.js index cc763c37..b429bbfd 100644 --- a/Video.js +++ b/Video.js @@ -21,6 +21,7 @@ export default class Video extends Component { constructor(props, context) { super(props, context); this.seek = this.seek.bind(this); + this.goFullscreen = this.goFullscreen.bind(this); this._assignRoot = this._assignRoot.bind(this); this._onLoadStart = this._onLoadStart.bind(this); this._onLoad = this._onLoad.bind(this); @@ -38,6 +39,10 @@ export default class Video extends Component { this.setNativeProps({ seek: time }); } + goFullscreen() { + this.setNativeProps({ fullscreen: true }); + } + _assignRoot(component) { this._root = component; } @@ -134,6 +139,7 @@ Video.propTypes = { /* Native only */ src: PropTypes.object, seek: PropTypes.number, + fullscreen: PropTypes.bool, /* Wrapper component */ source: PropTypes.object,