2.0.0 • Published 2 years ago

webrtc-peercall v2.0.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

Published on webcomponents.org

webrtcStream

Functional custom element

Example

Live Example.

Description

custom element to make a call with another peer using custom signaling-server with the functionality in the section methods Using this custom element you can create a room for a call between two peers.

It's important to run the signaling-server 1- Download or clone it in your project from the server directory in this repository server. 2- Run through the command : node index.html.

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" />
    <title>Vite + Vue</title>
    <script type="module" crossorigin src="./dist/assets/index.562563e6.js"></script>
  </head>
  <body>
    <webrtc-call></webrtc-call>
  </body>
</html>

Props

nametype
socketurlString
roomnamelabelString
usernamelabelString
videoheightString, Number
videowidthString, Number
doselfieBoolean
dochatBoolean

Methods

namedescription
startStreamingstart video streaming
createRoomTo create a room for the call
joinRoomTo join a created room
leaveTo leave the call
sendMsgTo send a message entered in the textarea
doMuteA toggel button to mute the sound
unMuteA toggel button to mute the sound
hideCamA toggel button to hide the video cam
showCamA toggel button to show the video cam

inline Demo

<custom-element-demo>
  <template>
    <script type="module" crossorigin src="./dist/assets/index.562563e6.js"></script>
    <link rel="import" href="./index.html"> 
    <webrtc-call></webrtc-call>
  </template>
</custom-element-demo>
  <webrtc-call></webrtc-call>

Customize configuration

See Configuration Reference.

License

MIT

Credits

Author: @HussienMN on GitHub .

2.0.0

2 years ago

1.2.0

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago

1.1.1

2 years ago

0.2.1

2 years ago

0.1.1

2 years ago

0.0.1

2 years ago