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
20
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.43.0 to 0.44.0

src/test/UpdateSendSettings.test.js

121

index.d.ts

@@ -96,2 +96,3 @@ // Type definitions for daily-js

| 'input-settings-updated'
| 'send-settings-updated'
| 'show-local-video-changed'

@@ -597,2 +598,26 @@ | 'selected-devices-updated'

interface DailySendSettings {
video?: DailyVideoSendSettings | DailyVideoSendSettingsPreset;
customVideoDefaults?: DailyVideoSendSettings | DailyVideoSendSettingsPreset;
[customKey: string]:
| DailyVideoSendSettings
| DailyVideoSendSettingsPreset
| undefined;
}
export type DailyVideoSendSettingsPreset =
| 'default'
| 'bandwidth-optimized'
| 'quality-optimized';
// Media Track Send Settings
interface DailyVideoSendSettings {
maxQuality?: 'low' | 'medium' | 'high';
encodings?: {
low: RTCRtpEncodingParameters;
medium: RTCRtpEncodingParameters;
high: RTCRtpEncodingParameters;
};
}
export interface DailyPendingRoomInfo {

@@ -959,3 +984,3 @@ roomUrlPendingJoin: string;

type?: string;
layout?: DailyStreamingLayoutConfig;
layout?: DailyStreamingLayoutConfig<'start'>;
instanceId?: string;

@@ -1088,5 +1113,10 @@ }

export interface DailyEventObjectSendSettingsUpdated {
action: Extract<DailyEvent, 'send-settings-updated'>;
sendSettings: DailySendSettings;
}
export interface DailyEventObjectLiveStreamingStarted {
action: Extract<DailyEvent, 'live-streaming-started'>;
layout?: DailyStreamingLayoutConfig;
layout?: DailyLiveStreamingLayoutConfig<'start'>;
instanceId?: string;

@@ -1122,2 +1152,6 @@ }

