added ability to export video

This commit is contained in:
Nicolas Gonzalez
2018-10-26 08:21:41 -05:00
parent 18e8895712
commit 16e45fc9f1
5 changed files with 1040 additions and 1029 deletions

View File

@@ -1,6 +1,6 @@
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {StyleSheet, requireNativeComponent, NativeModules, View, ViewPropTypes, Image, Platform} from 'react-native';
import {StyleSheet, requireNativeComponent, NativeModules, View, ViewPropTypes, Image, Platform, findNodeHandle} from 'react-native';
import resolveAssetSource from 'react-native/Libraries/Image/resolveAssetSource';
import TextTrackType from './TextTrackType';
import VideoResizeMode from './VideoResizeMode.js';
@@ -71,6 +71,10 @@ export default class Video extends Component {
this.setNativeProps({ fullscreen: false });
};
saveAsync = async (options?) => {
return await NativeModules.VideoManager.save(options, findNodeHandle(this._root));
}
_assignRoot = (component) => {
this._root = component;
};