@daily-co/daily-js
Advanced tools
Comparing version 0.23.0 to 0.24.0
132
index.d.ts
@@ -118,3 +118,4 @@ // Type definitions for daily-js | ||
| 'video-processor-error' | ||
| 'remote-media-player-error'; | ||
| 'remote-media-player-error' | ||
| 'live-streaming-warning'; | ||
@@ -234,2 +235,3 @@ export type DailyNetworkTopology = 'sfu' | 'peer'; | ||
) => void; | ||
userMediaVideoConstraints?: boolean | MediaTrackConstraints; | ||
fastConnect?: boolean; | ||
@@ -265,3 +267,10 @@ preferH264ForCam?: boolean; | ||
}; | ||
// guaranteed-playable reference to the track | ||
// (it's only present when state === 'playable') | ||
track?: MediaStreamTrack; | ||
// not-guaranteed-playable reference to the track | ||
// (it may be present when state !== 'playable') | ||
// useful, for instance, for avoiding Safari's remote-track-unmute-in-background-tab bug | ||
// (see https://github.com/daily-demos/call-object-react/blob/c81b21262dead2aacbd5a2f534d0fee8530acfe4/src/components/Tile/Tile.js#L53-L60) | ||
persistentTrack?: MediaStreamTrack; | ||
} | ||
@@ -403,2 +412,3 @@ | ||
enable_people_ui?: boolean; | ||
enable_pip_ui?: boolean; | ||
enable_prejoin_ui?: boolean; | ||
@@ -435,2 +445,3 @@ enable_video_processing_ui?: boolean; | ||
enable_people_ui?: boolean; | ||
enable_pip_ui?: boolean; | ||
enable_prejoin_ui?: boolean; | ||
@@ -447,2 +458,3 @@ enable_video_processing_ui?: boolean; | ||
user_id?: string; | ||
enable_prejoin_ui?: boolean; | ||
enable_screenshare?: boolean; | ||
@@ -452,2 +464,3 @@ start_video_off?: boolean; | ||
enable_recording?: string; | ||
enable_recording_ui?: boolean; | ||
start_cloud_recording?: boolean; | ||
@@ -601,2 +614,8 @@ close_tab_on_exit?: boolean; | ||
export interface DailyEventObjectRecordingData { | ||
action: Extract<DailyEvent, 'recording-data'>; | ||
data: Uint8Array; | ||
finished: boolean; | ||
} | ||
export interface DailyEventObjectMouseEvent { | ||
@@ -719,57 +738,58 @@ action: Extract< | ||
export type DailyEventObject< | ||
T extends DailyEvent = any | ||
> = T extends DailyEventObjectAppMessage['action'] | ||
? DailyEventObjectAppMessage | ||
: T extends DailyEventObjectNoPayload['action'] | ||
? DailyEventObjectNoPayload | ||
: T extends DailyEventObjectCameraError['action'] | ||
? DailyEventObjectCameraError | ||
: T extends DailyEventObjectFatalError['action'] | ||
? DailyEventObjectFatalError | ||
: T extends DailyEventObjectNonFatalError['action'] | ||
? DailyEventObjectNonFatalError | ||
: T extends DailyEventObjectGenericError['action'] | ||
? DailyEventObjectGenericError | ||
: T extends DailyEventObjectParticipants['action'] | ||
? DailyEventObjectParticipants | ||
: T extends DailyEventObjectParticipant['action'] | ||
? DailyEventObjectParticipant | ||
: T extends DailyEventObjectWaitingParticipant['action'] | ||
? DailyEventObjectWaitingParticipant | ||
: T extends DailyEventObjectAccessState['action'] | ||
? DailyEventObjectAccessState | ||
: T extends DailyEventObjectMeetingSessionUpdated['action'] | ||
? DailyEventObjectMeetingSessionUpdated | ||
: T extends DailyEventObjectTrack['action'] | ||
? DailyEventObjectTrack | ||
: T extends DailyEventObjectRecordingStarted['action'] | ||
? DailyEventObjectRecordingStarted | ||
: T extends DailyEventObjectRemoteMediaPlayerUpdate['action'] | ||
? DailyEventObjectRemoteMediaPlayerUpdate | ||
: T extends DailyEventObjectRemoteMediaPlayerStopped['action'] | ||
? DailyEventObjectRemoteMediaPlayerStopped | ||
: T extends DailyEventObjectMouseEvent['action'] | ||
? DailyEventObjectMouseEvent | ||
: T extends DailyEventObjectTouchEvent['action'] | ||
? DailyEventObjectTouchEvent | ||
: T extends DailyEventObjectNetworkQualityEvent['action'] | ||
? DailyEventObjectNetworkQualityEvent | ||
: T extends DailyEventObjectNetworkConnectionEvent['action'] | ||
? DailyEventObjectNetworkConnectionEvent | ||
: T extends DailyEventObjectActiveSpeakerChange['action'] | ||
? DailyEventObjectActiveSpeakerChange | ||
: T extends DailyEventObjectActiveSpeakerModeChange['action'] | ||
? DailyEventObjectActiveSpeakerModeChange | ||
: T extends DailyEventObjectLangUpdated['action'] | ||
? DailyEventObjectLangUpdated | ||
: T extends DailyEventObjectThemeUpdated['action'] | ||
? DailyEventObjectThemeUpdated | ||
: T extends DailyEventObjectReceiveSettingsUpdated['action'] | ||
? DailyEventObjectReceiveSettingsUpdated | ||
: T extends DailyEventObjectShowLocalVideoChanged['action'] | ||
? DailyEventObjectShowLocalVideoChanged | ||
: T extends DailyEventObjectInputSettingsUpdated['action'] | ||
? DailyEventObjectInputSettingsUpdated | ||
: any; | ||
export type DailyEventObject<T extends DailyEvent = any> = | ||
T extends DailyEventObjectAppMessage['action'] | ||
? DailyEventObjectAppMessage | ||
: T extends DailyEventObjectNoPayload['action'] | ||
? DailyEventObjectNoPayload | ||
: T extends DailyEventObjectCameraError['action'] | ||
? DailyEventObjectCameraError | ||
: T extends DailyEventObjectFatalError['action'] | ||
? DailyEventObjectFatalError | ||
: T extends DailyEventObjectNonFatalError['action'] | ||
? DailyEventObjectNonFatalError | ||
: T extends DailyEventObjectGenericError['action'] | ||
? DailyEventObjectGenericError | ||
: T extends DailyEventObjectParticipants['action'] | ||
? DailyEventObjectParticipants | ||
: T extends DailyEventObjectParticipant['action'] | ||
? DailyEventObjectParticipant | ||
: T extends DailyEventObjectWaitingParticipant['action'] | ||
? DailyEventObjectWaitingParticipant | ||
: T extends DailyEventObjectAccessState['action'] | ||
? DailyEventObjectAccessState | ||
: T extends DailyEventObjectMeetingSessionUpdated['action'] | ||
? DailyEventObjectMeetingSessionUpdated | ||
: T extends DailyEventObjectTrack['action'] | ||
? DailyEventObjectTrack | ||
: T extends DailyEventObjectRecordingStarted['action'] | ||
? DailyEventObjectRecordingStarted | ||
: T extends DailyEventObjectRecordingData['action'] | ||
? DailyEventObjectRecordingData | ||
: T extends DailyEventObjectRemoteMediaPlayerUpdate['action'] | ||
? DailyEventObjectRemoteMediaPlayerUpdate | ||
: T extends DailyEventObjectRemoteMediaPlayerStopped['action'] | ||
? DailyEventObjectRemoteMediaPlayerStopped | ||
: T extends DailyEventObjectMouseEvent['action'] | ||
? DailyEventObjectMouseEvent | ||
: T extends DailyEventObjectTouchEvent['action'] | ||
? DailyEventObjectTouchEvent | ||
: T extends DailyEventObjectNetworkQualityEvent['action'] | ||
? DailyEventObjectNetworkQualityEvent | ||
: T extends DailyEventObjectNetworkConnectionEvent['action'] | ||
? DailyEventObjectNetworkConnectionEvent | ||
: T extends DailyEventObjectActiveSpeakerChange['action'] | ||
? DailyEventObjectActiveSpeakerChange | ||
: T extends DailyEventObjectActiveSpeakerModeChange['action'] | ||
? DailyEventObjectActiveSpeakerModeChange | ||
: T extends DailyEventObjectLangUpdated['action'] | ||
? DailyEventObjectLangUpdated | ||
: T extends DailyEventObjectThemeUpdated['action'] | ||
? DailyEventObjectThemeUpdated | ||
: T extends DailyEventObjectReceiveSettingsUpdated['action'] | ||
? DailyEventObjectReceiveSettingsUpdated | ||
: T extends DailyEventObjectShowLocalVideoChanged['action'] | ||
? DailyEventObjectShowLocalVideoChanged | ||
: T extends DailyEventObjectInputSettingsUpdated['action'] | ||
? DailyEventObjectInputSettingsUpdated | ||
: any; | ||
@@ -776,0 +796,0 @@ export interface DailyFaceInfo { |
{ | ||
"name": "@daily-co/daily-js", | ||
"version": "0.23.0", | ||
"version": "0.24.0", | ||
"engines": { | ||
@@ -44,2 +44,3 @@ "node": ">=10.0.0" | ||
"jest": "^27.4.7", | ||
"prettier": "^2.5.1", | ||
"rollup": "^1.29.0", | ||
@@ -46,0 +47,0 @@ "rollup-plugin-cjs-es": "^0.7.0", |
@@ -119,2 +119,3 @@ // | ||
export const DAILY_EVENT_LIVE_STREAMING_ERROR = 'live-streaming-error'; | ||
export const DAILY_LIVE_STREAMING_WARNING = 'live-streaming-warning'; | ||
@@ -121,0 +122,0 @@ export const DAILY_EVENT_LANG_UPDATED = 'lang-updated'; |
@@ -76,3 +76,3 @@ // This method should be used instead of window.navigator.userAgent, which | ||
if (!(browserName && browserVersion)) { | ||
return false; | ||
return true; | ||
} | ||
@@ -97,3 +97,3 @@ switch (browserName) { | ||
} | ||
return false; | ||
return true; | ||
} | ||
@@ -100,0 +100,0 @@ |
@@ -106,3 +106,21 @@ import filter from 'lodash/filter'; | ||
return mapToTrueFalseStaged(sTracks[subscribeeId][mediaTag]); | ||
const isCustomTrack = | ||
[ | ||
'cam-audio', | ||
'cam-video', | ||
'screen-video', | ||
'screen-audio', | ||
'rmpAudio', | ||
'rmpVideo', | ||
].indexOf(mediaTag) === -1; | ||
let result; | ||
if (isCustomTrack && sTracks[subscribeeId]['custom']) { | ||
result = [true, 'staged'].includes(sTracks[subscribeeId]['custom']) | ||
? mapToTrueFalseStaged(sTracks[subscribeeId]['custom']) | ||
: mapToTrueFalseStaged(sTracks[subscribeeId]['custom'][mediaTag]); | ||
} else { | ||
result = mapToTrueFalseStaged(sTracks[subscribeeId][mediaTag]); | ||
} | ||
return result; | ||
}; | ||
@@ -109,0 +127,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
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
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
515669
6697
23
14