@whereby.com/browser-sdk 2.1.0-beta3 → 2.1.0-beta4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cdn/{v2-embed-beta3.js → v2-embed-beta4.js} +1 -1
- package/dist/cdn/{v2-react-beta3.js → v2-react-beta4.js} +1 -1
- package/dist/core/index.d.ts +5 -1
- package/dist/core/index.js +19 -1
- package/dist/embed/index.esm.js +1 -1
- package/dist/react/index.d.ts +89 -89
- package/dist/react/index.esm.js +4 -2
- package/package.json +1 -1
package/dist/core/index.d.ts
CHANGED
|
@@ -447,6 +447,10 @@ declare class RoomParticipant {
|
|
|
447
447
|
readonly isVideoEnabled: boolean;
|
|
448
448
|
constructor({ displayName, id, stream, isAudioEnabled, isVideoEnabled }: RoomParticipantData);
|
|
449
449
|
}
|
|
450
|
+
interface RemoteParticipantData {
|
|
451
|
+
newJoiner: boolean;
|
|
452
|
+
streams: string[];
|
|
453
|
+
}
|
|
450
454
|
type StreamState = "new_accept" | "to_accept" | "old_accept" | "done_accept" | "to_unaccept" | "done_unaccept" | "auto";
|
|
451
455
|
interface Stream {
|
|
452
456
|
id: string;
|
|
@@ -2353,4 +2357,4 @@ declare const createReactor: <Selectors extends ((state: {
|
|
|
2353
2357
|
extra: ReturnType<typeof createServices>;
|
|
2354
2358
|
}, ...selectorValues: SelectorResults<Selectors>) => void | Promise<void>) => _reduxjs_toolkit.UnsubscribeListener;
|
|
2355
2359
|
|
|
2356
|
-
export { type AppDispatch, type AppStartListening, type AppState, type AppThunk, type ConnectionStatus, type RemoteParticipantState, type RoomConnectionState, type RootReducer, type RootState, type RtcConnectionState, type SignalConnectionState, type Store, type ThunkConfig, addAppListener, appLeft, appSlice, createAppAsyncThunk, createAppThunk, createReactor, createServices, createStore, createWebRtcEmitter, deviceIdentified, deviceIdentifying, doAppJoin, doConnectRoom, doConnectRtc, doDisconnectRtc, doHandleAcceptStreams, doKnockRoom, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSignalDisconnect, doSignalIdentifyDevice, doSignalReconnect, doSignalSocketConnect, isAcceptingStreams, listenerMiddleware, observeStore, participantStreamAdded, participantStreamIdAdded, remoteParticipantsSlice, resolutionReported, roomConnectionSlice, rootReducer, rtcConnectionSlice, rtcDisconnected, rtcDispatcherCreated, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, sdkVersion, selectAppDisplayName, selectAppExternalId, selectAppIsNodeSdk, selectAppRaw, selectAppRoomKey, selectAppRoomName, selectAppRoomUrl, selectAppSdkVersion, selectAppWantsToJoin, selectIsAcceptingStreams, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectStreamsToAccept, setRoomKey, signalConnectionSlice, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, startAppListening, streamStatusUpdated };
|
|
2360
|
+
export { type AppDispatch, type AppStartListening, type AppState, type AppThunk, type ConnectionStatus, LocalParticipant, type RemoteParticipant, type RemoteParticipantData, type RemoteParticipantState, type RoomConnectionState, type RootReducer, type RootState, type RtcConnectionState, type Screenshare, type SignalConnectionState, type Store, type StreamState, type ThunkConfig, type WaitingParticipant, addAppListener, appLeft, appSlice, createAppAsyncThunk, createAppThunk, createReactor, createServices, createStore, createWebRtcEmitter, deviceIdentified, deviceIdentifying, doAppJoin, doConnectRoom, doConnectRtc, doDisconnectRtc, doHandleAcceptStreams, doKnockRoom, doRtcManagerCreated, doRtcManagerInitialize, doRtcReportStreamResolution, doSignalDisconnect, doSignalIdentifyDevice, doSignalReconnect, doSignalSocketConnect, isAcceptingStreams, listenerMiddleware, observeStore, participantStreamAdded, participantStreamIdAdded, remoteParticipantsSlice, resolutionReported, roomConnectionSlice, rootReducer, rtcConnectionSlice, rtcDisconnected, rtcDispatcherCreated, rtcManagerCreated, rtcManagerDestroyed, rtcManagerInitialized, sdkVersion, selectAppDisplayName, selectAppExternalId, selectAppIsNodeSdk, selectAppRaw, selectAppRoomKey, selectAppRoomName, selectAppRoomUrl, selectAppSdkVersion, selectAppWantsToJoin, selectIsAcceptingStreams, selectRemoteParticipants, selectRemoteParticipantsRaw, selectRoomConnectionRaw, selectRoomConnectionSession, selectRoomConnectionSessionId, selectRoomConnectionStatus, selectRtcConnectionRaw, selectRtcDispatcherCreated, selectRtcIsCreatingDispatcher, selectRtcManager, selectRtcManagerInitialized, selectRtcStatus, selectScreenshares, selectShouldConnectRoom, selectShouldConnectRtc, selectShouldConnectSignal, selectShouldDisconnectRtc, selectShouldIdentifyDevice, selectShouldInitializeRtc, selectSignalConnectionDeviceIdentified, selectSignalConnectionRaw, selectSignalConnectionSocket, selectSignalIsIdentifyingDevice, selectSignalStatus, selectStreamsToAccept, setRoomKey, signalConnectionSlice, socketConnected, socketConnecting, socketDisconnected, socketReconnecting, startAppListening, streamStatusUpdated };
|
package/dist/core/index.js
CHANGED
|
@@ -62858,8 +62858,26 @@ function createServices() {
|
|
|
62858
62858
|
};
|
|
62859
62859
|
}
|
|
62860
62860
|
|
|
62861
|
-
const sdkVersion = "2.1.0-
|
|
62861
|
+
const sdkVersion = "2.1.0-beta4";
|
|
62862
|
+
|
|
62863
|
+
class RoomParticipant {
|
|
62864
|
+
constructor({ displayName, id, stream, isAudioEnabled, isVideoEnabled }) {
|
|
62865
|
+
this.isLocalParticipant = false;
|
|
62866
|
+
this.displayName = displayName;
|
|
62867
|
+
this.id = id;
|
|
62868
|
+
this.stream = stream;
|
|
62869
|
+
this.isAudioEnabled = isAudioEnabled;
|
|
62870
|
+
this.isVideoEnabled = isVideoEnabled;
|
|
62871
|
+
}
|
|
62872
|
+
}
|
|
62873
|
+
class LocalParticipant extends RoomParticipant {
|
|
62874
|
+
constructor({ displayName, id, stream, isAudioEnabled, isVideoEnabled }) {
|
|
62875
|
+
super({ displayName, id, stream, isAudioEnabled, isVideoEnabled });
|
|
62876
|
+
this.isLocalParticipant = true;
|
|
62877
|
+
}
|
|
62878
|
+
}
|
|
62862
62879
|
|
|
62880
|
+
exports.LocalParticipant = LocalParticipant;
|
|
62863
62881
|
exports.addAppListener = addAppListener;
|
|
62864
62882
|
exports.appLeft = appLeft;
|
|
62865
62883
|
exports.appSlice = appSlice;
|
package/dist/embed/index.esm.js
CHANGED
package/dist/react/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import * as React$1 from 'react';
|
|
2
|
-
import _whereby_jslib_media_src_utils_ServerSocket, { ChatMessage as ChatMessage$2 } from '@whereby/jslib-media/src/utils/ServerSocket';
|
|
3
2
|
import * as redux_thunk from 'redux-thunk';
|
|
4
3
|
import { AxiosRequestConfig } from 'axios';
|
|
5
4
|
import EventEmitter from 'events';
|
|
6
5
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
7
6
|
import * as redux from 'redux';
|
|
7
|
+
import _whereby_jslib_media_src_utils_ServerSocket, { ChatMessage as ChatMessage$2 } from '@whereby/jslib-media/src/utils/ServerSocket';
|
|
8
8
|
import RtcManagerDispatcher from '@whereby/jslib-media/src/webrtc/RtcManagerDispatcher';
|
|
9
9
|
import RtcManager from '@whereby/jslib-media/src/webrtc/RtcManager';
|
|
10
10
|
|
|
@@ -25,58 +25,6 @@ interface VideoViewSelfProps {
|
|
|
25
25
|
type VideoViewProps = VideoViewSelfProps & React$1.DetailedHTMLProps<React$1.VideoHTMLAttributes<HTMLVideoElement>, HTMLVideoElement>;
|
|
26
26
|
declare const _default: ({ muted, mirror, stream, onResize, onSetAspectRatio, ...rest }: VideoViewProps) => React$1.JSX.Element;
|
|
27
27
|
|
|
28
|
-
interface RoomParticipantData {
|
|
29
|
-
displayName: string;
|
|
30
|
-
id: string;
|
|
31
|
-
stream?: MediaStream;
|
|
32
|
-
isAudioEnabled: boolean;
|
|
33
|
-
isVideoEnabled: boolean;
|
|
34
|
-
}
|
|
35
|
-
declare class RoomParticipant {
|
|
36
|
-
readonly displayName: string;
|
|
37
|
-
readonly id: string;
|
|
38
|
-
readonly stream?: MediaStream;
|
|
39
|
-
readonly isAudioEnabled: boolean;
|
|
40
|
-
readonly isLocalParticipant: boolean;
|
|
41
|
-
readonly isVideoEnabled: boolean;
|
|
42
|
-
constructor({ displayName, id, stream, isAudioEnabled, isVideoEnabled }: RoomParticipantData);
|
|
43
|
-
}
|
|
44
|
-
type StreamState = "new_accept" | "to_accept" | "old_accept" | "done_accept" | "to_unaccept" | "done_unaccept" | "auto";
|
|
45
|
-
interface Stream {
|
|
46
|
-
id: string;
|
|
47
|
-
state: StreamState;
|
|
48
|
-
}
|
|
49
|
-
interface RemoteParticipant {
|
|
50
|
-
id: string;
|
|
51
|
-
displayName: string;
|
|
52
|
-
isAudioEnabled: boolean;
|
|
53
|
-
isVideoEnabled: boolean;
|
|
54
|
-
isLocalParticipant: boolean;
|
|
55
|
-
stream: (MediaStream & {
|
|
56
|
-
inboundId?: string;
|
|
57
|
-
}) | null;
|
|
58
|
-
streams: Stream[];
|
|
59
|
-
newJoiner: boolean;
|
|
60
|
-
presentationStream: (MediaStream & {
|
|
61
|
-
inboundId?: string;
|
|
62
|
-
}) | null;
|
|
63
|
-
}
|
|
64
|
-
declare class LocalParticipant extends RoomParticipant {
|
|
65
|
-
readonly isLocalParticipant = true;
|
|
66
|
-
constructor({ displayName, id, stream, isAudioEnabled, isVideoEnabled }: RoomParticipantData);
|
|
67
|
-
}
|
|
68
|
-
interface WaitingParticipant {
|
|
69
|
-
id: string;
|
|
70
|
-
displayName: string | null;
|
|
71
|
-
}
|
|
72
|
-
interface Screenshare {
|
|
73
|
-
participantId: string;
|
|
74
|
-
id: string;
|
|
75
|
-
hasAudioTrack: boolean;
|
|
76
|
-
stream?: MediaStream;
|
|
77
|
-
isLocal: boolean;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
28
|
type Json = string | number | boolean | null | Array<Json> | {
|
|
81
29
|
[key: string]: Json;
|
|
82
30
|
};
|
|
@@ -497,6 +445,65 @@ declare class OrganizationService {
|
|
|
497
445
|
}): Promise<undefined>;
|
|
498
446
|
}
|
|
499
447
|
|
|
448
|
+
interface RoomParticipantData {
|
|
449
|
+
displayName: string;
|
|
450
|
+
id: string;
|
|
451
|
+
stream?: MediaStream;
|
|
452
|
+
isAudioEnabled: boolean;
|
|
453
|
+
isVideoEnabled: boolean;
|
|
454
|
+
}
|
|
455
|
+
declare class RoomParticipant {
|
|
456
|
+
readonly displayName: string;
|
|
457
|
+
readonly id: string;
|
|
458
|
+
readonly stream?: MediaStream;
|
|
459
|
+
readonly isAudioEnabled: boolean;
|
|
460
|
+
readonly isLocalParticipant: boolean;
|
|
461
|
+
readonly isVideoEnabled: boolean;
|
|
462
|
+
constructor({ displayName, id, stream, isAudioEnabled, isVideoEnabled }: RoomParticipantData);
|
|
463
|
+
}
|
|
464
|
+
type StreamState = "new_accept" | "to_accept" | "old_accept" | "done_accept" | "to_unaccept" | "done_unaccept" | "auto";
|
|
465
|
+
interface Stream {
|
|
466
|
+
id: string;
|
|
467
|
+
state: StreamState;
|
|
468
|
+
}
|
|
469
|
+
interface RemoteParticipant {
|
|
470
|
+
id: string;
|
|
471
|
+
displayName: string;
|
|
472
|
+
isAudioEnabled: boolean;
|
|
473
|
+
isVideoEnabled: boolean;
|
|
474
|
+
isLocalParticipant: boolean;
|
|
475
|
+
stream: (MediaStream & {
|
|
476
|
+
inboundId?: string;
|
|
477
|
+
}) | null;
|
|
478
|
+
streams: Stream[];
|
|
479
|
+
newJoiner: boolean;
|
|
480
|
+
presentationStream: (MediaStream & {
|
|
481
|
+
inboundId?: string;
|
|
482
|
+
}) | null;
|
|
483
|
+
}
|
|
484
|
+
declare class LocalParticipant extends RoomParticipant {
|
|
485
|
+
readonly isLocalParticipant = true;
|
|
486
|
+
constructor({ displayName, id, stream, isAudioEnabled, isVideoEnabled }: RoomParticipantData);
|
|
487
|
+
}
|
|
488
|
+
interface WaitingParticipant {
|
|
489
|
+
id: string;
|
|
490
|
+
displayName: string | null;
|
|
491
|
+
}
|
|
492
|
+
interface Screenshare {
|
|
493
|
+
participantId: string;
|
|
494
|
+
id: string;
|
|
495
|
+
hasAudioTrack: boolean;
|
|
496
|
+
stream?: MediaStream;
|
|
497
|
+
isLocal: boolean;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
/**
|
|
501
|
+
* Reducer
|
|
502
|
+
*/
|
|
503
|
+
interface WaitingParticipantsState {
|
|
504
|
+
waitingParticipants: WaitingParticipant[];
|
|
505
|
+
}
|
|
506
|
+
|
|
500
507
|
/**
|
|
501
508
|
* Reducer
|
|
502
509
|
*/
|
|
@@ -566,6 +573,34 @@ interface DeviceCredentialsState {
|
|
|
566
573
|
data?: Credentials | null;
|
|
567
574
|
}
|
|
568
575
|
|
|
576
|
+
type LocalMediaOptions = {
|
|
577
|
+
disabled?: boolean;
|
|
578
|
+
audio: boolean;
|
|
579
|
+
video: boolean;
|
|
580
|
+
};
|
|
581
|
+
/**
|
|
582
|
+
* Reducer
|
|
583
|
+
*/
|
|
584
|
+
interface LocalMediaState$1 {
|
|
585
|
+
busyDeviceIds: string[];
|
|
586
|
+
cameraDeviceError?: unknown;
|
|
587
|
+
cameraEnabled: boolean;
|
|
588
|
+
currentCameraDeviceId?: string;
|
|
589
|
+
currentMicrophoneDeviceId?: string;
|
|
590
|
+
devices: MediaDeviceInfo[];
|
|
591
|
+
isSettingCameraDevice: boolean;
|
|
592
|
+
isSettingMicrophoneDevice: boolean;
|
|
593
|
+
isTogglingCamera: boolean;
|
|
594
|
+
microphoneDeviceError?: unknown;
|
|
595
|
+
microphoneEnabled: boolean;
|
|
596
|
+
options?: LocalMediaOptions;
|
|
597
|
+
status: "" | "stopped" | "starting" | "started" | "error";
|
|
598
|
+
startError?: unknown;
|
|
599
|
+
stream?: MediaStream;
|
|
600
|
+
isSwitchingStream: boolean;
|
|
601
|
+
onDeviceChange?: () => void;
|
|
602
|
+
}
|
|
603
|
+
|
|
569
604
|
/**
|
|
570
605
|
* Reducer
|
|
571
606
|
*/
|
|
@@ -697,40 +732,7 @@ declare const createStore: ({ preloadedState, injectServices, }: {
|
|
|
697
732
|
}, {}>, redux.StoreEnhancer<{}, {}>]>>;
|
|
698
733
|
type Store = ReturnType<typeof createStore>;
|
|
699
734
|
|
|
700
|
-
|
|
701
|
-
* Reducer
|
|
702
|
-
*/
|
|
703
|
-
interface WaitingParticipantsState {
|
|
704
|
-
waitingParticipants: WaitingParticipant[];
|
|
705
|
-
}
|
|
706
|
-
|
|
707
|
-
type LocalMediaOptions = {
|
|
708
|
-
disabled?: boolean;
|
|
709
|
-
audio: boolean;
|
|
710
|
-
video: boolean;
|
|
711
|
-
};
|
|
712
|
-
/**
|
|
713
|
-
* Reducer
|
|
714
|
-
*/
|
|
715
|
-
interface LocalMediaState$1 {
|
|
716
|
-
busyDeviceIds: string[];
|
|
717
|
-
cameraDeviceError?: unknown;
|
|
718
|
-
cameraEnabled: boolean;
|
|
719
|
-
currentCameraDeviceId?: string;
|
|
720
|
-
currentMicrophoneDeviceId?: string;
|
|
721
|
-
devices: MediaDeviceInfo[];
|
|
722
|
-
isSettingCameraDevice: boolean;
|
|
723
|
-
isSettingMicrophoneDevice: boolean;
|
|
724
|
-
isTogglingCamera: boolean;
|
|
725
|
-
microphoneDeviceError?: unknown;
|
|
726
|
-
microphoneEnabled: boolean;
|
|
727
|
-
options?: LocalMediaOptions;
|
|
728
|
-
status: "" | "stopped" | "starting" | "started" | "error";
|
|
729
|
-
startError?: unknown;
|
|
730
|
-
stream?: MediaStream;
|
|
731
|
-
isSwitchingStream: boolean;
|
|
732
|
-
onDeviceChange?: () => void;
|
|
733
|
-
}
|
|
735
|
+
declare const sdkVersion = "__SDK_VERSION__";
|
|
734
736
|
|
|
735
737
|
interface LocalMediaState {
|
|
736
738
|
currentCameraDeviceId?: string;
|
|
@@ -855,6 +857,4 @@ interface GridProps {
|
|
|
855
857
|
}
|
|
856
858
|
declare function Grid({ roomConnection, renderParticipant, videoGridGap }: GridProps): React$1.JSX.Element;
|
|
857
859
|
|
|
858
|
-
declare const sdkVersion = "__SDK_VERSION__";
|
|
859
|
-
|
|
860
860
|
export { type ChatMessageState as ChatMessage, type LocalParticipantState as LocalParticipant, type RemoteParticipantState as RemoteParticipant, type RoomConnectionState as RoomConnection, type ScreenshareState as Screenshare, type UseLocalMediaResult, Grid as VideoGrid, _default as VideoView, type WaitingParticipantState as WaitingParticipant, sdkVersion, useLocalMedia, useRoomConnection };
|
package/dist/react/index.esm.js
CHANGED
|
@@ -9631,7 +9631,7 @@ const selectRoomConnectionState = createSelector(selectChatMessages, selectCloud
|
|
|
9631
9631
|
return state;
|
|
9632
9632
|
});
|
|
9633
9633
|
|
|
9634
|
-
const sdkVersion = "2.1.0-
|
|
9634
|
+
const sdkVersion = "2.1.0-beta4";
|
|
9635
9635
|
|
|
9636
9636
|
const initialState$1 = {
|
|
9637
9637
|
chatMessages: [],
|
|
@@ -10479,7 +10479,9 @@ function GridVideoCellView({ cell, participant, render, onSetAspectRatio, onResi
|
|
|
10479
10479
|
boxSizing: "border-box",
|
|
10480
10480
|
top: cell.origin.top,
|
|
10481
10481
|
left: cell.origin.left,
|
|
10482
|
-
} }, render ? (render()) : participant.stream ? (React.createElement(VideoView, { stream: participant.stream, onSetAspectRatio: ({ aspectRatio }) => handleAspectRatioChange({ ar: aspectRatio }),
|
|
10482
|
+
} }, render ? (render()) : participant.stream ? (React.createElement(VideoView, { stream: participant.stream, onSetAspectRatio: ({ aspectRatio }) => handleAspectRatioChange({ ar: aspectRatio }),
|
|
10483
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
10484
|
+
onResize: onResize })) : null));
|
|
10483
10485
|
}
|
|
10484
10486
|
function Grid({ roomConnection, renderParticipant, videoGridGap = 0 }) {
|
|
10485
10487
|
const { remoteParticipants, localParticipant } = roomConnection.state;
|