@signalwire/js
Advanced tools
Comparing version 1.3.0-cantina.20 to 1.3.0-cantina.21
@@ -180,2 +180,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
userRecordFile: variables.user_record_file || null, | ||
podcastMode: variables.podcast_mode === 'true', | ||
}; | ||
@@ -182,0 +183,0 @@ }; |
@@ -195,2 +195,3 @@ export interface CallOptions { | ||
userRecordFile: string; | ||
podcastMode: boolean; | ||
} | ||
@@ -197,0 +198,0 @@ export interface ILayout { |
@@ -13,2 +13,3 @@ var __rest = (this && this.__rest) || function (s, e) { | ||
import { ConferenceAction } from './constants'; | ||
import { mungeLayoutList } from './helpers'; | ||
export default function modChannelHandler(session, { data, eventChannel, eventSerno = null }) { | ||
@@ -20,4 +21,6 @@ const callIds = session.channelToCallIds.get(eventChannel) || []; | ||
if (data.responseData) { | ||
const tmp = JSON.stringify(data.responseData).replace(/IDS"/g, 'Ids"'); | ||
params = { action: ConferenceAction.LayoutList, eventChannel, eventSerno, layouts: JSON.parse(tmp) }; | ||
const normal = data.responseData.filter(({ type }) => type === 'layout'); | ||
const group = data.responseData.filter(({ type }) => type === 'layoutGroup'); | ||
const layouts = mungeLayoutList(normal, group); | ||
params = { action: ConferenceAction.LayoutList, eventChannel, eventSerno, layouts }; | ||
} | ||
@@ -24,0 +27,0 @@ break; |
@@ -28,2 +28,3 @@ import { PeerType } from './constants'; | ||
getDeviceLabel(kind: string): string; | ||
restartIceWithRelayOnly(): void; | ||
applyMediaConstraints(kind: string, constraints: MediaTrackConstraints): Promise<void>; | ||
@@ -30,0 +31,0 @@ private _getSenderByKind; |
@@ -144,2 +144,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
} | ||
restartIceWithRelayOnly() { | ||
try { | ||
const config = this.instance.getConfiguration(); | ||
if (config.iceTransportPolicy === 'relay') { | ||
return console.warn('RTCPeer already with iceTransportPolicy relay only'); | ||
} | ||
const newConfig = Object.assign(Object.assign({}, config), { iceTransportPolicy: 'relay' }); | ||
this.instance.setConfiguration(newConfig); | ||
this.instance.restartIce(); | ||
} | ||
catch (error) { | ||
logger.error('RTCPeer restartIce error', error); | ||
} | ||
} | ||
applyMediaConstraints(kind, constraints) { | ||
@@ -146,0 +160,0 @@ return __awaiter(this, void 0, void 0, function* () { |
@@ -133,2 +133,8 @@ import BrowserSession from '../BrowserSession'; | ||
toggleHold(): Promise<boolean | void>; | ||
disableOutboundAudio(): void; | ||
enableOutboundAudio(): void; | ||
toggleOutboundAudio(): void; | ||
disableOutboundVideo(): void; | ||
enableOutboundVideo(): void; | ||
toggleOutboundVideo(): void; | ||
muteAudio(participantId?: string): void; | ||
@@ -146,2 +152,3 @@ unmuteAudio(participantId?: string): void; | ||
sfuDefaultResolution(streamId: string, trackId: string): Promise<any>; | ||
doReinviteWithRelayOnly(): void; | ||
stopOutboundAudio(): void; | ||
@@ -148,0 +155,0 @@ restoreOutboundAudio(): void; |
@@ -308,2 +308,20 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
} | ||
disableOutboundAudio() { | ||
disableAudioTracks(this.options.localStream); | ||
} | ||
enableOutboundAudio() { | ||
enableAudioTracks(this.options.localStream); | ||
} | ||
toggleOutboundAudio() { | ||
toggleAudioTracks(this.options.localStream); | ||
} | ||
disableOutboundVideo() { | ||
disableVideoTracks(this.options.localStream); | ||
} | ||
enableOutboundVideo() { | ||
enableVideoTracks(this.options.localStream); | ||
} | ||
toggleOutboundVideo() { | ||
toggleVideoTracks(this.options.localStream); | ||
} | ||
muteAudio() { | ||
@@ -351,2 +369,7 @@ disableAudioTracks(this.options.localStream); | ||
} | ||
doReinviteWithRelayOnly() { | ||
if (this.peer) { | ||
this.peer.restartIceWithRelayOnly(); | ||
} | ||
} | ||
stopOutboundAudio() { | ||
@@ -353,0 +376,0 @@ if (this.peer) { |
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.20"; | ||
export declare const VERSION = "1.3.0-cantina.21"; | ||
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.20'; | ||
export const VERSION = '1.3.0-cantina.21'; | ||
setAgentName(`JavaScript SDK/${VERSION}`); | ||
export { Relay, Verto, CantinaAuth }; | ||
export * from '../common/src/webrtc/deviceHelpers'; |
{ | ||
"name": "@signalwire/js", | ||
"version": "1.3.0-cantina.20", | ||
"version": "1.3.0-cantina.21", | ||
"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
387594
5592