...
 
Commits (2)
......@@ -97,11 +97,9 @@ export default class MediaView extends Component {
guid = this.props.entity.guid;
}
const source = {uri: MINDS_API_URI + `api/v1/media/${guid}/play`, headers: api.buildHeaders() };
return (
<View style={styles.videoContainer}>
<MindsVideo video={source} entity={this.props.entity} ref={o => {this.videoPlayer = o}}/>
<MindsVideo entity={this.props.entity} ref={o => {this.videoPlayer = o}}/>
</View>
);
}
......
......@@ -6,16 +6,12 @@ import Cancelable from 'promise-cancelable';
* Attacment service
*/
class AttachmentService {
/**
* Attach media file
* @param {object} media
* @param {function} onProgress
*/
attachMedia(media, extra, onProgress=null) {
let type = 'image'
attachMedia(media, extra, onProgress = null) {
const file = {
uri: media.uri,
path: media.path || null,
......@@ -25,8 +21,10 @@ class AttachmentService {
const progress = (e) => {
let pct = e.loaded / e.total;
if (onProgress) onProgress(pct);
}
if (onProgress) {
onProgress(pct);
}
};
let promise;
......@@ -87,6 +85,10 @@ class AttachmentService {
return api.get(`api/v1/media/transcoding/${guid}`);
}
getVideoSources(guid) {
return api.get(`api/v2/media/video/${guid}`);
}
/**
* Capture video
*/
......@@ -98,8 +100,8 @@ class AttachmentService {
uri: response.uri,
path: response.path,
type: 'video/mp4',
fileName: 'image.mp4'
}
fileName: 'image.mp4',
};
}
return response;
......
This diff is collapsed.
......@@ -8261,7 +8261,7 @@ prop-types-exact@^1.2.0:
object.assign "^4.1.0"
reflect.ownkeys "^0.2.0"
prop-types@^15.5.10, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
version "15.7.2"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
......@@ -8595,6 +8595,19 @@ react-native-device-log@Minds/react-native-device-log#74f06b09c6656aa228a9a3a474
react-native-invertible-scroll-view "^1.1.1"
stacktrace-parser "^0.1.4"
react-native-elements@1.1.0:
version "1.1.0"
resolved "https://registry.yarnpkg.com/react-native-elements/-/react-native-elements-1.1.0.tgz#f99bcda4459a886f3ab4591c684c099d37aedf2b"
integrity sha512-n1eOL0kUdlH01zX7bn1p7qhYXn7kquqxYQ0oWlxoAck9t5Db/KeK5ViOsAk8seYSvAG6Pe7OxgzRFnMfFhng0Q==
dependencies:
color "^3.1.0"
deepmerge "^3.1.0"
hoist-non-react-statics "^3.1.0"
opencollective-postinstall "^2.0.0"
prop-types "^15.5.8"
react-native-ratings "^6.3.0"
react-native-status-bar-height "^2.2.0"
react-native-elements@^1.2.7:
version "1.2.7"
resolved "https://registry.yarnpkg.com/react-native-elements/-/react-native-elements-1.2.7.tgz#1eca2db715c41722aeb67aea62bd2a4621adb134"
......@@ -9339,6 +9352,12 @@ rn-apk@^0.2.9:
resolved "https://registry.yarnpkg.com/rn-apk/-/rn-apk-0.2.9.tgz#6aec783dd64cdf6074b0a590cc51261999351b79"
integrity sha512-JcqO9raQWdjQAaRKjz6OFdE6G4GzZnqhqMLRyKHQ9WBaYFzhNpzujTyTr0T9cngvMJ1JOmHfxG1U8DFHf7QU3A==
"rne-modal-tooltip@gist:b28c003d87c619674def0878473338a0":
version "1.1.0"
resolved "https://gist.github.com/b28c003d87c619674def0878473338a0.git#b68c9d067545ce72b0aa4c9bf5a5fea90d136bc0"
dependencies:
react-native-elements "1.1.0"
rst-selector-parser@^2.2.3:
version "2.2.3"
resolved "https://registry.yarnpkg.com/rst-selector-parser/-/rst-selector-parser-2.2.3.tgz#81b230ea2fcc6066c89e3472de794285d9b03d91"
......