export type DailyRemoteMediaPlayerStopReason =
| DailyRemoteMediaPlayerEOS
| DailyRemoteMediaPlayerPeerStopped;
export interface DailyEventObjectRemoteMediaPlayerUpdate {

@@ -1232,2 +1266,4 @@ action: Extract<

? DailyEventObjectInputSettingsUpdated
: T extends DailyEventObjectSendSettingsUpdated['action']
? DailyEventObjectSendSettingsUpdated
: T extends DailyEventObjectCustomButtonClick['action']

@@ -1270,3 +1306,26 @@ ? DailyEventObjectCustomButtonClick

export interface DailyStreamingDefaultLayoutConfig {
export type DailyAccess = 'unknown' | SpecifiedDailyAccess;
export type SpecifiedDailyAccess = { level: 'none' | 'lobby' | 'full' };
export type DailyAccessState = {
access: DailyAccess;
awaitingAccess?: SpecifiedDailyAccess;
};
export type DailyAccessRequest = {
access?: { level: 'full' };
name: string;
};
type DailyStreamingParticipantsSortMethod = 'active';
export interface DailyStreamingParticipantsConfig {
video?: string[];
audio?: string[];
sort?: DailyStreamingParticipantsSortMethod;
}
export interface DailyStreamingDefaultLayoutConfig
extends DailyStreamingParticipantsConfig {
preset: 'default';

@@ -1281,9 +1340,15 @@ max_cam_streams?: number;

export interface DailyStreamingActiveParticipantLayoutConfig {
export interface DailyStreamingActiveParticipantLayoutConfig
extends DailyStreamingParticipantsConfig {
preset: 'active-participant';
}
export interface DailyStreamingAudioOnlyLayoutConfig {
preset: 'audio-only';
}
export type DailyStreamingPortraitLayoutVariant = 'vertical' | 'inset';
export interface DailyStreamingPortraitLayoutConfig {
export interface DailyStreamingPortraitLayoutConfig
extends DailyStreamingParticipantsConfig {
preset: 'portrait';

@@ -1294,3 +1359,4 @@ variant?: DailyStreamingPortraitLayoutVariant;

export interface DailyUpdateStreamingCustomLayoutConfig {
export interface DailyUpdateStreamingCustomLayoutConfig
extends DailyStreamingParticipantsConfig {
preset: 'custom';

@@ -1303,3 +1369,4 @@ composition_params?: {

export interface DailyStartStreamingCustomLayoutConfig
extends DailyUpdateStreamingCustomLayoutConfig {
extends DailyUpdateStreamingCustomLayoutConfig,
DailyStreamingParticipantsConfig {
composition_id?: string;

@@ -1312,2 +1379,3 @@ session_assets?: {

type DailyStreamingLayoutConfigType = 'start' | 'update';
type DailyStartStreamingMethod = 'liveStreaming' | 'recording';

@@ -1321,2 +1389,3 @@ export type DailyStreamingLayoutConfig<

| DailyStreamingPortraitLayoutConfig
| DailyStreamingAudioOnlyLayoutConfig
| (Type extends 'start'

@@ -1326,2 +1395,9 @@ ? DailyStartStreamingCustomLayoutConfig

export type DailyLiveStreamingLayoutConfig<
Type extends DailyStreamingLayoutConfigType = 'start'
> = Exclude<
DailyStreamingLayoutConfig<Type>,
DailyStreamingAudioOnlyLayoutConfig
>;
export type DailyStreamingState = 'connected' | 'interrupted';

@@ -1339,21 +1415,4 @@

export type DailyRemoteMediaPlayerStopReason =
| DailyRemoteMediaPlayerEOS
| DailyRemoteMediaPlayerPeerStopped;
export type DailyAccess = 'unknown' | SpecifiedDailyAccess;
export type SpecifiedDailyAccess = { level: 'none' | 'lobby' | 'full' };
export type DailyAccessState = {
access: DailyAccess;
awaitingAccess?: SpecifiedDailyAccess;
};
export type DailyAccessRequest = {
access?: { level: 'full' };
name: string;
};
export interface DailyStreamingOptions<
Method extends DailyStartStreamingMethod,
Type extends DailyStreamingLayoutConfigType = 'start'

@@ -1370,3 +1429,5 @@ > {

instanceId?: string;
layout?: DailyStreamingLayoutConfig<Type>;
layout?: Method extends 'recording'
? DailyStreamingLayoutConfig<Type>
: DailyLiveStreamingLayoutConfig<Type>;
}

@@ -1380,3 +1441,3 @@

Type extends DailyStreamingLayoutConfigType = 'start'
> extends DailyStreamingOptions<Type> {
> extends DailyStreamingOptions<'liveStreaming', Type> {
rtmpUrl?: string | string[];

@@ -1543,3 +1604,3 @@ endpoints?: DailyStreamingEndpoint[];

stopScreenShare(): void;
startRecording(options?: DailyStreamingOptions<'start'>): void;
startRecording(options?: DailyStreamingOptions<'recording', 'start'>): void;
updateRecording(options: {

@@ -1552,3 +1613,3 @@ layout?: DailyStreamingLayoutConfig<'update'>;

updateLiveStreaming(options: {
layout?: DailyStreamingLayoutConfig<'update'>;
layout?: DailyLiveStreamingLayoutConfig<'update'>;
instanceId?: string;

@@ -1576,2 +1637,4 @@ }): void;

getCpuLoadStats(): Promise<DailyCpuLoadStats>;
updateSendSettings(settings: DailySendSettings): Promise<DailySendSettings>;
getSendSettings(): DailySendSettings;
getActiveSpeaker(): { peerId?: string };

@@ -1578,0 +1641,0 @@ setActiveSpeakerMode(enabled: boolean): DailyCall;

{
"name": "@daily-co/daily-js",
"version": "0.43.0",
"version": "0.44.0",
"engines": {

@@ -5,0 +5,0 @@ "node": ">=10.0.0"

@@ -36,2 +36,9 @@ //

// send settings
export const HIGH_BANDWIDTH_VIDEO_SEND_SETTINGS_PRESET_KEY =
'quality-optimized';
export const LOW_BANDWIDTH_VIDEO_SEND_SETTINGS_PRESET_KEY =
'bandwidth-optimized';
export const DEFAULT_VIDEO_SEND_SETTINGS_PRESET_KEY = 'default';
// error types

@@ -150,2 +157,3 @@

export const DAILY_EVENT_INPUT_SETTINGS_UPDATED = 'input-settings-updated';
export const DAILY_EVENT_SEND_SETTINGS_UPDATED = 'send-settings-updated';
export const DAILY_EVENT_NONFATAL_ERROR = 'nonfatal-error';

@@ -173,12 +181,8 @@ export const DAILY_INPUT_SETTINGS_ERROR_TYPE = 'input-settings-error';

export const DAILY_METHOD_GET_SIDEBAR_VIEW =
'get-sidebar-view';
export const DAILY_METHOD_SET_SIDEBAR_VIEW =
'set-sidebar-view';
export const DAILY_METHOD_SET_CUSTOM_INTEGRATIONS =
'set-custom-integrations';
export const DAILY_METHOD_GET_SIDEBAR_VIEW = 'get-sidebar-view';
export const DAILY_METHOD_SET_SIDEBAR_VIEW = 'set-sidebar-view';
export const DAILY_METHOD_SET_CUSTOM_INTEGRATIONS = 'set-custom-integrations';
export const DAILY_METHOD_START_CUSTOM_INTEGRATIONS =
'start-custom-integrations';
export const DAILY_METHOD_STOP_CUSTOM_INTEGRATIONS =
'stop-custom-integrations';
export const DAILY_METHOD_STOP_CUSTOM_INTEGRATIONS = 'stop-custom-integrations';
export const DAILY_METHOD_UPDATE_CUSTOM_TRAY_BUTTONS =

@@ -262,2 +266,3 @@ 'update-custom-tray-buttons';

export const DAILY_METHOD_UPDATE_INPUT_SETTINGS = 'update-input-settings';
export const DAILY_METHOD_UPDATE_SEND_SETTINGS = 'update-send-settings';
export const DAILY_METHOD_TRANSMIT_LOG = 'transmit-log';

@@ -264,0 +269,0 @@

@@ -20,2 +20,15 @@ // Note: Bowser is only used for OS detection, not Browser detection

// This method should be used instead of window.navigator.maxTouchPoints, which
// is not defined in React Native and results in an error.
export function getMaxTouchPoints() {
if (
!isReactNative() &&
typeof window !== 'undefined' &&
window?.navigator?.maxTouchPoints
) {
return window.navigator.maxTouchPoints;
}
return 0;
}
export function isReactNative() {

@@ -29,2 +42,6 @@ return (

export function isReactNativeUnifiedPlan() {
return isReactNative() && typeof RTCRtpTransceiver !== 'undefined';
}
export function isIOS() {

@@ -124,3 +141,5 @@ const userAgent = getUserAgent();

const userAgent = getUserAgent();
if (userAgent.match(/Mobi/) || userAgent.match(/Android/)) {
// Testing on iOS and iPad both return 05 touch points.
const isIosMobile = userAgent.match(/Mac/) && getMaxTouchPoints() >= 5;
if (userAgent.match(/Mobi/) || userAgent.match(/Android/) || isIosMobile) {
return true;

@@ -127,0 +146,0 @@ }

@@ -48,3 +48,3 @@ // We need to mock the MediaStreamTrack claas and the mediaDevices which are provided by the browser

const expectedError =
'Custom track `trackName` must not match a track name already used by daily: cam-audio, cam-video, screen-video, screen-audio, rmpAudio, rmpVideo';
'Custom track `trackName` must not match a track name already used by daily: cam-audio, cam-video, customVideoDefaults, screen-video, screen-audio, rmpAudio, rmpVideo';
reservedNames.forEach((trackName) => {

@@ -51,0 +51,0 @@ expect(() =>

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