
Research
/Security News
Miasma Mini Shai-Hulud Hits ImmobiliareLabs npm Packages
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.
react-native-pili
Advanced tools
#Pili Streaming Cloud React Native SDK ##Installation
Run npm install react-native-pili --save
###iOS
###Android
android/settings.gradle
include ':react-native-pili'
project(':react-native-pili').projectDir = new File(settingsDir, '../node_modules/react-native-pili/android')
android/app/build.gradle
dependencies {
...
compile project(':react-native-pili')
}
MainActivity.java
On top, where imports are:
import com.pili.rnpili.PiliPackage;
Modify getPackages method
@Override
protected List<ReactPackage> getPackages() {
return Arrays.<ReactPackage>asList(
new MainReactPackage(),
new PiliPackage(this)
);
}
##TODO
##Usage ###1. 推流
<Streaming
stream={{
id:"xxx", //pili id
title:"title", //pili title
hub:"hubname", //pili hub name
publishKey:"<PK>", //pili key
publishSecurity:"static", //pili secrity policy (static or dynamic)
hosts:{
publish:{ //pili Streaming url (support rtmp)
rtmp:"pili-publish.pilitest.qiniucdn.com"
}
}
}}
style={{
height:400,
width:400,
}}
zoom={1} //zoom
muted={true} //muted
focus={false} //focus
profile={{ //video and audio profile
video:{
fps:30,
bps:1000 * 1024,
maxFrameInterval:48
},
audio:{
rate:44100,
bitrate:96 * 1024
},
started={false} //streaming status
onReady={()=>{}} //onReady event
onConnecting={()=>{}} //onConnecting event
onStreaming={()=>{}} //onStreaming event
onShutdown={()=>{}} //onShutdown event
onIOError={()=>{}} //onIOError event
onDisconnected={()=>{}} //onDisconnected event
/>
###2. 直播播放
<Player
source={{
uri:"rtmp://pili-live-rtmp.pilitest.qiniucdn.com/pilitest/xxx",
controller: true, //Controller ui Android only
timeout: 10 * 1000, //live streaming timeout (ms) Android only
live:true, //live streaming ? Android only
hardCodec:false, //hard codec [recommended false] Android only
}}
started={true} //iOS only
muted={false} //iOS only
style={{
height:200,
width:200,
}}
onLoading={()=>{}} //loading from remote or local
onPaused={()=>{}} //pause event
onShutdown={()=>{}} //stopped event
onError={()=>{}} //error event
onPlaying={()=>{}} //play event
/>
##Release Note ##0.1.0
FAQs
Pili Streaming Cloud React Native SDK
The npm package react-native-pili receives a total of 43 weekly downloads. As such, react-native-pili popularity was classified as not popular.
We found that react-native-pili 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
Miasma Mini Shai-Hulud hits @immobiliarelabs Backstage plugins, targeting GitLab and LDAP auth packages on npm.

Security News
Rolldown paused Rust React Compiler integration after a 5MB binary size increase raised concerns about shipping React-specific code to all Vite users.

Security News
/Research
Mini Shai-Hulud expands into the Go ecosystem after hitting LeoPlatform npm packages and targeting GitHub Actions workflows.