@stream-io/video-client 0.1.1 → 0.1.2
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/CHANGELOG.md +7 -0
- package/dist/index.browser.es.js +29 -22
- package/dist/index.browser.es.js.map +1 -1
- package/dist/index.cjs.js +29 -21
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +29 -22
- package/dist/index.es.js.map +1 -1
- package/dist/src/StreamVideoClient.d.ts +8 -25
- package/dist/src/StreamVideoServerClient.d.ts +23 -0
- package/dist/src/__tests__/StreamVideoServerClient.test.d.ts +1 -0
- package/dist/src/coordinator/connection/client.d.ts +1 -1
- package/dist/version.d.ts +1 -1
- package/index.ts +1 -0
- package/package.json +2 -1
- package/src/StreamVideoClient.ts +5 -55
- package/src/StreamVideoServerClient.ts +59 -0
- package/src/__tests__/StreamVideoServerClient.test.ts +88 -0
- package/src/coordinator/connection/client.ts +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
### [0.1.2](https://github.com/GetStream/stream-video-js/compare/client0.1.1...client0.1.2) (2023-07-19)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* server-side client ([#815](https://github.com/GetStream/stream-video-js/issues/815)) ([c3bc445](https://github.com/GetStream/stream-video-js/commit/c3bc445c7db68965934c3e72f005ff7e949e9328))
|
|
11
|
+
|
|
5
12
|
### [0.1.1](https://github.com/GetStream/stream-video-js/compare/client0.1.0...client0.1.1) (2023-07-18)
|
|
6
13
|
|
|
7
14
|
|
package/dist/index.browser.es.js
CHANGED
|
@@ -11317,7 +11317,7 @@ class WSConnectionFallback {
|
|
|
11317
11317
|
}
|
|
11318
11318
|
}
|
|
11319
11319
|
|
|
11320
|
-
const version = '0.1.
|
|
11320
|
+
const version = '0.1.2';
|
|
11321
11321
|
|
|
11322
11322
|
const logger = getLogger(['location']);
|
|
11323
11323
|
const HINT_URL = `https://hint.stream-io-video.com/`;
|
|
@@ -11908,10 +11908,12 @@ class StreamClient {
|
|
|
11908
11908
|
keepAliveMsecs: 3000,
|
|
11909
11909
|
});
|
|
11910
11910
|
}
|
|
11911
|
-
this.connectionIdPromise =
|
|
11912
|
-
|
|
11913
|
-
|
|
11914
|
-
|
|
11911
|
+
this.connectionIdPromise = this.secret
|
|
11912
|
+
? undefined
|
|
11913
|
+
: new Promise((resolve, reject) => {
|
|
11914
|
+
this.resolveConnectionId = resolve;
|
|
11915
|
+
this.rejectConnectionId = reject;
|
|
11916
|
+
});
|
|
11915
11917
|
this.setBaseURL(this.options.baseURL || 'https://video.stream-io-api.com/video');
|
|
11916
11918
|
if (typeof process !== 'undefined' && process.env.STREAM_LOCAL_TEST_RUN) {
|
|
11917
11919
|
this.setBaseURL('http://localhost:3030/video');
|
|
@@ -12044,22 +12046,6 @@ class StreamVideoClient {
|
|
|
12044
12046
|
this.edges = () => __awaiter(this, void 0, void 0, function* () {
|
|
12045
12047
|
return this.streamClient.get(`/edges`);
|
|
12046
12048
|
});
|
|
12047
|
-
// server-side only endpoints
|
|
12048
|
-
this.createCallType = (data) => __awaiter(this, void 0, void 0, function* () {
|
|
12049
|
-
return this.streamClient.post(`/calltypes`, data);
|
|
12050
|
-
});
|
|
12051
|
-
this.getCallType = (name) => __awaiter(this, void 0, void 0, function* () {
|
|
12052
|
-
return this.streamClient.get(`/calltypes/${name}`);
|
|
12053
|
-
});
|
|
12054
|
-
this.updateCallType = (name, data) => __awaiter(this, void 0, void 0, function* () {
|
|
12055
|
-
return this.streamClient.put(`/calltypes/${name}`, data);
|
|
12056
|
-
});
|
|
12057
|
-
this.deleteCallType = (name) => __awaiter(this, void 0, void 0, function* () {
|
|
12058
|
-
return this.streamClient.delete(`/calltypes/${name}`);
|
|
12059
|
-
});
|
|
12060
|
-
this.listCallTypes = () => __awaiter(this, void 0, void 0, function* () {
|
|
12061
|
-
return this.streamClient.get(`/calltypes`);
|
|
12062
|
-
});
|
|
12063
12049
|
/**
|
|
12064
12050
|
* addDevice - Adds a push device for a user.
|
|
12065
12051
|
*
|
|
@@ -12279,6 +12265,27 @@ class StreamVideoClient {
|
|
|
12279
12265
|
return yield this.addDevice(id, push_provider, push_provider_name, userID, true);
|
|
12280
12266
|
});
|
|
12281
12267
|
}
|
|
12268
|
+
}
|
|
12269
|
+
|
|
12270
|
+
class StreamVideoServerClient extends StreamVideoClient {
|
|
12271
|
+
constructor(apiKey, options) {
|
|
12272
|
+
super({ apiKey, options });
|
|
12273
|
+
this.getCallTypes = () => {
|
|
12274
|
+
return this.streamClient.get('/calltypes');
|
|
12275
|
+
};
|
|
12276
|
+
this.getCallType = (name) => {
|
|
12277
|
+
return this.streamClient.get(`/calltypes/${name}`);
|
|
12278
|
+
};
|
|
12279
|
+
this.createCallType = (data) => {
|
|
12280
|
+
return this.streamClient.post('/calltypes', data);
|
|
12281
|
+
};
|
|
12282
|
+
this.deleteCallType = (name) => {
|
|
12283
|
+
return this.streamClient.delete(`/calltypes/${name}`);
|
|
12284
|
+
};
|
|
12285
|
+
this.updateCallType = (name, data) => {
|
|
12286
|
+
return this.streamClient.put(`/calltypes/${name}`, data);
|
|
12287
|
+
};
|
|
12288
|
+
}
|
|
12282
12289
|
/**
|
|
12283
12290
|
* createToken - Creates a token to authenticate this user. This function is used server side.
|
|
12284
12291
|
* The resulting token should be passed to the client side when the users register or logs in.
|
|
@@ -12628,5 +12635,5 @@ var browsers = /*#__PURE__*/Object.freeze({
|
|
|
12628
12635
|
isSafari: isSafari
|
|
12629
12636
|
});
|
|
12630
12637
|
|
|
12631
|
-
export { AudioSettingsDefaultDeviceEnum, AudioSettingsRequestDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CreateDeviceRequestPushProviderEnum, DebounceType, ErrorFromResponse, OwnCapability, RecordSettingsModeEnum, RecordSettingsQualityEnum, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, events as SfuEvents, models as SfuModels, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoWriteableStateStore, TranscriptionSettingsModeEnum, TranscriptionSettingsRequestModeEnum, VideoSettingsCameraFacingEnum, VideoSettingsRequestCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, disposeOfMediaStream, dominantSpeaker, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceInfo, getLogger, getOSInfo, getScreenShareStream, getSdkInfo, getVideoDevices, getVideoStream, isStreamVideoLocalParticipant, livestreamOrAudioRoomSortPreset, logLevels, logToConsole, name, noopComparator, pinned, publishingAudio, publishingVideo, reactionType, role, screenSharing, setDeviceInfo, setLogLevel, setLogger, setOSInfo, setSdkInfo, speakerLayoutSortPreset, speaking, watchForAddedDefaultAudioDevice, watchForAddedDefaultAudioOutputDevice, watchForAddedDefaultVideoDevice, watchForDisconnectedAudioDevice, watchForDisconnectedAudioOutputDevice, watchForDisconnectedVideoDevice };
|
|
12638
|
+
export { AudioSettingsDefaultDeviceEnum, AudioSettingsRequestDefaultDeviceEnum, browsers as Browsers, Call, CallState, CallType, CallTypes, CallingState, CreateDeviceRequestPushProviderEnum, DebounceType, ErrorFromResponse, OwnCapability, RecordSettingsModeEnum, RecordSettingsQualityEnum, RecordSettingsRequestModeEnum, RecordSettingsRequestQualityEnum, rxUtils as RxUtils, events as SfuEvents, models as SfuModels, StreamSfuClient, StreamVideoClient, StreamVideoReadOnlyStateStore, StreamVideoServerClient, StreamVideoWriteableStateStore, TranscriptionSettingsModeEnum, TranscriptionSettingsRequestModeEnum, VideoSettingsCameraFacingEnum, VideoSettingsRequestCameraFacingEnum, ViewportTracker, VisibilityState, checkIfAudioOutputChangeSupported, combineComparators, conditional, createSoundDetector, defaultSortPreset, descending, disposeOfMediaStream, dominantSpeaker, getAudioDevices, getAudioOutputDevices, getAudioStream, getClientDetails, getDeviceInfo, getLogger, getOSInfo, getScreenShareStream, getSdkInfo, getVideoDevices, getVideoStream, isStreamVideoLocalParticipant, livestreamOrAudioRoomSortPreset, logLevels, logToConsole, name, noopComparator, pinned, publishingAudio, publishingVideo, reactionType, role, screenSharing, setDeviceInfo, setLogLevel, setLogger, setOSInfo, setSdkInfo, speakerLayoutSortPreset, speaking, watchForAddedDefaultAudioDevice, watchForAddedDefaultAudioOutputDevice, watchForAddedDefaultVideoDevice, watchForDisconnectedAudioDevice, watchForDisconnectedAudioOutputDevice, watchForDisconnectedVideoDevice };
|
|
12632
12639
|
//# sourceMappingURL=index.browser.es.js.map
|