🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

webrtclib

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

webrtclib

a webrtc lib for vue

0.1.1
npm
Version published
Weekly downloads
2
-84.62%
Maintainers
1
Weekly downloads
 
Created
Source

webrtclib

一个webrtc的ve实现

引入组件

import videoWebrtc from "webrtclib";

Vue.use(videoWebrtc);

demo参考

  <template>
    <div class="home">
      <div class="video">
        <video-webrtc
          :server="server"
          :stun="stun"
          :sid="sid"
          @capture="capture"
        ></video-webrtc>
      </div>
      <img v-if="imgCapture" :src="imgCapture" alt="" />
    </div>
  </template>
  
  <script>
  export default {
    name: "Home",
    data() {
      return {
        stun: "stun://ip:port",
        server: "ws://ip:port/wsrtc",
        sid: "*****",
        imgCapture: ""
      };
    },
    methods: {
      capture(val) {
        console.log(val);
        this.imgCapture = val;
      }
    }
  };
  </script>
  <style>
  .video {
    width: 400px;
    height: 300px;
    position: relative;
  }
  </style>

Keywords

webrtc

FAQs

Package last updated on 20 Oct 2020

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts