npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

vue-av-call

v1.0.5

Published

The audio and video call component for vue3

Readme

基于vue3的音视频通话组件

NPM package Build Size NPM Downloads

1.支持语音通话. 2.支持视频通话.

PS:暂时只支持一对一通话

Demo

如何运行demo?

git clone https://github.com/Juenfy/vue-av-call.git
cd vue-av-call
npm install
npm link
npm run start-websocket
cd demo
npm install
npm link vue-av-call
npm run dev

快速开始

如何安装?

npm i vue-av-call

如何启动websocket服务?

cd node_modules/vue-av-call
# 默认8080端口
npm run start-websocket
# 指定端口
npm run start-websocket -- port=2346
# 开启wss ca证书链非必传
npm run start-websocket -- cert=/path/to/cert key=/path/to/key ca=/path/to/ca

如何使用?

//导入
import {AvCall} from "vue-av-call"
import * as call from "vue-av-call"
import "vue-av-call/dist/vue-av-call.css"

//拨打通话前的准备

//首先设置发起方的用户信息
call.setCallFrom({
    id: 1,
    nickanme: 'test001',
    avatar: 'https://api.multiavatar.com/1.png'
})

//再设置接收方的用户信息
call.setCallTo({
    id: 2,
    nickanme: 'test002',
    avatar: 'https://api.multiavatar.com/2.png'
})

//最后拨打语音或者视频电话
call.startCall(call.CALL_TYPE.AUDIO) //语音通话

call.startCall(call.CALL_TYPE.VIDEO) //视频通话
<!-- template -->
<av-call></av-call>

API 参考

初始化

| Props参数 | 描述 | 默认 | |--------------------------------|-----------------|:---------------------------------------------------------:| | wss: Boolean | 开启wss协议 | false | | port: Number | 指定连接端口 | 8080 | | timeout: Number | 设置超时未接听自动挂断,单位秒 | 30 | | ringtone: Object | 自定义通话与挂断的铃声提示 | {call:new Audio(call.mp3),hangup:new Audio(hangup.mp3)} | | debug: Boolean | 浏览器会弹出一些错误信息 | false |

| Events事件 | 描述 | 回调参数 | |---------------------|--------------------|:-----------------:| | onOpen | Websocket 连接成功的回调 | websocket event | | onMessage | Websocket 接收到消息的回调 | websocket event | | onClose | Websocket 关闭连接的回调 | websocket event | | onCallOut | 拨打时回调 | see demo | | onCallIn | 来电时回调 | see demo | | onAnswerCall | 接通电话时回调 | see demo | | onHangupCall | 挂断电话时回调 | see demo | | onCallError | 通话过程中异常回调 | see demo | | onControl | 切换扬声器等开关按钮时回调 | see demo |