Installations
npm install webrtc-adapter-test
Releases
Unable to fetch releases
Developer
Developer Guide
Module System
CommonJS
Min. Node Version
Typescript Support
No
Node Version
4.2.1
NPM Version
3.3.9
Statistics
1,001 Stars
3,069 Commits
279 Forks
49 Watching
4 Branches
2 Contributors
Updated on 27 Nov 2024
Bundle Size
24.78 kB
Minified
7.00 kB
Minified + Gzipped
Languages
JavaScript (99.92%)
HTML (0.08%)
Total Downloads
Cumulative downloads
Total Downloads
348,116
Last day
-26.6%
475
Compared to previous day
Last week
75.2%
4,542
Compared to previous week
Last month
139.6%
11,886
Compared to previous month
Last year
318.1%
61,314
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
WebRTC adapter
adapter.js is a shim to insulate apps from spec changes and prefix differences in WebRTC. The prefix differences are mostly gone these days but differences in behaviour between browsers remain.
This repository used to be part of the WebRTC organisation on github but moved. We aim to keep the old repository updated with new releases.
Install
NPM
1npm install webrtc-adapter
Bower
1bower install webrtc-adapter
Usage
Javascript
Just import adapter:
import adapter from 'webrtc-adapter';
No further action is required. You might want to use adapters browser detection which detects which webrtc quirks are required. You can look at
adapter.browserDetails.browser
for webrtc engine detection (which will for example detect Opera or the Chromium based Edge as 'chrome') and
adapter.browserDetails.version
for the version according to the user-agent string.
NPM
Copy to desired location in your src tree or use a minify/vulcanize tool (node_modules is usually not published with the code). See webrtc/samples repo as an example on how you can do this.
Prebuilt releases
Web
In the gh-pages branch prebuilt ready to use files can be downloaded/linked directly. Latest version can be found at https://webrtc.github.io/adapter/adapter-latest.js. Specific versions can be found at https://webrtc.github.io/adapter/adapter-N.N.N.js, e.g. https://webrtc.github.io/adapter/adapter-1.0.2.js.
Bower
You will find adapter.js
in bower_components/webrtc-adapter/
.
NPM
In node_modules/webrtc-adapter/out/ folder you will find 4 files:
adapter.js
- includes all the shims and is visible in the browser under the globaladapter
object (window.adapter).adapter_no_global.js
- same asadapter.js
but is not exposed/visible in the browser (you cannot call/interact with the shims in the browser).
Include the file that suits your need in your project.
Development
Head over to test/README.md and get started developing.
Publish a new version
- Go to the adapter repository root directory
- Make sure your repository is clean, i.e. no untracked files etc. Also check that you are on the master branch and have pulled the latest changes.
- Depending on the impact of the release, either use
patch
,minor
ormajor
in place of<version>
. Runnpm version <version> -m 'bump to %s'
and type in your password lots of times (setting up credential caching is probably a good idea). - Create and merge the PR if green in the GitHub web ui
- Go to the releases tab in the GitHub web ui and edit the tag.
- Add a summary of the recent commits in the tag summary and a link to the diff between the previous and current version in the description, example.
- Go back to your checkout and run
git pull
- Run
npm publish
(you need access to the webrtc-adapter npmjs package). For big changes, consider using a tag version such asnext
and then change the dist-tag after testing. - Done! There should now be a new release published to NPM and the gh-pages branch.
Note: Currently only tested on Linux, not sure about Mac but will definitely not work on Windows.
Publish a hotfix patch versions
In some cases it may be necessary to do a patch version while there are significant changes changes on the master branch. To make a patch release,
- checkout the latest git tag using
git checkout tags/vMajor.minor.patch
. - checkout a new branch, using a name such as patchrelease-major-minor-patch.
- cherry-pick the fixes using
git cherry-pick some-commit-hash
. - run
npm version patch
. This will create a new patch version and publish it on github. - check out
origin/bumpVersion
branch and publish the new version usingnpm publish
. - the branch can now safely be deleted. It is not necessary to merge it into the main branch since it only contains cherry-picked commits.
No vulnerabilities found.
Reason
no dangerous workflow patterns detected
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
- Info: project has a license file: LICENSE.md:0
- Info: FSF or OSI recognized license: BSD 3-Clause "New" or "Revised" License: LICENSE.md:0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: no topLevel permission defined: .github/workflows/e2e-tests.yaml:1
- Warn: no topLevel permission defined: .github/workflows/lint-and-unit-tests.yml:1
- Info: no jobLevel write permissions found
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e-tests.yaml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/webrtc/adapter/e2e-tests.yaml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/e2e-tests.yaml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/webrtc/adapter/e2e-tests.yaml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint-and-unit-tests.yml:9: update your workflow using https://app.stepsecurity.io/secureworkflow/webrtc/adapter/lint-and-unit-tests.yml/master?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint-and-unit-tests.yml:10: update your workflow using https://app.stepsecurity.io/secureworkflow/webrtc/adapter/lint-and-unit-tests.yml/master?enable=pin
- Warn: npmCommand not pinned by hash: .github/workflows/e2e-tests.yaml:21
- Warn: npmCommand not pinned by hash: .github/workflows/lint-and-unit-tests.yml:12
- Info: 0 out of 4 GitHub-owned GitHubAction dependencies pinned
- Info: 0 out of 2 npmCommand dependencies pinned
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Reason
security policy file not detected
Details
- Warn: no security policy file detected
- Warn: no security file to analyze
- Warn: no security file to analyze
- Warn: no security file to analyze
Reason
branch protection not enabled on development/release branches
Details
- Warn: branch protection not enabled for branch 'master'
Score
3.4
/10
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 MoreOther packages similar to webrtc-adapter-test
webrtc-adapter
A shim to insulate apps from WebRTC spec changes and browser prefix differences
amazon-kinesis-video-streams-webrtc
Amazon Kinesis Video Streams WebRTC SDK for JavaScript.
vinyl
Virtual file format.
rtcpeerconnection-shim
An implementation of the RTCPeerConnection API ontop of ORTC