@fishjam-cloud/js-server-sdk 0.17.0 → 0.19.0
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/index.d.mts +10 -14
- package/dist/index.d.ts +10 -14
- package/dist/index.js +10 -8
- package/dist/index.mjs +10 -8
- package/package.json +3 -3
package/dist/index.d.mts
CHANGED
|
@@ -89,19 +89,13 @@ interface RoomConfig {
|
|
|
89
89
|
*/
|
|
90
90
|
'maxPeers'?: number | null;
|
|
91
91
|
/**
|
|
92
|
-
*
|
|
93
|
-
* @type {
|
|
94
|
-
* @memberof RoomConfig
|
|
95
|
-
*/
|
|
96
|
-
'peerDisconnectedTimeout'?: number | null;
|
|
97
|
-
/**
|
|
98
|
-
* Duration (in seconds) after which the room will be removed if no peers are connected. If not provided, this feature is disabled.
|
|
99
|
-
* @type {number}
|
|
92
|
+
* True if livestream viewers can omit specifying a token.
|
|
93
|
+
* @type {boolean}
|
|
100
94
|
* @memberof RoomConfig
|
|
101
95
|
*/
|
|
102
|
-
'
|
|
96
|
+
'public'?: boolean;
|
|
103
97
|
/**
|
|
104
|
-
* The use-case of the room. If not provided, this defaults to
|
|
98
|
+
* The use-case of the room. If not provided, this defaults to conference.
|
|
105
99
|
* @type {string}
|
|
106
100
|
* @memberof RoomConfig
|
|
107
101
|
*/
|
|
@@ -123,6 +117,8 @@ declare const RoomConfigRoomTypeEnum: {
|
|
|
123
117
|
readonly FullFeature: "full_feature";
|
|
124
118
|
readonly AudioOnly: "audio_only";
|
|
125
119
|
readonly Broadcaster: "broadcaster";
|
|
120
|
+
readonly Livestream: "livestream";
|
|
121
|
+
readonly Conference: "conference";
|
|
126
122
|
};
|
|
127
123
|
type RoomConfigRoomTypeEnum = typeof RoomConfigRoomTypeEnum[keyof typeof RoomConfigRoomTypeEnum];
|
|
128
124
|
declare const RoomConfigVideoCodecEnum: {
|
|
@@ -171,7 +167,7 @@ interface ViewerToken {
|
|
|
171
167
|
* @type {string}
|
|
172
168
|
* @memberof ViewerToken
|
|
173
169
|
*/
|
|
174
|
-
'token'
|
|
170
|
+
'token': string;
|
|
175
171
|
}
|
|
176
172
|
|
|
177
173
|
type EventMap = {
|
|
@@ -316,10 +312,10 @@ declare class FishjamClient {
|
|
|
316
312
|
*/
|
|
317
313
|
refreshPeerToken(roomId: RoomId, peerId: PeerId): Promise<string>;
|
|
318
314
|
/**
|
|
319
|
-
* Creates a
|
|
320
|
-
* @returns a
|
|
315
|
+
* Creates a livestream viewer token for the given room.
|
|
316
|
+
* @returns a livestream viewer token
|
|
321
317
|
*/
|
|
322
|
-
|
|
318
|
+
createLivestreamViewerToken(roomId: RoomId): Promise<ViewerToken>;
|
|
323
319
|
}
|
|
324
320
|
|
|
325
321
|
declare class FishjamBaseException extends Error {
|
package/dist/index.d.ts
CHANGED
|
@@ -89,19 +89,13 @@ interface RoomConfig {
|
|
|
89
89
|
*/
|
|
90
90
|
'maxPeers'?: number | null;
|
|
91
91
|
/**
|
|
92
|
-
*
|
|
93
|
-
* @type {
|
|
94
|
-
* @memberof RoomConfig
|
|
95
|
-
*/
|
|
96
|
-
'peerDisconnectedTimeout'?: number | null;
|
|
97
|
-
/**
|
|
98
|
-
* Duration (in seconds) after which the room will be removed if no peers are connected. If not provided, this feature is disabled.
|
|
99
|
-
* @type {number}
|
|
92
|
+
* True if livestream viewers can omit specifying a token.
|
|
93
|
+
* @type {boolean}
|
|
100
94
|
* @memberof RoomConfig
|
|
101
95
|
*/
|
|
102
|
-
'
|
|
96
|
+
'public'?: boolean;
|
|
103
97
|
/**
|
|
104
|
-
* The use-case of the room. If not provided, this defaults to
|
|
98
|
+
* The use-case of the room. If not provided, this defaults to conference.
|
|
105
99
|
* @type {string}
|
|
106
100
|
* @memberof RoomConfig
|
|
107
101
|
*/
|
|
@@ -123,6 +117,8 @@ declare const RoomConfigRoomTypeEnum: {
|
|
|
123
117
|
readonly FullFeature: "full_feature";
|
|
124
118
|
readonly AudioOnly: "audio_only";
|
|
125
119
|
readonly Broadcaster: "broadcaster";
|
|
120
|
+
readonly Livestream: "livestream";
|
|
121
|
+
readonly Conference: "conference";
|
|
126
122
|
};
|
|
127
123
|
type RoomConfigRoomTypeEnum = typeof RoomConfigRoomTypeEnum[keyof typeof RoomConfigRoomTypeEnum];
|
|
128
124
|
declare const RoomConfigVideoCodecEnum: {
|
|
@@ -171,7 +167,7 @@ interface ViewerToken {
|
|
|
171
167
|
* @type {string}
|
|
172
168
|
* @memberof ViewerToken
|
|
173
169
|
*/
|
|
174
|
-
'token'
|
|
170
|
+
'token': string;
|
|
175
171
|
}
|
|
176
172
|
|
|
177
173
|
type EventMap = {
|
|
@@ -316,10 +312,10 @@ declare class FishjamClient {
|
|
|
316
312
|
*/
|
|
317
313
|
refreshPeerToken(roomId: RoomId, peerId: PeerId): Promise<string>;
|
|
318
314
|
/**
|
|
319
|
-
* Creates a
|
|
320
|
-
* @returns a
|
|
315
|
+
* Creates a livestream viewer token for the given room.
|
|
316
|
+
* @returns a livestream viewer token
|
|
321
317
|
*/
|
|
322
|
-
|
|
318
|
+
createLivestreamViewerToken(roomId: RoomId): Promise<ViewerToken>;
|
|
323
319
|
}
|
|
324
320
|
|
|
325
321
|
declare class FishjamBaseException extends Error {
|
package/dist/index.js
CHANGED
|
@@ -14087,7 +14087,9 @@ var require_dist = __commonJS({
|
|
|
14087
14087
|
var RoomConfigRoomTypeEnum2 = {
|
|
14088
14088
|
FullFeature: "full_feature",
|
|
14089
14089
|
AudioOnly: "audio_only",
|
|
14090
|
-
Broadcaster: "broadcaster"
|
|
14090
|
+
Broadcaster: "broadcaster",
|
|
14091
|
+
Livestream: "livestream",
|
|
14092
|
+
Conference: "conference"
|
|
14091
14093
|
};
|
|
14092
14094
|
var RoomConfigVideoCodecEnum2 = {
|
|
14093
14095
|
H264: "h264",
|
|
@@ -15697,7 +15699,7 @@ var require_dist = __commonJS({
|
|
|
15697
15699
|
return {
|
|
15698
15700
|
/**
|
|
15699
15701
|
*
|
|
15700
|
-
* @summary Generate single
|
|
15702
|
+
* @summary Generate single livestream access token
|
|
15701
15703
|
* @param {string} roomId A room id.
|
|
15702
15704
|
* @param {*} [options] Override http request option.
|
|
15703
15705
|
* @throws {RequiredError}
|
|
@@ -15728,7 +15730,7 @@ var require_dist = __commonJS({
|
|
|
15728
15730
|
return {
|
|
15729
15731
|
/**
|
|
15730
15732
|
*
|
|
15731
|
-
* @summary Generate single
|
|
15733
|
+
* @summary Generate single livestream access token
|
|
15732
15734
|
* @param {string} roomId A room id.
|
|
15733
15735
|
* @param {*} [options] Override http request option.
|
|
15734
15736
|
* @throws {RequiredError}
|
|
@@ -15746,7 +15748,7 @@ var require_dist = __commonJS({
|
|
|
15746
15748
|
return {
|
|
15747
15749
|
/**
|
|
15748
15750
|
*
|
|
15749
|
-
* @summary Generate single
|
|
15751
|
+
* @summary Generate single livestream access token
|
|
15750
15752
|
* @param {string} roomId A room id.
|
|
15751
15753
|
* @param {*} [options] Override http request option.
|
|
15752
15754
|
* @throws {RequiredError}
|
|
@@ -15759,7 +15761,7 @@ var require_dist = __commonJS({
|
|
|
15759
15761
|
var ViewerApi2 = class extends BaseAPI {
|
|
15760
15762
|
/**
|
|
15761
15763
|
*
|
|
15762
|
-
* @summary Generate single
|
|
15764
|
+
* @summary Generate single livestream access token
|
|
15763
15765
|
* @param {string} roomId A room id.
|
|
15764
15766
|
* @param {*} [options] Override http request option.
|
|
15765
15767
|
* @throws {RequiredError}
|
|
@@ -18797,10 +18799,10 @@ var FishjamClient = class {
|
|
|
18797
18799
|
}
|
|
18798
18800
|
}
|
|
18799
18801
|
/**
|
|
18800
|
-
* Creates a
|
|
18801
|
-
* @returns a
|
|
18802
|
+
* Creates a livestream viewer token for the given room.
|
|
18803
|
+
* @returns a livestream viewer token
|
|
18802
18804
|
*/
|
|
18803
|
-
async
|
|
18805
|
+
async createLivestreamViewerToken(roomId) {
|
|
18804
18806
|
try {
|
|
18805
18807
|
const tokenResponse = await this.viewerApi.generateToken(roomId);
|
|
18806
18808
|
return tokenResponse.data;
|
package/dist/index.mjs
CHANGED
|
@@ -14062,7 +14062,9 @@ var require_dist = __commonJS({
|
|
|
14062
14062
|
var RoomConfigRoomTypeEnum2 = {
|
|
14063
14063
|
FullFeature: "full_feature",
|
|
14064
14064
|
AudioOnly: "audio_only",
|
|
14065
|
-
Broadcaster: "broadcaster"
|
|
14065
|
+
Broadcaster: "broadcaster",
|
|
14066
|
+
Livestream: "livestream",
|
|
14067
|
+
Conference: "conference"
|
|
14066
14068
|
};
|
|
14067
14069
|
var RoomConfigVideoCodecEnum2 = {
|
|
14068
14070
|
H264: "h264",
|
|
@@ -15672,7 +15674,7 @@ var require_dist = __commonJS({
|
|
|
15672
15674
|
return {
|
|
15673
15675
|
/**
|
|
15674
15676
|
*
|
|
15675
|
-
* @summary Generate single
|
|
15677
|
+
* @summary Generate single livestream access token
|
|
15676
15678
|
* @param {string} roomId A room id.
|
|
15677
15679
|
* @param {*} [options] Override http request option.
|
|
15678
15680
|
* @throws {RequiredError}
|
|
@@ -15703,7 +15705,7 @@ var require_dist = __commonJS({
|
|
|
15703
15705
|
return {
|
|
15704
15706
|
/**
|
|
15705
15707
|
*
|
|
15706
|
-
* @summary Generate single
|
|
15708
|
+
* @summary Generate single livestream access token
|
|
15707
15709
|
* @param {string} roomId A room id.
|
|
15708
15710
|
* @param {*} [options] Override http request option.
|
|
15709
15711
|
* @throws {RequiredError}
|
|
@@ -15721,7 +15723,7 @@ var require_dist = __commonJS({
|
|
|
15721
15723
|
return {
|
|
15722
15724
|
/**
|
|
15723
15725
|
*
|
|
15724
|
-
* @summary Generate single
|
|
15726
|
+
* @summary Generate single livestream access token
|
|
15725
15727
|
* @param {string} roomId A room id.
|
|
15726
15728
|
* @param {*} [options] Override http request option.
|
|
15727
15729
|
* @throws {RequiredError}
|
|
@@ -15734,7 +15736,7 @@ var require_dist = __commonJS({
|
|
|
15734
15736
|
var ViewerApi2 = class extends BaseAPI {
|
|
15735
15737
|
/**
|
|
15736
15738
|
*
|
|
15737
|
-
* @summary Generate single
|
|
15739
|
+
* @summary Generate single livestream access token
|
|
15738
15740
|
* @param {string} roomId A room id.
|
|
15739
15741
|
* @param {*} [options] Override http request option.
|
|
15740
15742
|
* @throws {RequiredError}
|
|
@@ -16082,10 +16084,10 @@ var FishjamClient = class {
|
|
|
16082
16084
|
}
|
|
16083
16085
|
}
|
|
16084
16086
|
/**
|
|
16085
|
-
* Creates a
|
|
16086
|
-
* @returns a
|
|
16087
|
+
* Creates a livestream viewer token for the given room.
|
|
16088
|
+
* @returns a livestream viewer token
|
|
16087
16089
|
*/
|
|
16088
|
-
async
|
|
16090
|
+
async createLivestreamViewerToken(roomId) {
|
|
16089
16091
|
try {
|
|
16090
16092
|
const tokenResponse = await this.viewerApi.generateToken(roomId);
|
|
16091
16093
|
return tokenResponse.data;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fishjam-cloud/js-server-sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.19.0",
|
|
4
4
|
"description": "Fishjam server SDK for JavaScript",
|
|
5
5
|
"homepage": "https://github.com/fishjam-cloud/js-server-sdk",
|
|
6
6
|
"author": "Fishjam Team",
|
|
@@ -56,8 +56,8 @@
|
|
|
56
56
|
"websocket": "^1.0.35"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
|
-
"@fishjam-cloud/fishjam-openapi": "0.
|
|
60
|
-
"@fishjam-cloud/fishjam-proto": "0.
|
|
59
|
+
"@fishjam-cloud/fishjam-openapi": "0.19.0",
|
|
60
|
+
"@fishjam-cloud/fishjam-proto": "0.19.0",
|
|
61
61
|
"@openapitools/openapi-generator-cli": "^2.18.4",
|
|
62
62
|
"@types/node": "^22.13.16",
|
|
63
63
|
"@types/websocket": "^1.0.10",
|