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

@daily-co/daily-vcs-web

Package Overview
Dependencies
Maintainers
21
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@daily-co/daily-vcs-web - npm Package Compare versions

Comparing version 0.0.1-alpha.2 to 0.0.1-alpha.3

55

dist/index.cjs.js

@@ -251,37 +251,28 @@ 'use strict';

const participants = Object.values(this.callObject.participants());
const videos = participants
.filter((p) => {
var _a, _b, _c, _d;
return this.participantIds.length > 0
? this.participantIds.includes(p.session_id) &&
!isTrackOff((_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.state)
: !isTrackOff((_d = (_c = p === null || p === void 0 ? void 0 : p.tracks) === null || _c === void 0 ? void 0 : _c.video) === null || _d === void 0 ? void 0 : _d.state);
})
const filteredParticipants = this.participantIds.length > 0
? participants.filter((p) => this.participantIds.includes(p.session_id))
: participants;
const videos = filteredParticipants
.filter((p) => { var _a, _b; return !isTrackOff((_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.state); })
.map((p) => {
var _a, _b;
var _a, _b, _c, _d, _e, _f;
return ({
active: true,
id: p.session_id,
id: (_d = (_c = (_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.track) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : '',
sessionId: p.session_id,
displayName: p.user_name || 'Guest',
track: (_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.persistentTrack,
track: (_f = (_e = p === null || p === void 0 ? void 0 : p.tracks) === null || _e === void 0 ? void 0 : _e.video) === null || _f === void 0 ? void 0 : _f.persistentTrack,
type: 'camera',
});
});
const screens = participants
.filter((p) => {
var _a, _b, _c, _d;
return this.participantIds.length > 0
? this.participantIds.includes(p.session_id) &&
!isTrackOff((_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.screenVideo) === null || _b === void 0 ? void 0 : _b.state)
: !isTrackOff((_d = (_c = p === null || p === void 0 ? void 0 : p.tracks) === null || _c === void 0 ? void 0 : _c.screenVideo) === null || _d === void 0 ? void 0 : _d.state);
})
const screens = filteredParticipants
.filter((p) => { var _a, _b; return !isTrackOff((_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.screenVideo) === null || _b === void 0 ? void 0 : _b.state); })
.map((p) => {
var _a, _b;
var _a, _b, _c, _d, _e, _f;
return ({
active: true,
id: p.session_id,
id: (_d = (_c = (_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.screenVideo) === null || _b === void 0 ? void 0 : _b.track) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : '',
sessionId: p.session_id,
displayName: '',
track: (_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.screenVideo) === null || _b === void 0 ? void 0 : _b.persistentTrack,
track: (_f = (_e = p === null || p === void 0 ? void 0 : p.tracks) === null || _e === void 0 ? void 0 : _e.screenVideo) === null || _f === void 0 ? void 0 : _f.persistentTrack,
type: 'screenshare',

@@ -291,2 +282,20 @@ });

this.applyTracks([...videos, ...screens]);
const peers = filteredParticipants.map((p) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
return ({
id: p.session_id,
displayName: p.user_name || 'Guest',
video: {
id: (_d = (_c = (_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.track) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : '',
paused: isTrackOff((_f = (_e = p === null || p === void 0 ? void 0 : p.tracks) === null || _e === void 0 ? void 0 : _e.video) === null || _f === void 0 ? void 0 : _f.state),
},
audio: {},
screenshareVideo: {
id: (_k = (_j = (_h = (_g = p === null || p === void 0 ? void 0 : p.tracks) === null || _g === void 0 ? void 0 : _g.screenVideo) === null || _h === void 0 ? void 0 : _h.track) === null || _j === void 0 ? void 0 : _j.id) !== null && _k !== void 0 ? _k : '',
paused: isTrackOff((_m = (_l = p === null || p === void 0 ? void 0 : p.tracks) === null || _l === void 0 ? void 0 : _l.screenVideo) === null || _m === void 0 ? void 0 : _m.state),
},
screenshareAudio: {},
});
});
this.vcsApi.setRoomPeers(peers);
}

@@ -476,3 +485,3 @@ setupEventListeners() {

active: true,
id: `videotrack_${video.track.id}`,
id: video.track.id,
element: videoEl,

@@ -479,0 +488,0 @@ track: video.track,

@@ -249,37 +249,28 @@ /******************************************************************************

const participants = Object.values(this.callObject.participants());
const videos = participants
.filter((p) => {
var _a, _b, _c, _d;
return this.participantIds.length > 0
? this.participantIds.includes(p.session_id) &&
!isTrackOff((_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.state)
: !isTrackOff((_d = (_c = p === null || p === void 0 ? void 0 : p.tracks) === null || _c === void 0 ? void 0 : _c.video) === null || _d === void 0 ? void 0 : _d.state);
})
const filteredParticipants = this.participantIds.length > 0
? participants.filter((p) => this.participantIds.includes(p.session_id))
: participants;
const videos = filteredParticipants
.filter((p) => { var _a, _b; return !isTrackOff((_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.state); })
.map((p) => {
var _a, _b;
var _a, _b, _c, _d, _e, _f;
return ({
active: true,
id: p.session_id,
id: (_d = (_c = (_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.track) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : '',
sessionId: p.session_id,
displayName: p.user_name || 'Guest',
track: (_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.persistentTrack,
track: (_f = (_e = p === null || p === void 0 ? void 0 : p.tracks) === null || _e === void 0 ? void 0 : _e.video) === null || _f === void 0 ? void 0 : _f.persistentTrack,
type: 'camera',
});
});
const screens = participants
.filter((p) => {
var _a, _b, _c, _d;
return this.participantIds.length > 0
? this.participantIds.includes(p.session_id) &&
!isTrackOff((_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.screenVideo) === null || _b === void 0 ? void 0 : _b.state)
: !isTrackOff((_d = (_c = p === null || p === void 0 ? void 0 : p.tracks) === null || _c === void 0 ? void 0 : _c.screenVideo) === null || _d === void 0 ? void 0 : _d.state);
})
const screens = filteredParticipants
.filter((p) => { var _a, _b; return !isTrackOff((_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.screenVideo) === null || _b === void 0 ? void 0 : _b.state); })
.map((p) => {
var _a, _b;
var _a, _b, _c, _d, _e, _f;
return ({
active: true,
id: p.session_id,
id: (_d = (_c = (_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.screenVideo) === null || _b === void 0 ? void 0 : _b.track) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : '',
sessionId: p.session_id,
displayName: '',
track: (_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.screenVideo) === null || _b === void 0 ? void 0 : _b.persistentTrack,
track: (_f = (_e = p === null || p === void 0 ? void 0 : p.tracks) === null || _e === void 0 ? void 0 : _e.screenVideo) === null || _f === void 0 ? void 0 : _f.persistentTrack,
type: 'screenshare',

@@ -289,2 +280,20 @@ });

this.applyTracks([...videos, ...screens]);
const peers = filteredParticipants.map((p) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
return ({
id: p.session_id,
displayName: p.user_name || 'Guest',
video: {
id: (_d = (_c = (_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.track) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : '',
paused: isTrackOff((_f = (_e = p === null || p === void 0 ? void 0 : p.tracks) === null || _e === void 0 ? void 0 : _e.video) === null || _f === void 0 ? void 0 : _f.state),
},
audio: {},
screenshareVideo: {
id: (_k = (_j = (_h = (_g = p === null || p === void 0 ? void 0 : p.tracks) === null || _g === void 0 ? void 0 : _g.screenVideo) === null || _h === void 0 ? void 0 : _h.track) === null || _j === void 0 ? void 0 : _j.id) !== null && _k !== void 0 ? _k : '',
paused: isTrackOff((_m = (_l = p === null || p === void 0 ? void 0 : p.tracks) === null || _l === void 0 ? void 0 : _l.screenVideo) === null || _m === void 0 ? void 0 : _m.state),
},
screenshareAudio: {},
});
});
this.vcsApi.setRoomPeers(peers);
}

@@ -474,3 +483,3 @@ setupEventListeners() {

active: true,
id: `videotrack_${video.track.id}`,
id: video.track.id,
element: videoEl,

@@ -477,0 +486,0 @@ track: video.track,

@@ -255,37 +255,28 @@ (function (global, factory) {

const participants = Object.values(this.callObject.participants());
const videos = participants
.filter((p) => {
var _a, _b, _c, _d;
return this.participantIds.length > 0
? this.participantIds.includes(p.session_id) &&
!isTrackOff((_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.state)
: !isTrackOff((_d = (_c = p === null || p === void 0 ? void 0 : p.tracks) === null || _c === void 0 ? void 0 : _c.video) === null || _d === void 0 ? void 0 : _d.state);
})
const filteredParticipants = this.participantIds.length > 0
? participants.filter((p) => this.participantIds.includes(p.session_id))
: participants;
const videos = filteredParticipants
.filter((p) => { var _a, _b; return !isTrackOff((_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.state); })
.map((p) => {
var _a, _b;
var _a, _b, _c, _d, _e, _f;
return ({
active: true,
id: p.session_id,
id: (_d = (_c = (_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.track) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : '',
sessionId: p.session_id,
displayName: p.user_name || 'Guest',
track: (_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.persistentTrack,
track: (_f = (_e = p === null || p === void 0 ? void 0 : p.tracks) === null || _e === void 0 ? void 0 : _e.video) === null || _f === void 0 ? void 0 : _f.persistentTrack,
type: 'camera',
});
});
const screens = participants
.filter((p) => {
var _a, _b, _c, _d;
return this.participantIds.length > 0
? this.participantIds.includes(p.session_id) &&
!isTrackOff((_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.screenVideo) === null || _b === void 0 ? void 0 : _b.state)
: !isTrackOff((_d = (_c = p === null || p === void 0 ? void 0 : p.tracks) === null || _c === void 0 ? void 0 : _c.screenVideo) === null || _d === void 0 ? void 0 : _d.state);
})
const screens = filteredParticipants
.filter((p) => { var _a, _b; return !isTrackOff((_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.screenVideo) === null || _b === void 0 ? void 0 : _b.state); })
.map((p) => {
var _a, _b;
var _a, _b, _c, _d, _e, _f;
return ({
active: true,
id: p.session_id,
id: (_d = (_c = (_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.screenVideo) === null || _b === void 0 ? void 0 : _b.track) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : '',
sessionId: p.session_id,
displayName: '',
track: (_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.screenVideo) === null || _b === void 0 ? void 0 : _b.persistentTrack,
track: (_f = (_e = p === null || p === void 0 ? void 0 : p.tracks) === null || _e === void 0 ? void 0 : _e.screenVideo) === null || _f === void 0 ? void 0 : _f.persistentTrack,
type: 'screenshare',

@@ -295,2 +286,20 @@ });

this.applyTracks([...videos, ...screens]);
const peers = filteredParticipants.map((p) => {
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
return ({
id: p.session_id,
displayName: p.user_name || 'Guest',
video: {
id: (_d = (_c = (_b = (_a = p === null || p === void 0 ? void 0 : p.tracks) === null || _a === void 0 ? void 0 : _a.video) === null || _b === void 0 ? void 0 : _b.track) === null || _c === void 0 ? void 0 : _c.id) !== null && _d !== void 0 ? _d : '',
paused: isTrackOff((_f = (_e = p === null || p === void 0 ? void 0 : p.tracks) === null || _e === void 0 ? void 0 : _e.video) === null || _f === void 0 ? void 0 : _f.state),
},
audio: {},
screenshareVideo: {
id: (_k = (_j = (_h = (_g = p === null || p === void 0 ? void 0 : p.tracks) === null || _g === void 0 ? void 0 : _g.screenVideo) === null || _h === void 0 ? void 0 : _h.track) === null || _j === void 0 ? void 0 : _j.id) !== null && _k !== void 0 ? _k : '',
paused: isTrackOff((_m = (_l = p === null || p === void 0 ? void 0 : p.tracks) === null || _l === void 0 ? void 0 : _l.screenVideo) === null || _m === void 0 ? void 0 : _m.state),
},
screenshareAudio: {},
});
});
this.vcsApi.setRoomPeers(peers);
}

@@ -480,3 +489,3 @@ setupEventListeners() {

active: true,
id: `videotrack_${video.track.id}`,
id: video.track.id,
element: videoEl,

@@ -483,0 +492,0 @@ track: video.track,

@@ -31,2 +31,16 @@ export type AssetType = 'font' | 'image';

}
export interface VCSPeer {
id: string;
displayName: string;
video: {
id: string;
paused: boolean;
};
audio: {};
screenshareVideo: {
id: string;
paused: boolean;
};
screenshareAudio: {};
}
export interface VCSApi {

@@ -38,2 +52,3 @@ setActiveVideoInputSlots(slots: (ActiveVideoSlot | boolean)[]): void;

updateImageSources(sources: VCSSources): void;
setRoomPeers(peers: VCSPeer[]): void;
}

@@ -40,0 +55,0 @@ export interface VCSComposition {

{
"name": "@daily-co/daily-vcs-web",
"description": "This package enables developers to render a VCSComposition inside a given DOM element in the browser.",
"version": "0.0.1-alpha.2",
"version": "0.0.1-alpha.3",
"license": "BSD-2-Clause",

@@ -6,0 +6,0 @@ "main": "dist/index.cjs.js",

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