Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added support for setting video settings, moved to pnpm, fixed 2nd stream reconnection #39

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
3abe6cb
Bump HaishinKit to 1.4.3
Andriiklymiuk Apr 7, 2023
e300f2c
Fix publishing on ios on 2nd try
Andriiklymiuk Apr 7, 2023
a2c412e
Remove removeFromSuperview as it is just log func
Andriiklymiuk Apr 7, 2023
5278476
Fix is muted
Andriiklymiuk Apr 7, 2023
5306d5e
Added removeFromSuperview back
Andriiklymiuk Apr 11, 2023
165cfa0
Add setVideoSettings to set custom video quality
Andriiklymiuk Apr 11, 2023
9049ee7
Use common videoSettings variable
Andriiklymiuk Apr 11, 2023
235022e
Added videoSettings variable
Andriiklymiuk Apr 12, 2023
9317089
Revert HaishinKit to 1.2.7
Andriiklymiuk Apr 13, 2023
2f04f15
Fix front camera mirror state
Andriiklymiuk Apr 13, 2023
11037d1
Updated setting settings for video
Andriiklymiuk Apr 13, 2023
90dd8ba
Remove unsupported multicamera detach
Andriiklymiuk Apr 13, 2023
72c28ac
Added missing import
Andriiklymiuk Apr 13, 2023
d5883c1
Fix styling
Andriiklymiuk Apr 13, 2023
f8b6915
Add videoSettings and setVideoSettings to docs
Andriiklymiuk Apr 13, 2023
58fbb70
Fixed example
Andriiklymiuk Apr 13, 2023
fb66823
Fix wrong videoSettings name
Andriiklymiuk Apr 13, 2023
ca5003f
Added missing stream status
Andriiklymiuk Apr 14, 2023
a7f0197
Added rtmpError handler
Andriiklymiuk Apr 14, 2023
e99b3ee
Remove publish
Andriiklymiuk Apr 14, 2023
0191111
Remove unnecessary type declaration
Andriiklymiuk Apr 14, 2023
684397c
Remove test from lib built library
Andriiklymiuk Apr 14, 2023
2bf462e
Remove test folders from lib
Andriiklymiuk Apr 14, 2023
ec2a521
Build script
Andriiklymiuk Apr 14, 2023
dab4244
Update tsconfig to remove old config
Andriiklymiuk Apr 14, 2023
dfda445
Add generated files to ignore
Andriiklymiuk Apr 14, 2023
415b40e
Ignore test folder in build
Andriiklymiuk Apr 14, 2023
40360b5
Add pack scripts
Andriiklymiuk Apr 14, 2023
683a961
Update deletePackage
Andriiklymiuk Apr 14, 2023
a477760
Added pnpm
Andriiklymiuk Apr 14, 2023
af69c45
Added shortcut with make
Andriiklymiuk Apr 14, 2023
becb9a3
Remove unnecessary prepare
Andriiklymiuk Apr 14, 2023
2cf4570
Fix dev build
Andriiklymiuk Apr 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 +65,6 @@ android/keystores/debug.keystore
lib/
example/.env
.env

package/
react-native-rtmp-publisher*.tgz
6 changes: 6 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
build:
pnpm prepare && pnpm pack
deletePackage:
pnpm deletePackage

.PHONY: build deletePackage
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,12 @@ async function publisherActions() {
ref={publisherRef}
streamURL="rtmp://your-publish-url"
streamName="stream-name"
videoSettings={{
width: 1080,
height: 1920,
bitrate: 5000 * 1024,
audioBitrate: 192 * 1000
}}
onConnectionFailedRtmp={() => ...}
onConnectionStartedRtmp={() => ...}
onConnectionSuccessRtmp={() => ...}
Expand All @@ -162,6 +168,7 @@ async function publisherActions() {
| :----------: | :------: | :------: | :-----------------------------------: |
| `streamURL` | `string` | `true` | Publish URL address with RTM Protocol |
| `streamName` | `string` | `true` | Stream name or key |
| `videoSettings` | `VideoSettingsType` | `false` | Video settings for video |

### Youtube Example

Expand Down Expand Up @@ -209,6 +216,7 @@ For live stream, Youtube gives you stream url and stream key, you can place the
| `isVideoPrepared` | `Promise<boolean>` | Returns video prepare state | ✅ | ✅ |
| `isCameraOnPreview` | `Promise<boolean>` | Returns camera is on | ✅ | ❌ |
| `setAudioInput` | `Promise<AudioInputType>`| Sets microphone input | ✅ | ✅ |
|`setVideoSettings` | `Promise<VideoSettingsType>`| Sets camera quality settings| ❌ | ✅ |
Copy link
Owner

@ezranbayantemur ezranbayantemur Apr 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not setting the camera quality, it's setting the video scale values. Can you update it for avoiding misunderstanding?


## Types

Expand All @@ -217,6 +225,7 @@ For live stream, Youtube gives you stream url and stream key, you can place the
| `streamState` | `CONNECTING`, `CONNECTED`, `DISCONNECTED`, `FAILED` |
| `BluetoothDeviceStatuses` | `CONNECTING`, `CONNECTED`, `DISCONNECTED` |
| `AudioInputType` | `BLUETOOTH_HEADSET`, `SPEAKER`, `WIRED_HEADSET` |
| `VideoSettingsType` | `{width: number; height: number; bitrate: number; audioBitrate: number}` |

* AudioInputType: WIRED_HEADSET type supporting in only iOS. On Android it affects nothing. If a wired headset connected to Android device, device uses it as default.
## Used Native Packages
Expand Down
Loading