@signalwire/js
Advanced tools
Comparing version 1.3.0-cantina.29 to 1.3.0-cantina.30
@@ -73,3 +73,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
if (!sender) { | ||
return logger.info(`These is not a '${kind}' sender to stop.`); | ||
return logger.info(`There is not a '${kind}' sender to stop.`); | ||
} | ||
@@ -90,3 +90,3 @@ if (sender.track) { | ||
if (!sender) { | ||
return logger.info(`These is not a '${kind}' sender to restore.`); | ||
return logger.info(`There is not a '${kind}' sender to restore.`); | ||
} | ||
@@ -100,3 +100,3 @@ if (sender.track && sender.track.readyState !== 'ended') { | ||
const newTrack = stream.getTracks().find(t => t.kind === kind); | ||
sender.replaceTrack(newTrack); | ||
yield sender.replaceTrack(newTrack); | ||
this.options.localStream.addTrack(newTrack); | ||
@@ -103,0 +103,0 @@ } |
@@ -30,3 +30,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
import { objEmpty, isFunction } from '../util/helpers'; | ||
import { stopStream, setMediaElementSinkId, getUserMedia, getHostname } from '../util/webrtc'; | ||
import { stopStream, stopTrack, setMediaElementSinkId, getUserMedia, getHostname } from '../util/webrtc'; | ||
import laChannelHandler, { publicLiveArrayMethods } from './LaChannelHandler'; | ||
@@ -181,3 +181,3 @@ import chatChannelHandler, { publicChatMethods } from './ChatChannelHandler'; | ||
try { | ||
console.debug('updateDevices trying constraints', constraints); | ||
console.debug('updateDevices trying constraints', this.id, constraints); | ||
if (!Object.keys(constraints).length) { | ||
@@ -219,4 +219,3 @@ return console.warn('Invalid constraints:', constraints); | ||
console.debug('updateDevices stop old track and apply new one - '); | ||
track.stop(); | ||
track.dispatchEvent(new Event('ended')); | ||
stopTrack(track); | ||
this.options.localStream.removeTrack(track); | ||
@@ -246,2 +245,3 @@ } | ||
console.error('updateDevices', error); | ||
throw error; | ||
} | ||
@@ -248,0 +248,0 @@ }); |
import Relay from './src/SignalWire'; | ||
import Verto from './src/Verto'; | ||
import CantinaAuth from '../common/src/webrtc/CantinaAuth'; | ||
export declare const VERSION = "1.3.0-cantina.29"; | ||
export declare const VERSION = "1.3.0-cantina.30"; | ||
export { Relay, Verto, CantinaAuth }; | ||
@@ -6,0 +6,0 @@ export * from '../common/src/webrtc/deviceHelpers'; |
@@ -5,5 +5,5 @@ import Relay from './src/SignalWire'; | ||
import CantinaAuth from '../common/src/webrtc/CantinaAuth'; | ||
export const VERSION = '1.3.0-cantina.29'; | ||
export const VERSION = '1.3.0-cantina.30'; | ||
setAgentName(`JavaScript SDK/${VERSION}`); | ||
export { Relay, Verto, CantinaAuth }; | ||
export * from '../common/src/webrtc/deviceHelpers'; |
{ | ||
"name": "@signalwire/js", | ||
"version": "1.3.0-cantina.29", | ||
"version": "1.3.0-cantina.30", | ||
"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
389766