sdp-jingle-json
Advanced tools
Comparing version 0.3.5 to 0.3.6
@@ -121,3 +121,3 @@ exports.lines = function (sdp) { | ||
parsed.id = idpart.substr(0, sp); | ||
parsed.senders = idpart.substr(sp); | ||
parsed.senders = idpart.substr(sp + 1); | ||
} else { | ||
@@ -128,3 +128,3 @@ parsed.id = idpart; | ||
parsed.uri = parts.shift(); | ||
parsed.uri = parts.shift() || ''; | ||
@@ -142,3 +142,3 @@ return parsed; | ||
} else { | ||
parsed.subtype = parts.shift(); | ||
parsed.subtype = parts.shift() || ''; | ||
} | ||
@@ -145,0 +145,0 @@ parsed.parameters = parts; |
var parsers = require('./parsers'); | ||
var idCounter = Math.random(); | ||
exports._setIdCounter = function (counter) { | ||
idCounter = counter; | ||
}; | ||
@@ -5,0 +8,0 @@ exports.toSessionJSON = function (sdp, creator) { |
@@ -13,6 +13,6 @@ var senders = { | ||
exports.toSessionSDP = function (session, sid) { | ||
exports.toSessionSDP = function (session, sid, time) { | ||
var sdp = [ | ||
'v=0', | ||
'o=- ' + (sid || session.sid || Date.now()) + ' ' + Date.now() + ' IN IP4 0.0.0.0', | ||
'o=- ' + (sid || session.sid || Date.now()) + ' ' + (time || Date.now()) + ' IN IP4 0.0.0.0', | ||
's=-', | ||
@@ -19,0 +19,0 @@ 't=0 0' |
{ | ||
"name": "sdp-jingle-json", | ||
"version": "0.3.5", | ||
"version": "0.3.6", | ||
"description": "A parser/serializer for SDP to JSON. Useful for converting SDP to other formats like Jingle for WebRTC signalling", | ||
@@ -10,2 +10,3 @@ "main": "index.js", | ||
}, | ||
"bugs": "https://github.com/legastero/sdp-jingle-json/issues", | ||
"keywords": [ | ||
@@ -25,6 +26,30 @@ "sdp", | ||
"devDependencies": { | ||
"browserify": "2.35.1", | ||
"grunt": "0.4.1", | ||
"grunt-browserify": "1.2.11", | ||
"grunt-contrib-jshint": "0.7.1", | ||
"grunt-contrib-uglify": "0.2.7", | ||
"precommit-hook": "0.3.8", | ||
"uglify-js": "2.3.6", | ||
"browserify": "2.25.1" | ||
"tape": "2.1.0" | ||
}, | ||
"testling": { | ||
"files": [ | ||
"test/test.js" | ||
], | ||
"browsers": [ | ||
"ie/10..latest", | ||
"chrome/20..latest", | ||
"chrome/canary", | ||
"firefox/10..latest", | ||
"firefox/nightly", | ||
"opera/next", | ||
"safari/6..latest", | ||
"iphone/6..latest", | ||
"ipad/6..latest", | ||
"android-browser/4.2..latest" | ||
] | ||
}, | ||
"scripts": { | ||
"test": "node test/test.js" | ||
} | ||
} |
# SDP-Jingle-JSON | ||
**Convert SDP blobs to and from JSON** | ||
[![Build Status](https://travis-ci.org/legastero/sdp-jingle-json.png)](https://travis-ci.org/legastero/sdp-jingle-json) | ||
[![Dependency Status](https://david-dm.org/legastero/sdp-jingle-json.png)](https://david-dm.org/legastero/sdp-jingle-json) | ||
[![devDependency Status](https://david-dm.org/legastero/sdp-jingle-json/dev-status.png)](https://david-dm.org/legastero/sdp-jingle-json#info=devDependencies) | ||
[![Browser Support](https://ci.testling.com/legastero/sdp-jingle-json.png)](https://ci.testling.com/legastero/sdp-jingle-json) | ||
## What is this? | ||
@@ -25,6 +33,10 @@ | ||
Also suitable for use with browserify/CommonJS in the browser. | ||
## Building bundled/minified version (for AMD, etc) | ||
If you're not using browserify or you want AMD support use `sdp-jingle-json.bundle.js`. | ||
```sh | ||
$ grunt | ||
``` | ||
The bundled and minified files will be in the generated `build` directory. | ||
## How to use it | ||
@@ -44,2 +56,6 @@ | ||
## See it in action | ||
Open the `convert.html` file and enter in SDP or JSON to see how it converts back and forth. | ||
## Jingle JSON | ||
@@ -46,0 +62,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No bug tracker
MaintenancePackage does not have a linked bug tracker in package.json.
Found 1 instance in 1 package
41156
18
850
2
179
1
7