Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@signalwire/js

Package Overview
Dependencies
Maintainers
1
Versions
366
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@signalwire/js - npm Package Compare versions

Comparing version 1.3.0-alpha.9.5 to 1.3.0-alpha.9.6

3

dist/esm/common/src/webrtc/RTCPeer.js

@@ -11,3 +11,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

import logger from '../util/logger';
import { getUserMedia, getMediaConstraints, sdpStereoHack, sdpBitrateHack } from './helpers';
import { getUserMedia, getMediaConstraints, sdpStereoHack, sdpBitrateHack, sdpMediaOrderHack } from './helpers';
import { SwEvent } from '../util/constants';

@@ -384,2 +384,3 @@ import { PeerType, State } from './constants';

}
remoteDescription.sdp = sdpMediaOrderHack(remoteDescription.sdp, this.instance.localDescription.sdp);
const sessionDescr = sdpToJsonHack(remoteDescription);

@@ -386,0 +387,0 @@ logger.info('REMOTE SDP \n', `Type: ${remoteDescription.type}`, '\n\n', remoteDescription.sdp);

@@ -146,12 +146,28 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {

console.debug('updateDevices got stream', newStream);
if (!this.options.localStream) {
this.options.localStream = new MediaStream();
}
const { instance } = this.peer;
const tracks = newStream.getTracks();
console.debug('updateDevices with tracks', tracks);
for (let i = 0; i < tracks.length; i++) {
const newTrack = tracks[i];
console.debug('updateDevices trying =>', newTrack);
const sender = instance.getSenders().find(({ track }) => (track && track.kind === newTrack.kind));
if (sender) {
console.debug('updateDevices apply track: ', newTrack);
const transceiver = instance.getTransceivers().find(({ mid, sender, receiver }) => {
if (sender.track && sender.track.kind === newTrack.kind) {
console.debug('Found transceiver by sender');
return true;
}
if (receiver.track && receiver.track.kind === newTrack.kind) {
console.debug('Found transceiver by receiver');
return true;
}
if (mid === null) {
console.debug('Found disassociated transceiver');
return true;
}
return false;
});
if (transceiver && transceiver.sender) {
console.debug('updateDevices FOUND - replaceTrack on it and on localStream');
yield sender.replaceTrack(newTrack);
yield transceiver.sender.replaceTrack(newTrack);
this.options.localStream.addTrack(newTrack);

@@ -158,0 +174,0 @@ console.debug('updateDevices replaceTrack SUCCESS');

import Relay from './src/SignalWire';
import Verto from './src/Verto';
import CantinaAuth from '../common/src/webrtc/CantinaAuth';
export declare const VERSION = "1.3.0-alpha.9.5";
export declare const VERSION = "1.3.0-alpha.9.6";
export { Relay, Verto, CantinaAuth };
export * from '../common/src/util/interfaces';
export * from '../common/src/webrtc/interfaces';

@@ -5,4 +5,4 @@ import Relay from './src/SignalWire';

import CantinaAuth from '../common/src/webrtc/CantinaAuth';
export const VERSION = '1.3.0-alpha.9.5';
export const VERSION = '1.3.0-alpha.9.6';
setAgentName(`JavaScript SDK/${VERSION}`);
export { Relay, Verto, CantinaAuth };
{
"name": "@signalwire/js",
"version": "1.3.0-alpha.9.5",
"version": "1.3.0-alpha.9.6",
"description": "Relay SDK for JavaScript to connect to SignalWire.",

@@ -5,0 +5,0 @@ "author": "SignalWire Team <open.source@signalwire.com>",

Sorry, the diff of this file is too big to display

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