-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
1a3c1bb
commit 71ad915
Showing
8 changed files
with
91 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,38 @@ | ||
<p align="center"> | ||
<a href="https://npmjs.com/package/webrtc-streamer-helper"><img src="https://badgen.net/npm/v/webrtc-streamer-helper" alt="npm package"></a> | ||
<img alt="npm bundle size" src="https://img.shields.io/bundlephobia/minzip/webrtc-streamer-helper"> | ||
<img alt="GitHub" src="https://img.shields.io/github/license/zhensherlock/webrtc-streamer-helper"> | ||
</p> | ||
|
||
# webrtc-streamer-helper | ||
webrtc streamer helper | ||
|
||
> This is a webrtc streamer helper. | ||
## Installing | ||
|
||
```bash | ||
# or pnpm or yarn | ||
npm install webrtc-streamer-helper | ||
``` | ||
|
||
## Usage | ||
|
||
```ts | ||
import { WebRTCStreamer } from 'webrtc-streamer-helper' | ||
|
||
const webRtcServer = new WebRTCStreamer({ | ||
url: 'http://10.57.2.244:8000', | ||
element: 'div-1' | ||
}) | ||
|
||
webRtcServer.connect( | ||
videoUrl, | ||
audioUrl, | ||
'rtptransport=tcp&timeout=60&width=320&height=0', | ||
null | ||
)() | ||
``` | ||
|
||
## License | ||
|
||
[MIT](LICENSE). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
import WebRTCStreamer from './core/webRTCStreamer' | ||
import './style' | ||
|
||
export default WebRTCStreamer | ||
export { | ||
WebRTCStreamer | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
export interface WebRTCStreamerOptions { | ||
/** | ||
* id of the video element tag | ||
*/ | ||
element: Element | string; | ||
/** | ||
* url of webrtc-streamer (default is current location) | ||
*/ | ||
url: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters