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

@signalwire/js

Package Overview
Dependencies
Maintainers
0
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 3.28.0-dev.202410111319.91dfb3a.0 to 3.28.0-dev.202410161307.fca4c09.0

1

dist/core/src/memberPosition/workers.d.ts

@@ -6,3 +6,2 @@ import { SagaIterator, SDKWorker, SDKWorkerParams, VideoMemberUpdatedEventParams } from '..';

}): Generator<SagaIterator<any>, void, unknown>;
export declare const MEMBER_POSITION_COMPOUND_EVENTS: Map<any, any>;
export declare const memberPositionWorker: SDKWorker<any>;

@@ -9,0 +8,0 @@ declare type MemberEventParamsList = Map<string, VideoMemberUpdatedEventParams>;

2

dist/core/src/utils/interfaces.d.ts

@@ -181,3 +181,3 @@ /// <reference types="node" />

*/
export declare type CallFabricMethod = 'call.mute' | 'call.unmute' | 'call.deaf' | 'call.undeaf' | 'call.layout.list' | 'call.member.list' | 'call.member.remove' | 'call.layout.set' | 'call.microphone.volume.set' | 'call.microphone.sensitivity.set' | 'call.lock' | 'call.unlock' | 'call.raisehand' | 'call.lowerhand';
export declare type CallFabricMethod = 'call.mute' | 'call.unmute' | 'call.deaf' | 'call.undeaf' | 'call.layout.list' | 'call.member.list' | 'call.member.remove' | 'call.member.position.set' | 'call.layout.set' | 'call.microphone.volume.set' | 'call.microphone.sensitivity.set' | 'call.lock' | 'call.unlock' | 'call.raisehand' | 'call.lowerhand';
export interface WebSocketClient {

@@ -184,0 +184,0 @@ addEventListener: WebSocket['addEventListener'];

@@ -1,2 +0,2 @@

import { BaseComponentOptions, BaseRPCResult, VideoMemberEntity, Rooms, RoomSessionMember, VideoLayoutChangedEventParams } from '@signalwire/core';
import { BaseComponentOptions, BaseRPCResult, VideoMemberEntity, Rooms, RoomSessionMember, VideoLayoutChangedEventParams, VideoPosition } from '@signalwire/core';
import { BaseRoomSession, RoomSessionConnection } from '../BaseRoomSession';

@@ -21,5 +21,7 @@ import { MemberCommandWithVolumeParams, MemberCommandWithValueParams } from '../video';

get currentLayout(): import("@signalwire/core").InternalVideoLayout;
get currentPosition(): VideoPosition | undefined;
private executeAction;
protected initWorker(): void;
start(): Promise<void>;
/** @internal */
join(): Promise<BaseRoomSession<this>>;

@@ -46,2 +48,3 @@ /** @internal */

setInputSensitivity(params: MemberCommandWithValueParams): Promise<BaseRPCResult>;
setPositions(params: Rooms.SetPositionsParams): Promise<unknown>;
lock(): Promise<BaseRPCResult>;

@@ -48,0 +51,0 @@ unlock(): Promise<BaseRPCResult>;

@@ -1,2 +0,2 @@

import { VideoLayoutChangedEventParams } from '@signalwire/core';
import { VideoLayoutChangedEventParams, VideoPosition } from '@signalwire/core';
export interface CallFabricRoomSessionConnectionContract {

@@ -6,4 +6,8 @@ /**

*/
currentLayout: VideoLayoutChangedEventParams['layout'] | undefined;
currentLayout: VideoLayoutChangedEventParams['layout'];
/**
* The current position of the member returned from the `layout.changed` event
*/
currentPosition: VideoPosition;
/**
* Starts the call via the WebRTC connection

@@ -10,0 +14,0 @@ *

@@ -70,3 +70,3 @@ import { EventEmitter } from '@signalwire/core';

private _setupRTCPeerConnection;
start(): Promise<unknown>;
start(offering?: boolean): Promise<unknown>;
detachAndStop(): void;

@@ -73,0 +73,0 @@ stop(): void;

import { ConnectionOptions } from './interfaces';
export declare const getUserMedia: (constraints: MediaStreamConstraints) => Promise<MediaStream> | undefined;
export declare const getMediaConstraints: (options: ConnectionOptions, remoteSDP?: string) => Promise<MediaStreamConstraints>;
export declare const getMediaConstraints: (options: ConnectionOptions) => Promise<MediaStreamConstraints>;
interface FilterIceServersOptions {

@@ -5,0 +5,0 @@ disableUdpIceServers?: boolean;

@@ -6,3 +6,3 @@ {

"license": "MIT",
"version": "3.28.0-dev.202410111319.91dfb3a.0",
"version": "3.28.0-dev.202410161307.fca4c09.0",
"main": "dist/index.js",

@@ -43,4 +43,4 @@ "module": "dist/index.esm.js",

"dependencies": {
"@signalwire/core": "4.2.0-dev.202410111319.91dfb3a.0",
"@signalwire/webrtc": "3.12.2-dev.202410111319.91dfb3a.0",
"@signalwire/core": "4.2.0-dev.202410161307.fca4c09.0",
"@signalwire/webrtc": "3.12.2-dev.202410161307.fca4c09.0",
"jwt-decode": "^3.1.2"

@@ -47,0 +47,0 @@ },

@@ -13,2 +13,3 @@ import {

VideoLayoutChangedEventParams,
VideoPosition,
} from '@signalwire/core'

@@ -39,2 +40,8 @@ import {

interface RequestMemberParams {
node_id: string
member_id: string
call_id: string
}
type CallFabricBaseRoomSession = Omit<

@@ -95,2 +102,8 @@ BaseRoomSession<CallFabricRoomSession>,

get currentPosition() {
return this._lastLayoutEvent?.layout.layers.find(
(layer) => layer.member_id === this.memberId
)?.position
}
private executeAction<

@@ -166,3 +179,4 @@ InputType,

override async join() {
/** @internal */
public override async join() {
if (this.options.attach) {

@@ -326,2 +340,49 @@ this.options.prevCallId =

public setPositions(params: Rooms.SetPositionsParams) {
const positions = params.positions
if (positions && !Object.keys(positions).length) {
throw new Error('Invalid positions')
}
const targets: {
target: RequestMemberParams
position: VideoPosition
}[] = []
Object.entries(positions).forEach(([key, value]) => {
const targetMember =
key === 'self'
? this.member
: this.instanceMap.get<RoomSessionMember>(key)
if (targetMember) {
targets.push({
target: {
member_id: targetMember.id,
call_id: targetMember.callId!,
node_id: targetMember.nodeId!,
},
position: value,
})
}
})
if (!targets.length) {
throw new Error('Invalid targets')
}
return this.execute({
method: 'call.member.position.set',
params: {
self: {
member_id: this.selfMember?.id,
call_id: this.selfMember?.callId,
node_id: this.selfMember?.nodeId,
},
targets,
},
})
}
public lock() {

@@ -328,0 +389,0 @@ return this.executeAction<BaseRPCResult>({

@@ -77,13 +77,17 @@ import {

case 'member.updated':
case 'member.talking':
{
const updatedAction = {
...action,
payload: {
...action.payload,
id: action.payload.member_id,
case 'member.talking': {
const updatedAction = {
...action,
payload: {
...action.payload,
member: {
...action.payload.member,
id: action.payload.member.member_id,
},
type: `video.${type}` as VideoMemberEventNames,
}
},
type: `video.${type}` as VideoMemberEventNames,
}
// The "member.updated" event is handled by the @memberPositionWorker
if (type !== 'member.updated') {
yield sagaEffects.fork(videoMemberWorker, {

@@ -93,19 +97,19 @@ action: updatedAction,

})
}
yield sagaEffects.put(swEventChannel, updatedAction)
}
yield sagaEffects.put(swEventChannel, updatedAction)
break
case 'layout.changed':
{
// Upsert the layout event which is needed for rootElement
cfRoomSession.lastLayoutEvent = action.payload
const updatedAction = {
...action,
type: `video.${type}` as 'video.layout.changed',
}
// TODO stop send layout events to legacy workers
yield sagaEffects.put(swEventChannel, updatedAction)
cfRoomSession.emit(type, payload)
}
case 'layout.changed': {
// Upsert the layout event which is needed for rootElement
cfRoomSession.lastLayoutEvent = action.payload
const updatedAction = {
...action,
type: `video.${type}` as 'video.layout.changed',
}
// TODO stop send layout events to legacy workers
yield sagaEffects.put(swEventChannel, updatedAction)
cfRoomSession.emit(type, payload)
break
}
case 'member.demoted':

@@ -112,0 +116,0 @@ case 'member.promoted':

@@ -1,2 +0,2 @@

import { VideoLayoutChangedEventParams } from '@signalwire/core'
import { VideoLayoutChangedEventParams, VideoPosition } from '@signalwire/core'

@@ -7,4 +7,8 @@ export interface CallFabricRoomSessionConnectionContract {

*/
currentLayout: VideoLayoutChangedEventParams['layout'] | undefined
currentLayout: VideoLayoutChangedEventParams['layout']
/**
* The current position of the member returned from the `layout.changed` event
*/
currentPosition: VideoPosition
/**
* Starts the call via the WebRTC connection

@@ -11,0 +15,0 @@ *

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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