Gathering detailed insights and metrics for react-native-czb-video
Gathering detailed insights and metrics for react-native-czb-video
Gathering detailed insights and metrics for react-native-czb-video
Gathering detailed insights and metrics for react-native-czb-video
npm install react-native-czb-video
Typescript
Module System
Node Version
NPM Version
Swift (31.68%)
Kotlin (25.18%)
Java (20.44%)
TypeScript (15.85%)
C++ (3.56%)
Objective-C (2.48%)
Ruby (0.46%)
Shell (0.19%)
C (0.12%)
Nix (0.04%)
JavaScript (0.01%)
Total Downloads
0
Last Day
0
Last Week
0
Last Month
0
Last Year
0
MIT License
7,451 Stars
2,474 Commits
2,975 Forks
107 Watchers
24 Branches
328 Contributors
Updated on Jul 13, 2025
Latest Version
1.0.0
Package Id
react-native-czb-video@1.0.0
Unpacked Size
454.97 kB
Size
213.56 kB
File Count
63
NPM Version
5.5.1
Node Version
8.9.3
Cumulative downloads
Total Downloads
Last Day
0%
NaN
Compared to previous day
Last Week
0%
NaN
Compared to previous week
Last Month
0%
NaN
Compared to previous month
Last Year
0%
NaN
Compared to previous year
2
5
A <Video>
component for react-native, as seen in
react-native-login!
Requires react-native >= 0.40.0, for RN support of 0.19.0 - 0.39.0 please use a pre 1.0 version.
Run npm i -S react-native-video
Run react-native link
to link the react-native-video library.
If you would like to allow other apps to play music over your video component, add:
AppDelegate.m
1#import <AVFoundation/AVFoundation.h> // import 2 3- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions 4{ 5 ... 6 [[AVAudioSession sharedInstance] setCategory:AVAudioSessionCategoryAmbient error:nil]; // allow 7 ... 8}
Note: you can also use the ignoreSilentSwitch
prop, shown below.
Run react-native link
to link the react-native-video library.
react-native link
don’t works properly with the tvOS target so we need to add the library manually.
First select your project in Xcode.
After that, select the tvOS target of your application and select « General » tab
Scroll to « Linked Frameworks and Libraries » and tap on the + button
Select RCTVideo-tvOS
That’s all, you can use react-native-video for your tvOS application
Run react-native link
to link the react-native-video library.
Or if you have trouble, make the following additions to the given files manually:
android/settings.gradle
1include ':react-native-video' 2project(':react-native-video').projectDir = new File(rootProject.projectDir, '../node_modules/react-native-video/android')
android/app/build.gradle
1dependencies { 2 ... 3 compile project(':react-native-video') 4}
MainApplication.java
On top, where imports are:
1import com.brentvatne.react.ReactVideoPackage;
Add the ReactVideoPackage
class to your list of exported packages.
1@Override 2protected List<ReactPackage> getPackages() { 3 return Arrays.asList( 4 new MainReactPackage(), 5 new ReactVideoPackage() 6 ); 7}
Make the following additions to the given files manually:
windows/myapp.sln
Add the ReactNativeVideo
project to your solution.
UWP: Select node_modules\react-native-video\windows\ReactNativeVideo\ReactNativeVideo.csproj
WPF: Select node_modules\react-native-video\windows\ReactNativeVideo.Net46\ReactNativeVideo.Net46.csproj
windows/myapp/myapp.csproj
Add a reference to ReactNativeVideo
to your main application project. From Visual Studio 2015:
UWP: Check ReactNativeVideo
from Solution Projects.
WPF: Check ReactNativeVideo.Net46
from Solution Projects.
MainPage.cs
Add the ReactVideoPackage
class to your list of exported packages.
1using ReactNative; 2using ReactNative.Modules.Core; 3using ReactNative.Shell; 4using ReactNativeVideo; // <-- Add this 5using System.Collections.Generic; 6... 7 8 public override List<IReactPackage> Packages 9 { 10 get 11 { 12 return new List<IReactPackage> 13 { 14 new MainReactPackage(), 15 new ReactVideoPackage(), // <-- Add this 16 }; 17 } 18 } 19 20...
1// Within your render function, assuming you have a file called 2// "background.mp4" in your project. You can include multiple videos 3// on a single screen if you like. 4 5<Video source={{uri: "background"}} // Can be a URL or a local file. 6 poster="https://baconmockup.com/300/200/" // uri to an image to display until the video plays 7 ref={(ref) => { 8 this.player = ref 9 }} // Store reference 10 rate={1.0} // 0 is paused, 1 is normal. 11 volume={1.0} // 0 is muted, 1 is normal. 12 muted={false} // Mutes the audio entirely. 13 paused={false} // Pauses playback entirely. 14 resizeMode="cover" // Fill the whole screen at aspect ratio.* 15 repeat={true} // Repeat forever. 16 playInBackground={false} // Audio continues to play when app entering background. 17 playWhenInactive={false} // [iOS] Video continues to play when control or notification center are shown. 18 ignoreSilentSwitch={"ignore"} // [iOS] ignore | obey - When 'ignore', audio will still play with the iOS hard silent switch set to silent. When 'obey', audio will toggle with the switch. When not specified, will inherit audio settings as usual. 19 progressUpdateInterval={250.0} // [iOS] Interval to fire onProgress (default to ~250ms) 20 onLoadStart={this.loadStart} // Callback when video starts to load 21 onLoad={this.setDuration} // Callback when video loads 22 onProgress={this.setTime} // Callback every ~250ms with currentTime 23 onEnd={this.onEnd} // Callback when playback finishes 24 onError={this.videoError} // Callback when video cannot be loaded 25 onBuffer={this.onBuffer} // Callback when remote video is buffering 26 onTimedMetadata={this.onTimedMetadata} // Callback when the stream receive some metadata 27 style={styles.backgroundVideo} /> 28 29// Later to trigger fullscreen 30this.player.presentFullscreenPlayer() 31 32// To set video position in seconds (seek) 33this.player.seek(0) 34 35// Later on in your styles.. 36var styles = StyleSheet.create({ 37 backgroundVideo: { 38 position: 'absolute', 39 top: 0, 40 left: 0, 41 bottom: 0, 42 right: 0, 43 }, 44});
To see full list of available props, you can check the propTypes of the Video.js component.
1// Within your render function, assuming you have a file called 2// "background.mp4" in your expansion file. Just add your main and (if applicable) patch version 3<Video source={{uri: "background", mainVer: 1, patchVer: 0}} // Looks for .mp4 file (background.mp4) in the given expansion version. 4 poster="https://baconmockup.com/300/200/" // uri to an image to display until the video plays 5 rate={1.0} // 0 is paused, 1 is normal. 6 volume={1.0} // 0 is muted, 1 is normal. 7 muted={false} // Mutes the audio entirely. 8 paused={false} // Pauses playback entirely. 9 resizeMode="cover" // Fill the whole screen at aspect ratio. 10 repeat={true} // Repeat forever. 11 onLoadStart={this.loadStart} // Callback when video starts to load 12 onLoad={this.setDuration} // Callback when video loads 13 onProgress={this.setTime} // Callback every ~250ms with currentTime 14 onEnd={this.onEnd} // Callback when playback finishes 15 onError={this.videoError} // Callback when video cannot be loaded 16 style={styles.backgroundVideo} /> 17 18// Later on in your styles.. 19var styles = Stylesheet.create({ 20 backgroundVideo: { 21 position: 'absolute', 22 top: 0, 23 left: 0, 24 bottom: 0, 25 right: 0, 26 }, 27});
The asset system introduced in RN 0.14
allows loading image resources shared across iOS and Android without touching native code. As of RN 0.31
the same is true of mp4 video assets for Android. As of RN 0.33
iOS is also supported. Requires react-native-video@0.9.0
.
<Video
repeat
resizeMode='cover'
source={require('../assets/video/turntable.mp4')}
style={styles.backgroundVideo}
/>
To enable audio to play in background on iOS the audio session needs to be set to AVAudioSessionCategoryPlayback
. See Apple documentation for additional details. (NOTE: there is now a ticket to expose this as a prop )
seek(seconds)
Seeks the video to the specified time (in seconds). Access using a ref to the component
presentFullscreenPlayer()
Toggles a fullscreen player. Access using a ref to the component.
See an Example integration in react-native-login
note that this example uses an older version of this library, before we used export default
-- if you use require
you will need to do require('react-native-video').default
as per instructions above.
Try the included VideoPlayer example yourself:
1git clone git@github.com:react-native-community/react-native-video.git 2cd react-native-video/example 3npm install 4open ios/VideoPlayer.xcodeproj 5
Then Cmd+R
to start the React Packager, build and run the project in the simulator.
Lumpen Radio contains another example integration using local files and full screen background video.
repeat
implementation)<Video>
referenceMIT Licensed
No vulnerabilities found.
Reason
30 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
0 existing vulnerabilities detected
Reason
binaries present in source code
Details
Reason
Found 16/30 approved changesets -- score normalized to 5
Reason
SAST tool is not run on all commits -- score normalized to 1
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Score
Last Scanned on 2025-07-07
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