Socket
Socket
Sign inDemoInstall

node-datachannel

Package Overview
Dependencies
Maintainers
1
Versions
68
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-datachannel - npm Package Compare versions

Comparing version 0.2.0 to 0.2.1

examples/media/README.md

4

CMakeLists.txt
cmake_minimum_required(VERSION 3.15)
cmake_policy(SET CMP0091 NEW)
project(node_datachannel VERSION 0.2.0)
project(node_datachannel VERSION 0.2.1)

@@ -30,3 +30,3 @@ include_directories(${CMAKE_JS_INC})

GIT_REPOSITORY https://github.com/paullouisageneau/libdatachannel.git
GIT_TAG "v0.16.2"
GIT_TAG "v0.16.4"
)

@@ -33,0 +33,0 @@

@@ -22,11 +22,12 @@ const nodeDataChannel = require('../../lib/index');

peerConnection.onGatheringStateChange((state) => {
console.log('GatheringState: ', state);
// console.log('GatheringState: ', state);
if(state == 'complete'){
let desc = peerConnection.localDescription();
console.log('');
console.log('## Please copy the offer below to the web page:');
console.log(JSON.stringify(desc));
console.log('\n\n');
console.log('Expect RTP video traffic on localhost:5000');
rl.question('Please copy/paste the answer provided by the browser: \n', (sdp) => {
console.log('## Expect RTP video traffic on localhost:5000');
rl.question('## Please copy/paste the answer provided by the browser: \n', (sdp) => {
let sdpObj = JSON.parse(sdp);

@@ -44,3 +45,3 @@ peerConnection.setRemoteDescription(sdpObj.sdp, sdpObj.type);

video.setBitrate(3000);
console.log(video.mediaType);
let track = peerConnection.addTrack(video);

@@ -47,0 +48,0 @@ let session = new nodeDataChannel.RtcpReceivingSession();

# Examples
## client-server
# client-server
* You can use client-server example project to test WebRTC Data Channels with WebSocket signaling.

@@ -8,3 +8,3 @@ * It uses same logic of [libdatachannel/examples/client](https://github.com/paullouisageneau/libdatachannel/tree/master/examples) project.

### How to Use?
## How to Use?
* Prepare Project

@@ -23,23 +23,1 @@ * cd examples/client-server

> You can also use [libdatachannel/examples/client](https://github.com/paullouisageneau/libdatachannel/tree/master/examples) project's client & signaling server
## media
### Example Webcam from Browser to Port 5000
This is an example copy/paste demo to send your webcam from your browser and out port 5000 through the demo application.
### How to use
Open main.html in your browser (you must open it either as HTTPS or as a domain of http://localhost).
Start the application and copy it's offer into the text box of the web page.
Copy the answer of the webpage back into the application.
You will now see RTP traffic on `localhost:5000` of the computer that the application is running on.
Use the following gstreamer demo pipeline to display the traffic
(you might need to wave your hand in front of your camera to force an I-frame).
```
$ gst-launch-1.0 udpsrc address=127.0.0.1 port=5000 caps="application/x-rtp" ! queue ! rtph264depay ! video/x-h264,stream-format=byte-stream ! queue ! avdec_h264 ! queue ! autovideosink
```
{
"name": "node-datachannel",
"version": "0.2.0",
"version": "0.2.1",
"description": "libdatachannel node bindings",

@@ -42,3 +42,3 @@ "main": "lib/index.js",

],
"license": "GPL-2.0-or-later",
"license": "LGPL",
"gypfile": true,

@@ -45,0 +45,0 @@ "bugs": {

@@ -259,6 +259,2 @@ # Easy to use WebRTC data channels and media transport

**availableAmount: () => Number**
Get available data amount
**bufferedAmount: () => Number**

@@ -288,6 +284,2 @@

**onAvailable: (cb: () => void) => void**
Available callback
**onBufferedAmountLow: (cb: () => void) => void**

@@ -294,0 +286,0 @@

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