@daily-co/daily-js
Advanced tools
Comparing version 0.33.0 to 0.34.0
@@ -86,2 +86,3 @@ // Type definitions for daily-js | ||
| 'meeting-session-updated' | ||
| 'meeting-session-state-updated' | ||
| 'waiting-participant-added' | ||
@@ -130,3 +131,4 @@ | 'waiting-participant-updated' | ||
| 'remote-media-player-error' | ||
| 'live-streaming-warning'; | ||
| 'live-streaming-warning' | ||
| 'meeting-session-data-error'; | ||
@@ -232,2 +234,3 @@ export type DailyNetworkTopology = 'sfu' | 'peer'; | ||
showFullscreenButton?: boolean; | ||
showUserNameChangeUI?: boolean; | ||
iframeStyle?: Partial<CSSStyleDeclaration>; | ||
@@ -253,2 +256,8 @@ customLayout?: boolean; | ||
export interface StartCustomTrackOptions { | ||
track: MediaStreamTrack; | ||
mode?: 'music' | 'speech' | DailyMicAudioModeSettings | undefined; | ||
trackName?: string; | ||
} | ||
export interface DailyLoadOptions extends DailyCallOptions { | ||
@@ -279,4 +288,4 @@ baseUrl?: string; | ||
useDevicePreferenceCookies?: boolean; | ||
userMediaAudioConstraints?: boolean | MediaTrackConstraints; | ||
userMediaVideoConstraints?: boolean | MediaTrackConstraints; | ||
userMediaAudioConstraints?: MediaTrackConstraints; | ||
userMediaVideoConstraints?: MediaTrackConstraints; | ||
avoidEval?: boolean; | ||
@@ -563,2 +572,9 @@ callObjectBundleUrlOverride?: string; | ||
export interface DailyMeetingSessionState { | ||
data: unknown; | ||
topology: DailyNetworkTopology | 'none'; | ||
} | ||
export type DailySessionDataMergeStrategy = 'replace' | 'shallow-merge'; | ||
export interface DailyVideoReceiveSettings { | ||
@@ -750,2 +766,7 @@ layer?: number; | ||
export interface DailyEventObjectMeetingSessionStateUpdated { | ||
action: Extract<DailyEvent, 'meeting-session-state-updated'>; | ||
meetingSessionState: DailyMeetingSessionState; | ||
} | ||
export interface DailyEventObjectTrack { | ||
@@ -968,2 +989,4 @@ action: Extract<DailyEvent, 'track-started' | 'track-stopped'>; | ||
? DailyEventObjectMeetingSessionUpdated | ||
: T extends DailyEventObjectMeetingSessionStateUpdated['action'] | ||
? DailyEventObjectMeetingSessionStateUpdated | ||
: T extends DailyEventObjectTrack['action'] | ||
@@ -1112,2 +1135,3 @@ ? DailyEventObjectTrack | ||
minIdleTimeOut?: number; | ||
maxDuration?: number; | ||
backgroundColor?: string; | ||
@@ -1235,2 +1259,7 @@ instanceId?: string; | ||
}>; | ||
meetingSessionState(): DailyMeetingSessionState; | ||
setMeetingSessionData( | ||
data: unknown, | ||
mergeStrategy?: DailySessionDataMergeStrategy | ||
): void; | ||
setUserName( | ||
@@ -1250,2 +1279,4 @@ name: string, | ||
}): DailyCall; | ||
startCustomTrack(properties: StartCustomTrackOptions): string; | ||
stopCustomTrack(mediaTag: string): void; | ||
setInputDevicesAsync(devices: { | ||
@@ -1252,0 +1283,0 @@ audioDeviceId?: string | false | null; |
{ | ||
"name": "@daily-co/daily-js", | ||
"version": "0.33.0", | ||
"version": "0.34.0", | ||
"engines": { | ||
@@ -63,2 +63,3 @@ "node": ">=10.0.0" | ||
"bowser": "^2.8.1", | ||
"dequal": "^2.0.3", | ||
"events": "^3.1.0", | ||
@@ -65,0 +66,0 @@ "fast-equals": "^1.6.3", |
@@ -6,3 +6,2 @@ import { | ||
getLocalCustomTrack, | ||
getRemoteCustomTrack, | ||
} from './shared-with-pluot-core/selectors'; | ||
@@ -51,3 +50,3 @@ | ||
? getLocalCustomTrack(state, trackEntryKey, kind) | ||
: getRemoteCustomTrack(state, p.session_id, trackEntryKey, kind); | ||
: getRemoteTrack(state, p.session_id, trackEntryKey, kind); | ||
if (trackInfo.state === 'playable') { | ||
@@ -93,4 +92,6 @@ p.tracks[trackEntryKey].track = track; | ||
try { | ||
p.screenVideoTrack = state.local.streams.screen.stream.getVideoTracks()[0]; | ||
p.screenAudioTrack = state.local.streams.screen.stream.getAudioTracks()[0]; | ||
p.screenVideoTrack = | ||
state.local.streams.screen.stream.getVideoTracks()[0]; | ||
p.screenAudioTrack = | ||
state.local.streams.screen.stream.getAudioTracks()[0]; | ||
if (!(p.screenVideoTrack || p.screenAudioTrack)) { | ||
@@ -97,0 +98,0 @@ p.screen = false; |
@@ -82,2 +82,6 @@ // | ||
export const DAILY_EVENT_MEETING_SESSION_UPDATED = 'meeting-session-updated'; | ||
export const DAILY_EVENT_MEETING_SESSION_STATE_UPDATED = | ||
'meeting-session-state-updated'; | ||
export const DAILY_EVENT_MEETING_SESSION_DATA_ERROR = | ||
'meeting-session-data-error'; | ||
@@ -154,2 +158,3 @@ export const DAILY_EVENT_WAITING_PARTICIPANT_ADDED = | ||
export const MAX_APP_MSG_SIZE = 1024 * 4; | ||
export const MAX_SESSION_DATA_SIZE = 1024 * 4 * 25; | ||
export const MAX_USER_DATA_SIZE = 1024 * 4; | ||
@@ -183,2 +188,4 @@ | ||
export const DAILY_METHOD_SET_CAMERA = 'set-camera'; | ||
export const DAILY_METHOD_START_CUSTOM_TRACK = 'start-custom-track'; | ||
export const DAILY_METHOD_STOP_CUSTOM_TRACK = 'stop-custom-track'; | ||
export const DAILY_METHOD_CYCLE_MIC = 'cycle-mic'; | ||
@@ -197,2 +204,3 @@ export const DAILY_METHOD_GET_CAMERA_FACING_MODE = 'get-camera-facing-mode'; | ||
export const DAILY_METHOD_GET_MEETING_SESSION = 'get-meeting-session'; | ||
export const DAILY_METHOD_SET_SESSION_DATA = 'set-session-data'; | ||
export const DAILY_METHOD_SET_USER_NAME = 'set-user-name'; | ||
@@ -199,0 +207,0 @@ export const DAILY_METHOD_SET_USER_DATA = 'set-user-data'; |
@@ -150,22 +150,1 @@ import filter from 'lodash/filter'; | ||
}; | ||
export const getRemoteCustomTrack = (state, participantId, mediaTag, kind) => { | ||
// for now, we only support sfu mode for custom tracks. the streamId is always | ||
// prepended with "soup-" sfu-mode tracks. ("streamId" is a very old name that | ||
// dates from the era of transitional support for tracks, rather than streams, | ||
// in the WebRTC spec.) | ||
const streamId = 'soup-' + mediaTag; | ||
let streams = orderBy( | ||
filter( | ||
state.streams, | ||
(s) => | ||
s.participantId === participantId && | ||
s.streamId === streamId && | ||
s.pendingTrack && | ||
s.pendingTrack.kind === kind | ||
), | ||
'starttime', | ||
'desc' | ||
); | ||
return streams && streams[0] && streams[0].pendingTrack; | ||
}; |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
597824
41
8834
6
+ Addeddequal@^2.0.3
+ Addeddequal@2.0.3(transitive)