1.4.0 • Published 2 years ago
webrtc-stream-element v1.4.0
webrtcStream
<webrtc-stream></webrtc-stream>
Example
Description
custom element to make a video streaming using webRTC in the browser with the functionality in the section methods
Project setup
npm install
Usage
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script type="module" crossorigin src="./dist/assets/index.56a0a266.js"></script>
</head>
<body>
<webrtc-stream></webrtc-stream>
</body>
</html>
Props
name | type |
---|---|
videowidth | String, Number |
videoheight | String, Number |
videobitspersecond | String |
isstartstream | Boolean |
isstoptstream | Boolean |
doscreenshot | Boolean |
dorecording | Boolean |
dosharescreen | Boolean |
audiobitspersecond | String |
mimetype0 | String, Number |
Methods
name | description |
---|---|
startStreaming | start video streaming |
stopStreaming | stop video Streaming |
startRecording | start recording the video stream |
stopRecording | stop recording the video stream |
screenShot | take a screenshot of the video stream |
ShareScreen | start sharing the content of the screen |
DEMO
<custom-element-demo>
<template>
<script type="module" crossorigin src="./dist/assets/index.562563e6.js"></script>
<link rel="import" href="index.html">
<link rel="import" href="./index.html">
<webrtc-stream></webrtc-stream>
</template>
</custom-element-demo>
<webrtc-stream></webrtc-stream>
Customize configuration
License
MIT
Credits
Author: @HussienMN on GitHub .