New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@daily-co/daily-js

Package Overview
Dependencies
Maintainers
11
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@daily-co/daily-js - npm Package Compare versions

Comparing version 0.9.996 to 0.9.997

.github/ISSUE_TEMPLATE/feature_request.md

67

index.d.ts

@@ -101,4 +101,6 @@ // Type definitions for daily-js

showLeaveButton?: boolean;
showParticipantsBar?: boolean;
showLocalVideo?: boolean;
showFullscreenButton?: boolean;
iframeStyle?: CSSStyleDeclaration;
iframeStyle?: Partial<CSSStyleDeclaration>;
customLayout?: boolean;

@@ -133,12 +135,42 @@ bodyClass?: string;

export interface DailyTrackState {
subscribed: boolean;
state:
| 'blocked'
| 'off'
| 'sendable'
| 'loading'
| 'interrupted'
| 'playable';
blocked?: {
byDeviceMissing?: boolean;
byPermissions?: boolean;
};
off?: {
byUser?: boolean;
byBandwidth?: boolean;
};
track?: MediaStreamTrack;
}
export interface DailyParticipant {
// audio/video info
audio: boolean;
// tracks
audioTrack?: MediaStreamTrack;
video: boolean;
videoTrack?: MediaStreamTrack;
screen: boolean;
screenVideoTrack?: MediaStreamTrack;
screenAudioTrack?: MediaStreamTrack;
// legacy track state
audio: boolean;
video: boolean;
screen: boolean;
// new track state
tracks: {
audio: DailyTrackState;
video: DailyTrackState;
screenAudio: DailyTrackState;
screenVideo: DailyTrackState;
};
// user/session info

@@ -165,2 +197,3 @@ user_id: string;

screenVideo?: boolean;
screenAudio?: boolean;
};

@@ -182,5 +215,5 @@

export interface DailyParticipantStreamCss {
div?: CSSStyleDeclaration;
overlay?: CSSStyleDeclaration;
video?: CSSStyleDeclaration;
div?: Partial<CSSStyleDeclaration>;
overlay?: Partial<CSSStyleDeclaration>;
video?: Partial<CSSStyleDeclaration>;
}

@@ -271,4 +304,2 @@

| 'live-streaming-stopped'
| 'track-started'
| 'track-stopped'
>;

@@ -298,2 +329,8 @@ }

