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

wy-webvideo-sdk

v1.2.23

Published

video meeting sdk for browser

Readme

视频通话SDK封装

如何引入

js引入

import形式

import {WYWebVideo} from 'wy-webvideo-sdk/dist/wy.web-video.sdk'

直接引入形式

全局变量

window.WYWebVideo

css引入

暂时只提供less引入,路径为wy-webvideo-sdk/dist/less/wy.web-video.sdk.less

image资源引入

提供图片资源引入,路径为wy-webvideo-sdk/dist/images

注意图片路径替换,修改wy.web-video.sdk.less中的@iconUrl变量为图片文件夹路径即可

使用说明

tb视频,直接调用,传入会地址为入参即可

WYWebVideo.tbMediaStart ({
    enterInfo: 'http://www.baidu.com' //这是tb入会地址,一般由后端拼接获得
});

scc视频

configSccSdk(初始化,调用scc视频其他api之前必须先执行)

WYWebVideo.configSccSdk({
    appId: 'd_h5_xxx',
    appVersion: '1.0.0',
    uid: '123123124221',
    name: '吴彦祖',
    photo: 'https://www.baidu.com/img/bd_logo1.png',
    token: '!ttttttttttttttttt',
    isProd: false,
    printLog: false,
    echatServer: '192.1.1.1:8080',
    configSuccess: function() {
        WYWebVideo.sendVideo(videoParams);
    },
    configError: function(error) {
        alert(error.message);
    }
});
// configError 回调参数error: {code: xxx, message: xxx}
// code 说明 0:对方不在线。1:chrome版本小于64不支持。10054:当前浏览器版本不支持。10060:调用scc版本检查接口报错。

参数说明

|参数名|类型|描述|是否必填|默认值| |:-----:|:-----:|:-----:|:-----:|:-----:| |appId|string|接入echat时配置的appId|√| | |appVersion|string|决定视频提供商字段| | | |uid|string|发起方userId|√| | |name|string|发起方名字,不传默认为用户中心的名字| | | |photo|string|发起者头像地址,不传会用默认头像| | | |messageFun|function或者object|接入方自定义的提示函数,如果传入function比如alert,则所有的提示都使用这个;如果传入object,如{error: alert,info: $.toast, warning: $.toast, success: $.toast} ,则会将四项提示分别替换为对应的方法||alert | |token|string|发起方用户token|√|| |isProd|boolean|是否是生产环境||false| |printLog|boolean|是否打印log| |默认跟isProd相反,即若isProd为false,则pringLog为true| |echatServer|string|测试环境指定echat地址| | 空 | |startMeetingSuccessCallback|function|视频发起成功回调| | 空函数 | |endMeetingSuccessCallback|function|视频挂断成功回调| | 空函数 | |configSuccess|function|成功回调,配置sdk成功,可以进行下一步sendVideo或者sendAudio| |console.log| |configError|function|失败回调,配置sdk失败||console.log| |startMeetingSuccessCallback|function|每次发起视频成功的回调函数,一般用于业务方配置防止重复发起| | 空函数 | |messageFun|function或者object|用于定制各种提示方法。如果是function,则会把error、info、warning、success四个方法都指定为该function;如果是object,则会取error、info、warning、success等四个function分别为对应的方法赋值| | 为function时 → window.alert 为object时 → {error: window.error,info: $.toast, warning: $.toast, success: $.toast} |

sendVideo(发起视频邀请,注意请在configSccSdk之后调用,建议第一次调用放到configSuccess回调,后续调用时判断WYWebVideo.wyVideo是否存在,存在即可直接调用,否则重新走configSccSdk)

WYWebVideo.sendVideo({
    consultKey: 'xpz6b0enkr181219111135765',
    bizType: 'bizType',
    subBizType: 'subBizType',
    userInfo: {
        uid: '123123203426',
        name: '邵旭晨',
        photo: 'https://www.baidu.com/img/bd_logo1.png',
        appId: 'test'
    },
    sendError: function(error) {
        alert(error.message);
    }
});
参数说明

|参数名|类型|描述|是否必填|默认值| |:-----:|:-----:|:-----:|:-----:|:-----:| |consultKey|string|订单号| | | |bizType|string|业务类型,决定发起视频能力|√ | | |subBizType|string|子业务类型,决定发起视频能力| | | |sendError|function|视频发送失败回调| |console.log | |userInfo|object|接收方信息,包括下面的uid和name|√||

userInfo对象

|参数名|类型|描述|是否必填|默认值| |:-----:|:-----:|:-----:|:-----:|:-----:| |uid|string|接收方的userId|√| | |name|string|接收名字,不传默认为用户中心的名字| | | |photo|string|发起者头像地址,不传会用默认头像| | | |appId|string|接收方appId| | |

sendAudio(发起语音邀请)

WYWebVideo.sendAudio({
    consultKey: '12345678',
    bizType: 'bizType',
    subBizType: 'subBizType',
    userInfo: {
        uid: '123123203426',
        name: '邵旭晨',
        photo: 'https://www.baidu.com/img/bd_logo1.png',
        appId: 'test'
    },
    sendError: function(error) {
        alert(error.message);
    }
});
参数说明

同sendVideo