webrtc-call
v2.0.0
Published
[![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/owner/my-element)
Downloads
8
Readme
webrtcStream
Functional custom element
Example
Description
custom element to make a call with another peer using peer ID with the functionality in the section methods The Peer ID is generated through the Skyway SDK by using Skyway signaling server See Deatils.
It's important to have peerAPIkey from Skyway to get the functionality of the signaling server To get the peerAPIkey from Skyway see deatils here (https://webrtc.ecl.ntt.com/en/skyway/function.html) After that you can pass the peerAPIkey to the element as a property Note !! you have to set up the domain of your website by creating peerAPIkey
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="./assets/index.562563e6.js"></script>
</head>
<body>
<webrtc-peercall></webrtc-peercall>
</body>
</html>
Props
| name | type |
| -------------- | ---------------------|
| peerapikey | String |
| videowidth | [String, Number] |
| videoheight | [String, Number] |
| peer_id | String |
| remote_id | String |
Methods
| name | description | | ----------------- | ------------------------------------------------------------------------| | startStreaming | start video streaming | | joinCall | To make a video call with your call partner | | leaveCall | To End the call | | screenShot | To take a selfie | | screenShotDelete | to delete the selfie | | doMute | A toggel button to mute the sound | | unMute | A toggel button to mute the sound | | hideCam | A toggel button to hide the video cam | | showCam | A 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-peercall></webrtc-peercall>
</template>
</custom-element-demo>
<webrtc-peercall></webrtc-peercall>
Customize configuration
License
MIT
Credits
Author: @HussienMN on GitHub .