react-native-giraffeplayer2
Video Player based on GiraffePlayer2 for react-native
Only Android support now.
Getting started
$ npm install react-native-giraffeplayer2 --save
Screen
Usage
;; ; { React; const _handleClickPlay = { GiraffePlayer2; GiraffePlayer2; }; return <View style=stylesbody> <Text style=stylestitle>GiraffePlayer2</Text> <TouchableOpacity style=stylesbutton onPress=_handleClickPlay> <Text>Play</Text> </TouchableOpacity> </View> ;} const styles = StyleSheet;
API
Config
setTitle(title)
- set title => title: StringsetFullScreenOnly(val)
- set fullscreen => val: BooleansetAspectRatio(val)
- set aspect ratio => AspectRatio: StringsetShowTopBar(SCALE_TYPE)
- set show top bar type => val: Boolean
Initialize
play(url)
- play video => url: String
LICENSE
MIT