Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
react-native-video-basic-controls
Advanced tools
Controls for the React Native <Video> component at react-native-video.
React native video controls. Controls for the react-native-video component for Android and IOS.
npm install react-native-video-basic-controls
npm install react-native-system-setting
link react-native-system-setting
react-native link
Add permission in android/app/src/main/AndroidManifest.xml
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="YourPackageName"
android:versionCode="1"
android:versionName="1.0">
<!-- setBrightness() & setScreenMode() & saveBrightness() -->
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
...
</manifest>
// Require the module
import MediaControls, {
PLAYER_STATES,
} from 'react-native-video-basic-controls';
const App = () => {
const [currentTime, setCurrentTime] = useState(0);
const [duration, setDuration] = useState(0);
const [isFullScreen, setIsFullScreen] = useState(false);
const [isLoading, setIsLoading] = useState(true);
const [paused, setPaused] = useState(false);
const [playerState, setPlayerState] = useState(PLAYER_STATES.PLAYING);
return (
<View style={styles.container}>
<Video {...videoProps} />
<MediaControls
duration={duration}
isLoading={isLoading}
mainColor="orange"
onFullScreen={noop}
onPaused={onPaused}
onReplay={onReplay}
onSeek={onSeek}
onSeeking={onSeeking}
playerState={playerState}
progress={currentTime}
>
<MediaControls.Toolbar>// ...</MediaControls.Toolbar>
</MediaControls>
</View>
);
};
Refer to example for implementation of this project
Prop | Type | Optional | Default | Description |
---|---|---|---|---|
progress | number | No | Current time of the media player | |
duration | number | No | Total duration of the media | |
playerState | number | No | Could be PLAYING, PAUSED or ENDED (take a look at constants section) | |
onPaused | function | No | Triggered when the play/pause button is pressed. It returns the new toggled value (PLAYING or PAUSED) | |
onSeek | function | No | Triggered when the user released the slider | |
onReplay | function | Yes | Triggered when the replay button is pressed | |
onSeeking | function | Yes | Triggered when the user is interacting with the slider |
Prop | Type | Optional | Default | Description |
---|---|---|---|---|
isLoading | boolean | Yes | false | When is loading (displays loading icon). |
fadeOutDelay | number | Yes | 5000 | Allows to customize the delay between fade in and fade out transition. |
onFullScreen | function | Yes | Custom fullscreen function, triggered when the fullscreen button is pressed. | |
showOnStart | boolean | Yes | true | controls the visibility of the controls during the initial render. |
fullScreenIconL | component | Yes | Fullscreen icon (landscape mode). | |
fullScreenIconP | component | Yes | Fullscreen icon (Portrait mode). | |
bufferValue | number | Yes | Add buffer value to Slider. | |
onSkipFor | String | Yes | To seek forward. | |
onSkipBack | String | Yes | To seek back. | |
showVolume | boolean | Yes | false | Show Volume controls. |
showBrightness | boolean | Yes | false | Show Brightness controls. |
sliderScale | number | Yes | 10 | Scale brightness/ volume slider on press. |
sliderType | String | Yes | 'Slider' | Select brightness/ volume slider type(Slider/swipe). |
Prop | Type | Optional | Default | Description |
---|---|---|---|---|
mainColor | string | Yes | rgba(12, 83, 175, 0.9) | Change custom color to the media controls |
containerStyle | StyleSheet | Yes | Apply styles to the container | |
toolbarStyle | StyleSheet | Yes | Apply styles to <MediaControls.Toolbar> | |
iconStyle | StyleSheet | Yes | Apply styles to fullscreen icon | |
sliderStyle | StyleSheet | Yes | Apply styles to Slider | |
bufferColor | String | Yes | #fff | Change color of buffer view |
VSliderOuterStyles | StyleSheet | Yes | Apply styles to volume/brightness outer slider. | |
VSliderInnerStyles | StyleSheet | Yes | Apply styles to volume/brightness track slider. |
sliderStyle={{
thumbStyle:{
// ...
},
trackStyle:{
// ...
},
containerStyle:{
// ...
}
}}
See the contributing guide to learn how to contribute to the repository and the development workflow.
MIT
FAQs
Controls for the React Native <Video> component at react-native-video.
The npm package react-native-video-basic-controls receives a total of 177 weekly downloads. As such, react-native-video-basic-controls popularity was classified as not popular.
We found that react-native-video-basic-controls demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.