Gathering detailed insights and metrics for @twilio/webrtc
Gathering detailed insights and metrics for @twilio/webrtc
Gathering detailed insights and metrics for @twilio/webrtc
Gathering detailed insights and metrics for @twilio/webrtc
WebRTC-related APIs and shims used by twilio-video.js
npm install @twilio/webrtc
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
50 Stars
1,652 Commits
22 Forks
27 Watching
15 Branches
25 Contributors
Updated on 04 Oct 2024
JavaScript (99.34%)
Shell (0.66%)
Cumulative downloads
Total Downloads
Last day
-26.5%
1,672
Compared to previous day
Last week
-15.2%
9,963
Compared to previous week
Last month
10.1%
47,012
Compared to previous month
Last year
-43%
860,681
Compared to previous year
24
twilio-webrtc.js contains the various WebRTC shims used by twilio-video.js. It is not intended for general consumption.
npm install --save @twilio/webrtc
The following WebRTC API shims are available:
1const { 2 getStats, 3 getUserMedia, 4 MediaStream, 5 MediaStreamTrack, 6 RTCIceCandidate, 7 RTCPeerConnection, 8 RTCSessionDescription 9} = require('@twilio/webrtc');
getStats
resolves with normalized WebRTC statistics for the active ICE
candidate pair and each MediaStreamTrack
, local or remote, of a particular
RTCPeerConnection
.
1/** 2 * Get the statistics for a given RTCPeerConnection. 3 * @param {RTCPeerConnection} peerConnection 4 * @returns {Promise<StandardizedStatsResponse>} 5 */ 6function getStats(peerConnection) {}
NOTE: StandardizedStatsResponse
normalizes the different formats of the stats returned by RTCPeerConnection#getStats
in different
browsers. It does not conform to the W3C spec.
getUserMedia
accepts a MediaStreamConstraints
object and resolves
with a MediaStream
. By default, it requests both audio and video.
1/** 2 * Request media from the user. 3 * @param {MediaStreamConstraints} [constraints={audio: true, video: true}] 4 * @returns {Promise<MediaStream>} 5 */ 6function getUserMedia(constraints) {}
RTCPeerConnection
abstracts away some of the browser-specific implementations
of WebRTC, and implements some WebRTC features that are not present in some
browsers.
MediaStreamTrack
changes, the
browser treats this as a removal of the existing MediaStreamTrack
and the addition of a new
MediaStreamTrack
.maxPacketLifeTime
on RTCDataChannels by
remapping the legacy property maxRetransmitTime
to maxPacketLifeTime
. See
this bug for
more information.removeTrack
with an RTCRtpSender
that is not created by the RTCPeerConnection
in question throws an exception.setLocalDescription
and setRemoteDescription
in
have-local-offer
and have-remote-offer
signaling states respectively.createOffer
in signaling state have-local-offer
.RTCPeerConnection.prototype.peerIdentity
is accessed.MediaStreamTrack
changes, the
browser treats this as a removal of the existing MediaStreamTrack
and the addition of a new
MediaStreamTrack
.addTrack
method does not return the RTCRtpSender
associated with the added track.RTCSessionDescription
abstracts away some of the browser-specific implementations
of WebRTC for Firefox and Safari, and works around this bug
in Chrome, where the native RTCSessionDescription
constructor throws when its argument is
{ type: 'rollback'}
.
MediaStream
, MediaStreamTrack
, and RTCIceCandidate
abstracts away their
browser-prefixed counterparts for earlier browser versions.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 11/30 approved changesets -- score normalized to 3
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Score
Last Scanned on 2024-11-18
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More