Socket
Socket
Sign inDemoInstall

rtc-core

Package Overview
Dependencies
Maintainers
2
Versions
28
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rtc-core - npm Package Compare versions

Comparing version 3.0.0 to 3.1.0

test/wait-connected.js

2

detect.js

@@ -10,3 +10,3 @@ /* jshint node: true */

/**
## rtc-core/detect
### `rtc-core/detect`

@@ -13,0 +13,0 @@ A browser detection helper for accessing prefix-free versions of the various

@@ -6,8 +6,8 @@ /* jshint node: true */

/**
# rtc-core
# rtc-core
The rtc-core package includes a number of core types and constants that
are used across the rtc.io suite.
The rtc-core package includes a number of core types and constants that
are used across the rtc.io suite.
**/
exports.detect = require('./detect');
exports.detect = require('./detect');
{
"name": "rtc-core",
"description": "Core definitions and functions for the rtc.io suite",
"version": "3.0.0",
"version": "3.1.0",
"dependencies": {

@@ -9,2 +9,3 @@ "detect-browser": "^1.0.0"

"devDependencies": {
"peerpair": "^1.0.0",
"tape": "^2",

@@ -11,0 +12,0 @@ "zuul": "^1"

@@ -9,6 +9,5 @@ # rtc-core

[![Build Status](https://img.shields.io/travis/rtc-io/rtc-core.svg?branch=master)](https://travis-ci.org/rtc-io/rtc-core)
![unstable](https://img.shields.io/badge/stability-unstable-yellowgreen.svg)
[![Build Status](https://img.shields.io/travis/rtc-io/rtc-core.svg?branch=master)](https://travis-ci.org/rtc-io/rtc-core) [![unstable](https://img.shields.io/badge/stability-unstable-yellowgreen.svg)](https://github.com/dominictarr/stability#unstable)
## rtc-core/detect
### `rtc-core/detect`

@@ -32,38 +31,16 @@ A browser detection helper for accessing prefix-free versions of the various

## rtc-core/match
### `rtc-core/reset`
```
match(browser, spec?, fn?) ==> Boolean
```
This is a simple, cross-browser method for resetting a media element
back to a initial state after having media attached.
The `match` helper is useful for customizing the behaviour of your WebRTC
application based on browser environment and also specific versions of
the browser (using a [semver](http://semver.org/) based spec).
### `rtc-core/wait-connected`
```js
var detect = require('rtc-core/detect');
var match = require('rtc-core/match');
`waitConnected(pc, callback)`
if (match('chrome', '>= 35')) {
console.log('matched >= chrome 35, actual version: ' + detect.version);
}
else if (match('chrome', '32 - 34')) {
console.log('matched chrome 32 - 34, actual version: ' + detect.version);
}
else if (match('chrome', '^31')) {
console.log('matched chrome 31, actual version: ' + detect.version)
}
else if (match('chrome')) {
console.log('matched chrome (any version), actual version: ' + detect.version);
}
else {
console.log('not running chrome, browser: ' + detect.browser + ', version: ' + detect.version);
}
```
A simple helper function that will monitor `iceconnectionstatechange` events
and wait until a connected `iceConnectionState` has been triggered (either
`connected` or `completed`). Once this state has been achieved the event
listener will be removed and a callback fired.
## rtc-core/reset
This is a simple, cross-browser method for resetting a media element
back to a initial state after having media attached.
## License(s)

@@ -70,0 +47,0 @@

@@ -5,3 +5,3 @@ /* jshint node: true */

/**
## rtc-core/reset
### `rtc-core/reset`

@@ -28,2 +28,2 @@ This is a simple, cross-browser method for resetting a media element

return el;
};
};
require('./detect');
require('./detect-browser');
require('./plugin');
require('./wait-connected');

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc