Gathering detailed insights and metrics for react-native-gstreamer
Gathering detailed insights and metrics for react-native-gstreamer
Gathering detailed insights and metrics for react-native-gstreamer
Gathering detailed insights and metrics for react-native-gstreamer
npm install react-native-gstreamer
Typescript
Module System
Node Version
NPM Version
Objective-C (55.04%)
C (22.58%)
Java (15.05%)
JavaScript (5.2%)
Makefile (2.13%)
Total Downloads
4,495
Last Day
1
Last Week
14
Last Month
30
Last Year
402
51 Stars
27 Commits
21 Forks
11 Watching
7 Branches
5 Contributors
Latest Version
2.0.6
Package Id
react-native-gstreamer@2.0.6
Size
28.34 kB
NPM Version
5.6.0
Node Version
8.7.0
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
600%
14
Compared to previous week
Last month
76.5%
30
Compared to previous month
Last year
9.5%
402
Compared to previous year
2
React native GStreamer is an audio/video player built for react-native using GStreamer framework. It handles everything GStreamer can natively handle. For more information, you can go here : https://gstreamer.freedesktop.org/
npm install --save react-native-gstreamer
/!\ Be sure to read everything carefully : GStreamer is a C Library. It will be necessary to finalize the linking manually.
1import React, { Component } from 'react' 2import { StyleSheet, View, Button } from 'react-native' 3import GstPlayer, { GstState } from 'react-native-gstreamer' 4 5export default class App extends Component { 6 7 uri1 = "http://mirrors.standaloneinstaller.com/video-sample/jellyfish-25-mbps-hd-hevc.mp4" 8 uri2 = "http://mirrors.standaloneinstaller.com/video-sample/Panasonic_HDC_TM_700_P_50i.mp4" 9 10 constructor(props, context) { 11 super(props, context) 12 this.state = { uri: this.uri1 } 13 } 14 15 render() { 16 return ( 17 <View style={styles.container}> 18 <GstPlayer 19 style={styles.videoPlayer} 20 uri={this.state.uri} 21 ref="GstPlayer" 22 autoPlay={true} 23 /> 24 <View style={styles.controlBar}> 25 <Button title="uri1" onPress={() => this.setState({ uri: this.uri1 })}></Button> 26 <Button title="uri2" onPress={() => this.setState({ uri: this.uri2 })}></Button> 27 <Button title="Stop" onPress={() => this.refs.GstPlayer.stop()}></Button> 28 <Button title="Pause" onPress={() => this.refs.GstPlayer.pause()}></Button> 29 <Button title="Play" onPress={() => this.refs.GstPlayer.play()}></Button> 30 </View> 31 </View> 32 ) 33 } 34} 35 36const styles = StyleSheet.create({ 37 container: { flex: 1 }, 38 controlBar: { 39 flexDirection: "row", 40 justifyContent: "space-between" 41 }, 42 videoPlayer: { flex: 1 } 43})
Parameter | Type | Default | Description |
---|---|---|---|
uri | String | undefined | Path to the desired media to play |
autoPlay | Boolean | false | Will automatically start playing a media when the player is ready, or when you change a media uri |
audioLevelRefreshRate | Integer | 100 | Defines the frequency of audio volume analysis in milliseconds. Helpful to design a vumeter |
isDebugging | Boolean | false | When set to true, it will show a videotestsrc instead of a default playbin. Helpful to check if an issue is coming from playbin or not. Please note that for now, you need to restart the player in order to apply this change |
Method | Description |
---|---|
onPlayerInit() | Called when the player is ready. Could be useful to display/hide a loading notification |
onStateChanged(GstState old_state, GstState new_state) | Called when GStreamer engine is done switching state. You should use GstState enum import to switch on values |
onVolumeChanged(Double rms, Double peak, Double decay) | Contains audio volume between 0 and 1. It is called as often as defined in audioLevelRefreshRate parameter |
onUriChanged(String new_uri) | Called when GStreamer engine is done changing an uri. Helpful to display a loading notification |
onEOS() | Called when a media stream is ended |
onElementError(String source, String message, String debug_info) | Called when an internal component of GStreamer playbin's pipeline has met an error. It can be helpful to debug any media playing issue |
Method | Description |
---|---|
setGstState(GstState state) | Call this if you want to call GStreamer states yourself. You should use GstState enum import to select a state |
play() | Plays the current media (Alias for setGstState to GstState.PLAYING) |
pause() | Pauses the current media (Alias for setGstState to GstState.PAUSED) |
stop() | Stops the current media (Alias for setGstState to GstState.READY) |
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
Found 0/27 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
license file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2024-12-23
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More