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 🙏

© 2024 – Pkg Stats / Ryan Hefner

realtimecatjs

v0.4.10

Published

Realtimecat JS SDK

Downloads

5

Readme

实时猫 JS SDK | RealTimeCat JavaScript SDK

关于

实时猫 JS SDK是实时猫客户端库的一部分,实时猫客户端库的主要目的是通过对连接实时猫云WebRTC服务器功能的封装,大大简化开发实时交互应用的难度,并可以使用实时猫提供的高级WebRTC功能。

开发者通过实时猫JS SDK,可以进行Web端的实时视频开发。

下载实时猫 JS SDK

选择以下方式中的任意一种加载实时猫 JS SDK。

直接使用实时猫CDN

通过引入CDN上的实时猫JavaScript文件,可以直接在页面内加载实时猫JavaScript SDK。

新建一个HTML网页,在网页的<head></head>之间,添加以下代码:

<!-- 加载实时猫 JavaScript SDK -->
<script src="https://cdn.realtimecat.com/realtimecat/realtimecat-0.4.min.js"></script>

使用包管理软件加载实时猫SDK

如果使用Bower作为包管理器,直接运行以下命令安装实时猫JavaScript SDK:

$ bower install realtimecatjs#0.4.0 --save

如果使用NPM,直接运行以下命令安装:

$ npm install realtimecatjs --save

在使用包管理软件安装完成后,仍需要在具体HTML页面中,引入下载好的实时猫JavaScript SDK。

本SDK同时符合AMD和CommonJS的规范,你可以通过RequireJS或者require('realtimecatjs')的方式来调用实时猫JavaScript SDK。

Changelog

v0.4

增加方法:

  • 增加Mos平均主观意见评分
  • 增加用户内部测试的服务器Relay模式
  • 增加 LocalStream.release() 方法,用于回收本地流资源。
  • 增加 RTCat.detect() 用于测试浏览器兼容性和网速。
  • 增加stream.detectVolume() 方法,用于检测音量

增加事件:

Sender:
sender.on('file_channel_open') 发文件通道打开
sender.on('file_channel_close') 发文件通道关闭
sender.on('file_channel_error') 发文件通道出错

Receiver:
receiver.on('file_channel_open') 发文件通道打开
receiver.on('file_channel_close') 发文件通道关闭
receiver.on('file_channel_error') 发文件通道出错

更改方法:

  • Stream 分为 本地流 LocalStream 和 远程流 RemoteStream , 本地流和远程流继承 抽象流 AbstractStream
  • 修改LocalStream构造函数
  • 修改Session构造函数
  • stream.stop方法只回收播放器,可以用play方法重新播放,回收本地流资源需使用LocalStream.release方法

更改事件:

LocalStream:
stream.on('access-accepted') -> stream.on('accepted')
stream.on('access-failed') -> stream.on('error')


Session:
session.on('send_error') -> session.on('error')
session.on('connect_error') -> session.on('error')
session.on('channel_error') -> session.on('error')

Sender:
sender.getReceiver() -> sender.getReceiverToken()
sender.attr -> sender.getAttr()
sender.on('file_sending_error') -> sender.on('error')
sender.on('send_error') -> sender.on('error')
sender.on('sender_connect_error') -> sender.on('error')
sender.on('dataChannel_error') -> sender.on('channel_error')
sender.on('dataChannel_close') -> sender.on('channel_close')
sender.on('dataChannel_open') -> sender.on('channel_open')

Receiver:
receiver.getSender() -> receiver.getSenderToken()
receiver.attr -> receiver.getAttr()
receiver.on('receiver_connect_error') -> receiver.on('error')
receiver.on('dataChannel_error') -> receiver.on('channel_error')
receiver.on('dataChannel_close') -> receiver.on('channel_close')
receiver.on('dataChannel_open') -> receiver.on('channel_open')

移除方法:

  • 移除 LocalStream.getCapture()

v0.3

增加 Relay 模式 (私有云用户内测中,目前公有云用户不可使用) 移除 RTCat.Detect 模块

修复以下 Bug

修复和Android端连接时,Android端无音视频问题 修复 Firefox 部分不兼容问题

0.2.8 修复stream.stop()方法的bug

0.2.7 修复只请求音频时,video placeholder的地址

0.2.6 修复只请求音频时视频被强制带上的bug

0.2.5 修复mute方法无效的bug

0.2.4 使用umd规范打包SDK,增加对AMD和CommonJS规范的支持

0.2.3 增加监听事件的once方法,监听的事件只触发一次

0.2.2 修复stream.play()方法只传width或height时,另一方为undefined的bug

相关资源