-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
39 lines (31 loc) · 862 Bytes
/
App.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
*/
import React, { Component } from 'react';
const MediaJob = require('./App/DataMachine/MediaJob')
const MediaPlayer = require('./App/Screens/MediaPlayer')
import {
STATE_EMPTY,
STATE_AVAILABLE,
STATE_UNAVAILABLE,
STATE_PLAY,
TYPE_ANY,
} from './App/Constants/StateConstants'
const stateData = (dataType) => {
return require('immutable').fromJS({
fileName: 'sample_download.mp3',
mediaKey: 'unique media key',
mediaURL: 'http://sadhguru.podOmatic.com/enclosure/2018-02-25T00_38_05-08_00.mp3',
dataType: dataType,
})
}
var job = new MediaJob(stateData(TYPE_ANY))
export default class App extends Component {
render() {
return (
<MediaPlayer mediaJob={ job } />
);
}
};