• This repository has been archived on 16/Apr/2023
  • Stars
    star
    211
  • Rank 186,867 (Top 4 %)
  • Language
    Java
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

React Native Pili 2.0

Deprecated

Pili Streaming Cloud React Native SDK

Introduction

Warning

This lib dependency PLMediaStreamingKit (2.1.1) and PLPlayerKit (2.2.4) , the latest native sdk break origin API, i will match the latest version be free..

可能第一个在 React Native 上实现全功能的直播 SDK 了,底层基于 Pili-SDK,把 iOS 和 Android 的 API 尽量统一。

2.0 版本为了更容易集成第三方 SDK ,对原有的 React Native 项目进行了改造,iOS 的依赖采用了 Cocoapod 进行管理,当然你也可以采用原来的方式,毕竟是可以共存的。具体可以参考 AirApps 可以查看如何进行集成。项目的简单的例子是 react-native-pili

This may be the first React Native to achieve full-featured live SDK, the bottom based on [Pili-SDK] (https://github.com/pili-engineering), the iOS and Android API as unified as possible.

2.0 version In order to more easily integrate third-party SDK, the original React Native project has been modified, iOS rely on the use of Cocoapod management, of course, you can also use the original way, after all, can coexist. Specifically, you can see how to integrate with AirApps (https://github.com/airapps/airapps). A simple example of a project is [react-native-pili] (https://github.com/airapps/react-native-living)

Installation

git clone https://github.com/buhe/pili-startkit YourProjectName

cd YourProjectName/js && npm install

cd ../ios && pod install

Javascript

cd YourProjectName/js
npm start

iOS

  1. Open ios/YourProjectName.xcworkspace (这里请注意是打开 .xcworkspace!请确认) (Please note that it opens .xcworkspace! Confirm it does)
  2. Just run your project (Cmd+R)
  3. 如果是 iOS 10 需要在 info 中额外添加如下权限: (If it is iOS 10 you need to add the following additional auth in info:)
    <key>NSCameraUsageDescription</key>    
    <string>cameraDesciption</string>

    <key>NSContactsUsageDescription</key>    
    <string>contactsDesciption</string>

    <key>NSMicrophoneUsageDescription</key>    
    <string>microphoneDesciption</string>

ref: iOS 10

Android

  1. Open android use Android Studio
  2. Just run your project

TODO

  • Android Player
  • Android Streaming
  • iOS Player
  • iOS Streaming
  • 美颜和水印支持 (Design and watermark support)

Usage

1. 推流 (Streaming)

<Streaming
    rtmpURL={"rtmp://pili-publish.pilitest.qiniucdn.com/pilitest/demo_test?key=6eeee8a82246636e"}
    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. 直播播放 (Live player)

<Player
  source={{
    uri:"rtmp://pili-live-rtmp.pilitest.qiniucdn.com/pilitest/xxx",
    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

2.1.1

  • Android Player
  • Android Streaming
  • iOS Player
  • iOS Streaming

More Repositories

1

langchain-swift

🚀 LangChain for Swift. Optimized for iOS, macOS, watchOS (part) and visionOS.(beta)
Swift
275
star
2

build-your-own-x-zh

🤓 Build your own (insert technology here) simplified chinese version
244
star
3

react-native-app-qiufit

A Convict Conditioning Tracker App
Swift
188
star
4

react-native-countdown

A <Countdown /> component
JavaScript
41
star
5

vscode-mail

A Mail client embedded in Visual Studio Code.
TypeScript
30
star
6

bugu-computer

💻 Build own computer by fpga.
Verilog
24
star
7

react-native-qiniu

JavaScript
20
star
8

KubeCat

Kubernetes Dashboard iOS App
Swift
14
star
9

react-native-hybrid-app-storyboard-examples

react native hybrid app, iOS base storyboard & android base TabBar
JavaScript
12
star
10

git-gpt

Use GPT 3.5 API generate git commit log.
Rust
11
star
11

present

JavaScript
11
star
12

bugu-os

🖥 Another toy OS for fun.
Rust
7
star
13

gradle-gatling-plugin

gradle-gatling-plugins
Groovy
6
star
14

Yamler

Yamler is the yaml viewer and editor.
Swift
5
star
15

openai_aws_proxy

An AWS lambda OpenAI proxy.
JavaScript
4
star
16

magnetsearch

magnet search for Android
Java
4
star
17

GPTEmoji

Use GPT model infer emoji
Swift
4
star
18

hacknews-go

hack news cli implement golang
Go
3
star
19

gemini-pro-cli

Based on langchain-swift.
Swift
3
star
20

UIx

UI extension based on SwiftUI
Swift
2
star
21

smart_watch

⌚️ A esp32 app
Rust
2
star
22

study_emu

Rust
2
star
23

redis-on-blockchain

redis on blockchain
Solidity
2
star
24

Where

Swift
2
star
25

HtmlSummary

SwiftUI app based on langchain-swift.
Swift
2
star
26

CalibreMobile

A Calibre iOS Client.
Swift
2
star
27

bugu-lang-wasm

https://buhe.github.io/bugu-lang-wasm
TypeScript
2
star
28

AISummary

SwiftUI app based on langchain-swift.
Swift
2
star
29

study_fpga

💾 fpga study with open source tools (on macos)
Scala
2
star
30

bugu-lang

📔 bugu-lang based bugu-os
Rust
2
star
31

iap-pure-client

Implement iOS IAP with a client-only client
Swift
1
star
32

Writer_public

SwiftUI app based on langchain-swift.
Swift
1
star
33

bugu-lang-vscode

TypeScript
1
star
34

BilibiliSummary_publlic

SwiftUI app based on langchain-swift.
Swift
1
star
35

up

📺 A esp32 app
Rust
1
star
36

java_cc_study

learn cc use java lang
Java
1
star
37

hack_assembler

👷🏽 assembler of https://github.com/buhe/study_nand2tetris
Hack
1
star
38

switch_netease_cloud

♫♫♫ Nintendo Switch Netease cloud app.
C
1
star
39

FreeOpenSourceMacApp

Mac App
1
star
40

ConvictConditioning

A Convict Conditioning Tracker App based SwiftUI
Swift
1
star
41

OpenClient

Swift
1
star
42

telegram_bot

TypeScript
1
star
43

rust_cc_study

learn cc use rust lang
C++
1
star
44

InvestmentDashboard

A Investment Dash
Swift
1
star
45

PersonalAssistant

Based on Langchain-swift
Swift
1
star
46

SwiftyNotion

Swift
1
star
47

llm

Jupyter Notebook
1
star