Commit 8ebfa6e4 authored by Stanisław Chmiela's avatar Stanisław Chmiela
Browse files

Export property from Objective-C to React

parent 5244a5b7
Loading
Loading
Loading
Loading
+1 −0
Changes for RCTVideoManager.m: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -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
{
+6 −0
Changes for Video.js: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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,