export interface DailyEventObjectTrack {
action: Extract<DailyEvent, 'track-started' | 'track-stopped'>;
participant: DailyParticipant | null; // null if participant left meeting
track: MediaStreamTrack;
}
export interface DailyEventObjectMouseEvent {

@@ -381,2 +418,4 @@ action: Extract<

? DailyEventObjectParticipant
: T extends DailyEventObjectTrack['action']
? DailyEventObjectTrack
: T extends DailyEventObjectMouseEvent['action']

@@ -452,2 +491,6 @@ ? DailyEventObjectMouseEvent

setDailyLang(lang: DailyLanguage): DailyCall;
setUserName(
name: string,
options?: { thisMeetingOnly?: boolean }
): Promise<{ userName: string }>;
startCamera(properties?: DailyCallOptions): Promise<DailyDeviceInfos>;

@@ -490,2 +533,6 @@ cycleCamera(): Promise<{ device?: MediaDeviceInfo | null }>;

setShowNamesMode(mode: false | 'always' | 'never'): DailyCall;
setShowLocalVideo(show: boolean): DailyCall;
setShowParticipantsBar(show: boolean): DailyCall;
showLocalVideo(): boolean;
showParticipantsBar(): boolean;
detectAllFaces(): Promise<{

@@ -492,0 +539,0 @@ faces?: { [id: string]: DailyFaceInfo[] };

14

package.json
{
"name": "@daily-co/daily-js",
"version": "0.9.996",
"version": "0.9.997",
"engines": {

@@ -29,7 +29,7 @@ "node": ">=10.0.0"

"devDependencies": {
"@babel/core": "^7.8.3",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-transform-modules-commonjs": "^7.8.3",
"@babel/plugin-transform-runtime": "^7.8.3",
"@babel/preset-env": "^7.8.3",
"@babel/core": "^7.12.10",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-transform-modules-commonjs": "^7.12.1",
"@babel/plugin-transform-runtime": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@rollup/plugin-babel": "^5.2.1",

@@ -49,3 +49,3 @@ "@rollup/plugin-replace": "^2.3.2",

"dependencies": {
"@babel/runtime": "^7.8.3",
"@babel/runtime": "^7.12.5",
"bowser": "^2.8.1",

@@ -52,0 +52,0 @@ "events": "^3.1.0",

@@ -7,13 +7,1 @@ **🚨Our docs have moved! 🚨**

- [REST API docs](https://docs.daily.co/reference): To create video call rooms, configure features for the rooms, and manage users and permissions
**A note on the default branch name**
For anyone currently depending on bleeding-edge, not-yet-published changes in `daily-js`: the name of the default branch where these changes land is **`main`**. Please make sure your `package.json` reflects this.
```json
{
"dependencies": {
"@daily-co/daily-js": "daily-co/daily-js#main"
}
}
```

@@ -13,2 +13,9 @@ //

export const DAILY_TRACK_STATE_BLOCKED = 'blocked';
export const DAILY_TRACK_STATE_OFF = 'off';
export const DAILY_TRACK_STATE_SENDABLE = 'sendable';
export const DAILY_TRACK_STATE_LOADING = 'loading';
export const DAILY_TRACK_STATE_INTERRUPTED = 'interrupted';
export const DAILY_TRACK_STATE_PLAYABLE = 'playable';
export const DAILY_EVENT_LOADING = 'loading';

@@ -89,5 +96,9 @@ export const DAILY_EVENT_LOAD_ATTEMPT_FAILED = 'load-attempt-failed';

export const DAILY_METHOD_SET_SHOW_NAMES = 'set-show-names';
export const DAILY_METHOD_SET_SHOW_LOCAL_VIDEO = 'set-show-local-video';
export const DAILY_METHOD_SET_SHOW_PARTICIPANTS_BAR =
'set-show-participants-bar';
export const DAILY_METHOD_SET_ACTIVE_SPEAKER_MODE = 'set-active-speaker-mode';
export const DAILY_METHOD_REGISTER_INPUT_HANDLER = 'register-input-handler';
export const DAILY_METHOD_SET_LANG = 'set-daily-lang';
export const DAILY_METHOD_SET_USER_NAME = 'set-user-name';
export const DAILY_METHOD_DETECT_ALL_FACES = 'detect-all-faces';

@@ -94,0 +105,0 @@ export const DAILY_METHOD_ROOM = 'lib-room-info';

@@ -0,4 +1,6 @@

import filter from 'lodash/filter';
import orderBy from 'lodash/orderBy';
export const getParticipantIsSubscribedToTrack = (state, id, mediaTag) => {
return _getIsSubscribedToTrack(
state,
state.participants[id],

@@ -11,6 +13,44 @@ state.local.public.id,

export const getLocalIsSubscribedToTrack = (state, id, mediaTag) => {
return _getIsSubscribedToTrack(state, state.local, id, mediaTag);
return _getIsSubscribedToTrack(state.local, id, mediaTag);
};
export const _getIsSubscribedToTrack = (state, p, p2id, mediaTag) => {
// type is "cam" or "screen"
// kind is "video" or "audio"
export const getLocalTrack = (state, type, kind) => {
return (
state.local.streams &&
state.local.streams[type] &&
state.local.streams[type].stream &&
state.local.streams[type].stream[
`get${kind === 'video' ? 'Video' : 'Audio'}Tracks`
]()[0]
);
};
// type is "cam" or "screen"
// kind is "video" or "audio"
export const getRemoteTrack = (state, participantId, type, kind) => {
const streamEntry = _getRemoteStreamEntry(state, participantId, type, kind);
return streamEntry && streamEntry.pendingTrack;
};
// type is "cam" or "screen"
// kind is "video" or "audio"
export const getIsRemoteTrackLoading = (state, participantId, type, kind) => {
const participant = state.participants && state.participants[participantId];
const loadedTracks =
participant && participant.public && participant.public.loadedTracks;
if (loadedTracks) {
if (type === 'cam') {
return !loadedTracks[kind];
} else {
return !loadedTracks[
`screen${kind.charAt(0).toUpperCase() + kind.slice(1)}`
];
}
}
return false;
};
const _getIsSubscribedToTrack = (p, p2id, mediaTag) => {
// if we don't have a participant record at all, assume that

@@ -36,1 +76,17 @@ // false is the safest thing to return, here

};
const _getRemoteStreamEntry = (state, participantId, type, kind) => {
let streams = orderBy(
filter(
state.streams,
(s) =>
s.participantId === participantId &&
s.type === type &&
s.pendingTrack &&
s.pendingTrack.kind === kind
),
'starttime',
'desc'
);
return streams && streams[0];
};

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

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

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