@fishjam-cloud/js-server-sdk 0.23.0 → 0.25.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/chunk-QK3SKSR4.mjs +123 -0
- package/dist/index.d.mts +131 -76
- package/dist/index.d.ts +131 -76
- package/dist/index.js +547 -55
- package/dist/index.mjs +465 -57
- package/dist/integrations/gemini.js +6 -1
- package/dist/integrations/gemini.mjs +3 -82
- package/package.json +8 -3
- package/dist/chunk-6DZX6EAA.mjs +0 -37
package/dist/index.js
CHANGED
|
@@ -10787,19 +10787,16 @@ var require_dist = __commonJS({
|
|
|
10787
10787
|
});
|
|
10788
10788
|
var index_exports2 = {};
|
|
10789
10789
|
__export2(index_exports2, {
|
|
10790
|
+
AudioFormat: () => AudioFormat,
|
|
10791
|
+
AudioSampleRate: () => AudioSampleRate,
|
|
10790
10792
|
Configuration: () => Configuration,
|
|
10791
|
-
PeerOptionsAgentOutputAudioFormatEnum: () => PeerOptionsAgentOutputAudioFormatEnum,
|
|
10792
|
-
PeerOptionsAgentOutputAudioSampleRateEnum: () => PeerOptionsAgentOutputAudioSampleRateEnum,
|
|
10793
|
-
PeerOptionsAgentSubscribeModeEnum: () => PeerOptionsAgentSubscribeModeEnum,
|
|
10794
|
-
PeerOptionsWebRTCSubscribeModeEnum: () => PeerOptionsWebRTCSubscribeModeEnum,
|
|
10795
10793
|
PeerStatus: () => PeerStatus2,
|
|
10796
10794
|
PeerType: () => PeerType,
|
|
10797
10795
|
RoomApi: () => RoomApi2,
|
|
10798
10796
|
RoomApiAxiosParamCreator: () => RoomApiAxiosParamCreator,
|
|
10799
10797
|
RoomApiFactory: () => RoomApiFactory,
|
|
10800
10798
|
RoomApiFp: () => RoomApiFp,
|
|
10801
|
-
|
|
10802
|
-
RoomConfigVideoCodecEnum: () => RoomConfigVideoCodecEnum2,
|
|
10799
|
+
RoomType: () => RoomType2,
|
|
10803
10800
|
StreamApi: () => StreamApi,
|
|
10804
10801
|
StreamApiAxiosParamCreator: () => StreamApiAxiosParamCreator,
|
|
10805
10802
|
StreamApiFactory: () => StreamApiFactory,
|
|
@@ -10810,7 +10807,8 @@ var require_dist = __commonJS({
|
|
|
10810
10807
|
StreamerApiFp: () => StreamerApiFp,
|
|
10811
10808
|
StreamerStatusEnum: () => StreamerStatusEnum,
|
|
10812
10809
|
SubscribeMode: () => SubscribeMode,
|
|
10813
|
-
|
|
10810
|
+
TrackType: () => TrackType,
|
|
10811
|
+
VideoCodec: () => VideoCodec2,
|
|
10814
10812
|
ViewerApi: () => ViewerApi2,
|
|
10815
10813
|
ViewerApiAxiosParamCreator: () => ViewerApiAxiosParamCreator,
|
|
10816
10814
|
ViewerApiFactory: () => ViewerApiFactory,
|
|
@@ -14055,21 +14053,13 @@ var require_dist = __commonJS({
|
|
|
14055
14053
|
return axios22.request(axiosRequestArgs);
|
|
14056
14054
|
};
|
|
14057
14055
|
};
|
|
14058
|
-
var
|
|
14059
|
-
Auto: "auto",
|
|
14060
|
-
Manual: "manual"
|
|
14061
|
-
};
|
|
14062
|
-
var PeerOptionsAgentOutputAudioFormatEnum = {
|
|
14056
|
+
var AudioFormat = {
|
|
14063
14057
|
Pcm16: "pcm16"
|
|
14064
14058
|
};
|
|
14065
|
-
var
|
|
14059
|
+
var AudioSampleRate = {
|
|
14066
14060
|
NUMBER_16000: 16e3,
|
|
14067
14061
|
NUMBER_24000: 24e3
|
|
14068
14062
|
};
|
|
14069
|
-
var PeerOptionsWebRTCSubscribeModeEnum = {
|
|
14070
|
-
Auto: "auto",
|
|
14071
|
-
Manual: "manual"
|
|
14072
|
-
};
|
|
14073
14063
|
var PeerStatus2 = {
|
|
14074
14064
|
Connected: "connected",
|
|
14075
14065
|
Disconnected: "disconnected"
|
|
@@ -14078,7 +14068,7 @@ var require_dist = __commonJS({
|
|
|
14078
14068
|
Webrtc: "webrtc",
|
|
14079
14069
|
Agent: "agent"
|
|
14080
14070
|
};
|
|
14081
|
-
var
|
|
14071
|
+
var RoomType2 = {
|
|
14082
14072
|
FullFeature: "full_feature",
|
|
14083
14073
|
AudioOnly: "audio_only",
|
|
14084
14074
|
Broadcaster: "broadcaster",
|
|
@@ -14086,10 +14076,6 @@ var require_dist = __commonJS({
|
|
|
14086
14076
|
Conference: "conference",
|
|
14087
14077
|
AudioOnlyLivestream: "audio_only_livestream"
|
|
14088
14078
|
};
|
|
14089
|
-
var RoomConfigVideoCodecEnum2 = {
|
|
14090
|
-
H264: "h264",
|
|
14091
|
-
Vp8: "vp8"
|
|
14092
|
-
};
|
|
14093
14079
|
var StreamerStatusEnum = {
|
|
14094
14080
|
Connected: "connected",
|
|
14095
14081
|
Disconnected: "disconnected"
|
|
@@ -14098,10 +14084,14 @@ var require_dist = __commonJS({
|
|
|
14098
14084
|
Auto: "auto",
|
|
14099
14085
|
Manual: "manual"
|
|
14100
14086
|
};
|
|
14101
|
-
var
|
|
14087
|
+
var TrackType = {
|
|
14102
14088
|
Audio: "audio",
|
|
14103
14089
|
Video: "video"
|
|
14104
14090
|
};
|
|
14091
|
+
var VideoCodec2 = {
|
|
14092
|
+
H264: "h264",
|
|
14093
|
+
Vp8: "vp8"
|
|
14094
|
+
};
|
|
14105
14095
|
var ViewerStatusEnum = {
|
|
14106
14096
|
Connected: "connected",
|
|
14107
14097
|
Disconnected: "disconnected"
|
|
@@ -14112,11 +14102,11 @@ var require_dist = __commonJS({
|
|
|
14112
14102
|
*
|
|
14113
14103
|
* @summary Create peer
|
|
14114
14104
|
* @param {string} roomId Room id
|
|
14115
|
-
* @param {
|
|
14105
|
+
* @param {PeerConfig} [peerConfig] Peer specification
|
|
14116
14106
|
* @param {*} [options] Override http request option.
|
|
14117
14107
|
* @throws {RequiredError}
|
|
14118
14108
|
*/
|
|
14119
|
-
addPeer: async (roomId,
|
|
14109
|
+
addPeer: async (roomId, peerConfig, options = {}) => {
|
|
14120
14110
|
assertParamExists("addPeer", "roomId", roomId);
|
|
14121
14111
|
const localVarPath = `/room/{room_id}/peer`.replace(`{${"room_id"}}`, encodeURIComponent(String(roomId)));
|
|
14122
14112
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -14132,7 +14122,7 @@ var require_dist = __commonJS({
|
|
|
14132
14122
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
14133
14123
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
14134
14124
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
14135
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
14125
|
+
localVarRequestOptions.data = serializeDataIfNeeded(peerConfig, localVarRequestOptions, configuration);
|
|
14136
14126
|
return {
|
|
14137
14127
|
url: toPathString(localVarUrlObj),
|
|
14138
14128
|
options: localVarRequestOptions
|
|
@@ -14377,12 +14367,12 @@ var require_dist = __commonJS({
|
|
|
14377
14367
|
*
|
|
14378
14368
|
* @summary Create peer
|
|
14379
14369
|
* @param {string} roomId Room id
|
|
14380
|
-
* @param {
|
|
14370
|
+
* @param {PeerConfig} [peerConfig] Peer specification
|
|
14381
14371
|
* @param {*} [options] Override http request option.
|
|
14382
14372
|
* @throws {RequiredError}
|
|
14383
14373
|
*/
|
|
14384
|
-
async addPeer(roomId,
|
|
14385
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.addPeer(roomId,
|
|
14374
|
+
async addPeer(roomId, peerConfig, options) {
|
|
14375
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.addPeer(roomId, peerConfig, options);
|
|
14386
14376
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
14387
14377
|
const localVarOperationServerBasePath = operationServerMap["RoomApi.addPeer"]?.[localVarOperationServerIndex]?.url;
|
|
14388
14378
|
return (axios22, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios22, localVarOperationServerBasePath || basePath);
|
|
@@ -14505,12 +14495,12 @@ var require_dist = __commonJS({
|
|
|
14505
14495
|
*
|
|
14506
14496
|
* @summary Create peer
|
|
14507
14497
|
* @param {string} roomId Room id
|
|
14508
|
-
* @param {
|
|
14498
|
+
* @param {PeerConfig} [peerConfig] Peer specification
|
|
14509
14499
|
* @param {*} [options] Override http request option.
|
|
14510
14500
|
* @throws {RequiredError}
|
|
14511
14501
|
*/
|
|
14512
|
-
addPeer(roomId,
|
|
14513
|
-
return localVarFp.addPeer(roomId,
|
|
14502
|
+
addPeer(roomId, peerConfig, options) {
|
|
14503
|
+
return localVarFp.addPeer(roomId, peerConfig, options).then((request) => request(axios22, basePath));
|
|
14514
14504
|
},
|
|
14515
14505
|
/**
|
|
14516
14506
|
*
|
|
@@ -14604,13 +14594,13 @@ var require_dist = __commonJS({
|
|
|
14604
14594
|
*
|
|
14605
14595
|
* @summary Create peer
|
|
14606
14596
|
* @param {string} roomId Room id
|
|
14607
|
-
* @param {
|
|
14597
|
+
* @param {PeerConfig} [peerConfig] Peer specification
|
|
14608
14598
|
* @param {*} [options] Override http request option.
|
|
14609
14599
|
* @throws {RequiredError}
|
|
14610
14600
|
* @memberof RoomApi
|
|
14611
14601
|
*/
|
|
14612
|
-
addPeer(roomId,
|
|
14613
|
-
return RoomApiFp(this.configuration).addPeer(roomId,
|
|
14602
|
+
addPeer(roomId, peerConfig, options) {
|
|
14603
|
+
return RoomApiFp(this.configuration).addPeer(roomId, peerConfig, options).then((request) => request(this.axios, this.basePath));
|
|
14614
14604
|
}
|
|
14615
14605
|
/**
|
|
14616
14606
|
*
|
|
@@ -14739,7 +14729,7 @@ var require_dist = __commonJS({
|
|
|
14739
14729
|
/**
|
|
14740
14730
|
*
|
|
14741
14731
|
* @summary Deletes stream
|
|
14742
|
-
* @param {string} streamId
|
|
14732
|
+
* @param {string} streamId Stream ID
|
|
14743
14733
|
* @param {*} [options] Override http request option.
|
|
14744
14734
|
* @throws {RequiredError}
|
|
14745
14735
|
*/
|
|
@@ -14791,7 +14781,7 @@ var require_dist = __commonJS({
|
|
|
14791
14781
|
/**
|
|
14792
14782
|
*
|
|
14793
14783
|
* @summary Shows information about the stream
|
|
14794
|
-
* @param {string} streamId
|
|
14784
|
+
* @param {string} streamId Stream ID
|
|
14795
14785
|
* @param {*} [options] Override http request option.
|
|
14796
14786
|
* @throws {RequiredError}
|
|
14797
14787
|
*/
|
|
@@ -14836,7 +14826,7 @@ var require_dist = __commonJS({
|
|
|
14836
14826
|
/**
|
|
14837
14827
|
*
|
|
14838
14828
|
* @summary Deletes stream
|
|
14839
|
-
* @param {string} streamId
|
|
14829
|
+
* @param {string} streamId Stream ID
|
|
14840
14830
|
* @param {*} [options] Override http request option.
|
|
14841
14831
|
* @throws {RequiredError}
|
|
14842
14832
|
*/
|
|
@@ -14861,7 +14851,7 @@ var require_dist = __commonJS({
|
|
|
14861
14851
|
/**
|
|
14862
14852
|
*
|
|
14863
14853
|
* @summary Shows information about the stream
|
|
14864
|
-
* @param {string} streamId
|
|
14854
|
+
* @param {string} streamId Stream ID
|
|
14865
14855
|
* @param {*} [options] Override http request option.
|
|
14866
14856
|
* @throws {RequiredError}
|
|
14867
14857
|
*/
|
|
@@ -14889,7 +14879,7 @@ var require_dist = __commonJS({
|
|
|
14889
14879
|
/**
|
|
14890
14880
|
*
|
|
14891
14881
|
* @summary Deletes stream
|
|
14892
|
-
* @param {string} streamId
|
|
14882
|
+
* @param {string} streamId Stream ID
|
|
14893
14883
|
* @param {*} [options] Override http request option.
|
|
14894
14884
|
* @throws {RequiredError}
|
|
14895
14885
|
*/
|
|
@@ -14908,7 +14898,7 @@ var require_dist = __commonJS({
|
|
|
14908
14898
|
/**
|
|
14909
14899
|
*
|
|
14910
14900
|
* @summary Shows information about the stream
|
|
14911
|
-
* @param {string} streamId
|
|
14901
|
+
* @param {string} streamId Stream ID
|
|
14912
14902
|
* @param {*} [options] Override http request option.
|
|
14913
14903
|
* @throws {RequiredError}
|
|
14914
14904
|
*/
|
|
@@ -14932,7 +14922,7 @@ var require_dist = __commonJS({
|
|
|
14932
14922
|
/**
|
|
14933
14923
|
*
|
|
14934
14924
|
* @summary Deletes stream
|
|
14935
|
-
* @param {string} streamId
|
|
14925
|
+
* @param {string} streamId Stream ID
|
|
14936
14926
|
* @param {*} [options] Override http request option.
|
|
14937
14927
|
* @throws {RequiredError}
|
|
14938
14928
|
* @memberof StreamApi
|
|
@@ -14953,7 +14943,7 @@ var require_dist = __commonJS({
|
|
|
14953
14943
|
/**
|
|
14954
14944
|
*
|
|
14955
14945
|
* @summary Shows information about the stream
|
|
14956
|
-
* @param {string} streamId
|
|
14946
|
+
* @param {string} streamId Stream ID
|
|
14957
14947
|
* @param {*} [options] Override http request option.
|
|
14958
14948
|
* @throws {RequiredError}
|
|
14959
14949
|
* @memberof StreamApi
|
|
@@ -15482,15 +15472,19 @@ var require_dist2 = __commonJS({
|
|
|
15482
15472
|
AgentRequest_AddTrack: () => AgentRequest_AddTrack,
|
|
15483
15473
|
AgentRequest_AddTrack_CodecParameters: () => AgentRequest_AddTrack_CodecParameters,
|
|
15484
15474
|
AgentRequest_AuthRequest: () => AgentRequest_AuthRequest,
|
|
15475
|
+
AgentRequest_CaptureImage: () => AgentRequest_CaptureImage,
|
|
15485
15476
|
AgentRequest_InterruptTrack: () => AgentRequest_InterruptTrack,
|
|
15486
15477
|
AgentRequest_RemoveTrack: () => AgentRequest_RemoveTrack,
|
|
15487
15478
|
AgentRequest_TrackData: () => AgentRequest_TrackData2,
|
|
15488
15479
|
AgentResponse: () => AgentResponse2,
|
|
15489
15480
|
AgentResponse_Authenticated: () => AgentResponse_Authenticated,
|
|
15490
15481
|
AgentResponse_TrackData: () => AgentResponse_TrackData2,
|
|
15482
|
+
AgentResponse_TrackImage: () => AgentResponse_TrackImage,
|
|
15491
15483
|
ServerMessage: () => ServerMessage3,
|
|
15492
15484
|
ServerMessage_AuthRequest: () => ServerMessage_AuthRequest,
|
|
15493
15485
|
ServerMessage_Authenticated: () => ServerMessage_Authenticated,
|
|
15486
|
+
ServerMessage_ChannelAdded: () => ServerMessage_ChannelAdded,
|
|
15487
|
+
ServerMessage_ChannelRemoved: () => ServerMessage_ChannelRemoved,
|
|
15494
15488
|
ServerMessage_ComponentCrashed: () => ServerMessage_ComponentCrashed,
|
|
15495
15489
|
ServerMessage_EventType: () => ServerMessage_EventType2,
|
|
15496
15490
|
ServerMessage_HlsPlayable: () => ServerMessage_HlsPlayable,
|
|
@@ -16494,7 +16488,9 @@ var require_dist2 = __commonJS({
|
|
|
16494
16488
|
viewerConnected: void 0,
|
|
16495
16489
|
viewerDisconnected: void 0,
|
|
16496
16490
|
streamerConnected: void 0,
|
|
16497
|
-
streamerDisconnected: void 0
|
|
16491
|
+
streamerDisconnected: void 0,
|
|
16492
|
+
channelAdded: void 0,
|
|
16493
|
+
channelRemoved: void 0
|
|
16498
16494
|
};
|
|
16499
16495
|
}
|
|
16500
16496
|
var ServerMessage3 = {
|
|
@@ -16577,6 +16573,12 @@ var require_dist2 = __commonJS({
|
|
|
16577
16573
|
if (message.streamerDisconnected !== void 0) {
|
|
16578
16574
|
ServerMessage_StreamerDisconnected.encode(message.streamerDisconnected, writer.uint32(218).fork()).join();
|
|
16579
16575
|
}
|
|
16576
|
+
if (message.channelAdded !== void 0) {
|
|
16577
|
+
ServerMessage_ChannelAdded.encode(message.channelAdded, writer.uint32(226).fork()).join();
|
|
16578
|
+
}
|
|
16579
|
+
if (message.channelRemoved !== void 0) {
|
|
16580
|
+
ServerMessage_ChannelRemoved.encode(message.channelRemoved, writer.uint32(234).fork()).join();
|
|
16581
|
+
}
|
|
16580
16582
|
return writer;
|
|
16581
16583
|
},
|
|
16582
16584
|
decode(input, length) {
|
|
@@ -16768,6 +16770,20 @@ var require_dist2 = __commonJS({
|
|
|
16768
16770
|
message.streamerDisconnected = ServerMessage_StreamerDisconnected.decode(reader, reader.uint32());
|
|
16769
16771
|
continue;
|
|
16770
16772
|
}
|
|
16773
|
+
case 28: {
|
|
16774
|
+
if (tag !== 226) {
|
|
16775
|
+
break;
|
|
16776
|
+
}
|
|
16777
|
+
message.channelAdded = ServerMessage_ChannelAdded.decode(reader, reader.uint32());
|
|
16778
|
+
continue;
|
|
16779
|
+
}
|
|
16780
|
+
case 29: {
|
|
16781
|
+
if (tag !== 234) {
|
|
16782
|
+
break;
|
|
16783
|
+
}
|
|
16784
|
+
message.channelRemoved = ServerMessage_ChannelRemoved.decode(reader, reader.uint32());
|
|
16785
|
+
continue;
|
|
16786
|
+
}
|
|
16771
16787
|
}
|
|
16772
16788
|
if ((tag & 7) === 4 || tag === 0) {
|
|
16773
16789
|
break;
|
|
@@ -16803,7 +16819,9 @@ var require_dist2 = __commonJS({
|
|
|
16803
16819
|
viewerConnected: isSet2(object.viewerConnected) ? ServerMessage_ViewerConnected.fromJSON(object.viewerConnected) : void 0,
|
|
16804
16820
|
viewerDisconnected: isSet2(object.viewerDisconnected) ? ServerMessage_ViewerDisconnected.fromJSON(object.viewerDisconnected) : void 0,
|
|
16805
16821
|
streamerConnected: isSet2(object.streamerConnected) ? ServerMessage_StreamerConnected.fromJSON(object.streamerConnected) : void 0,
|
|
16806
|
-
streamerDisconnected: isSet2(object.streamerDisconnected) ? ServerMessage_StreamerDisconnected.fromJSON(object.streamerDisconnected) : void 0
|
|
16822
|
+
streamerDisconnected: isSet2(object.streamerDisconnected) ? ServerMessage_StreamerDisconnected.fromJSON(object.streamerDisconnected) : void 0,
|
|
16823
|
+
channelAdded: isSet2(object.channelAdded) ? ServerMessage_ChannelAdded.fromJSON(object.channelAdded) : void 0,
|
|
16824
|
+
channelRemoved: isSet2(object.channelRemoved) ? ServerMessage_ChannelRemoved.fromJSON(object.channelRemoved) : void 0
|
|
16807
16825
|
};
|
|
16808
16826
|
},
|
|
16809
16827
|
toJSON(message) {
|
|
@@ -16886,6 +16904,12 @@ var require_dist2 = __commonJS({
|
|
|
16886
16904
|
if (message.streamerDisconnected !== void 0) {
|
|
16887
16905
|
obj.streamerDisconnected = ServerMessage_StreamerDisconnected.toJSON(message.streamerDisconnected);
|
|
16888
16906
|
}
|
|
16907
|
+
if (message.channelAdded !== void 0) {
|
|
16908
|
+
obj.channelAdded = ServerMessage_ChannelAdded.toJSON(message.channelAdded);
|
|
16909
|
+
}
|
|
16910
|
+
if (message.channelRemoved !== void 0) {
|
|
16911
|
+
obj.channelRemoved = ServerMessage_ChannelRemoved.toJSON(message.channelRemoved);
|
|
16912
|
+
}
|
|
16889
16913
|
return obj;
|
|
16890
16914
|
},
|
|
16891
16915
|
create(base) {
|
|
@@ -16919,6 +16943,8 @@ var require_dist2 = __commonJS({
|
|
|
16919
16943
|
message.viewerDisconnected = object.viewerDisconnected !== void 0 && object.viewerDisconnected !== null ? ServerMessage_ViewerDisconnected.fromPartial(object.viewerDisconnected) : void 0;
|
|
16920
16944
|
message.streamerConnected = object.streamerConnected !== void 0 && object.streamerConnected !== null ? ServerMessage_StreamerConnected.fromPartial(object.streamerConnected) : void 0;
|
|
16921
16945
|
message.streamerDisconnected = object.streamerDisconnected !== void 0 && object.streamerDisconnected !== null ? ServerMessage_StreamerDisconnected.fromPartial(object.streamerDisconnected) : void 0;
|
|
16946
|
+
message.channelAdded = object.channelAdded !== void 0 && object.channelAdded !== null ? ServerMessage_ChannelAdded.fromPartial(object.channelAdded) : void 0;
|
|
16947
|
+
message.channelRemoved = object.channelRemoved !== void 0 && object.channelRemoved !== null ? ServerMessage_ChannelRemoved.fromPartial(object.channelRemoved) : void 0;
|
|
16922
16948
|
return message;
|
|
16923
16949
|
}
|
|
16924
16950
|
};
|
|
@@ -18325,6 +18351,202 @@ var require_dist2 = __commonJS({
|
|
|
18325
18351
|
return message;
|
|
18326
18352
|
}
|
|
18327
18353
|
};
|
|
18354
|
+
function createBaseServerMessage_ChannelAdded() {
|
|
18355
|
+
return { roomId: "", peerId: void 0, componentId: void 0, channelId: "" };
|
|
18356
|
+
}
|
|
18357
|
+
var ServerMessage_ChannelAdded = {
|
|
18358
|
+
encode(message, writer = new BinaryWriter()) {
|
|
18359
|
+
if (message.roomId !== "") {
|
|
18360
|
+
writer.uint32(10).string(message.roomId);
|
|
18361
|
+
}
|
|
18362
|
+
if (message.peerId !== void 0) {
|
|
18363
|
+
writer.uint32(18).string(message.peerId);
|
|
18364
|
+
}
|
|
18365
|
+
if (message.componentId !== void 0) {
|
|
18366
|
+
writer.uint32(26).string(message.componentId);
|
|
18367
|
+
}
|
|
18368
|
+
if (message.channelId !== "") {
|
|
18369
|
+
writer.uint32(34).string(message.channelId);
|
|
18370
|
+
}
|
|
18371
|
+
return writer;
|
|
18372
|
+
},
|
|
18373
|
+
decode(input, length) {
|
|
18374
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
18375
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
18376
|
+
const message = createBaseServerMessage_ChannelAdded();
|
|
18377
|
+
while (reader.pos < end) {
|
|
18378
|
+
const tag = reader.uint32();
|
|
18379
|
+
switch (tag >>> 3) {
|
|
18380
|
+
case 1: {
|
|
18381
|
+
if (tag !== 10) {
|
|
18382
|
+
break;
|
|
18383
|
+
}
|
|
18384
|
+
message.roomId = reader.string();
|
|
18385
|
+
continue;
|
|
18386
|
+
}
|
|
18387
|
+
case 2: {
|
|
18388
|
+
if (tag !== 18) {
|
|
18389
|
+
break;
|
|
18390
|
+
}
|
|
18391
|
+
message.peerId = reader.string();
|
|
18392
|
+
continue;
|
|
18393
|
+
}
|
|
18394
|
+
case 3: {
|
|
18395
|
+
if (tag !== 26) {
|
|
18396
|
+
break;
|
|
18397
|
+
}
|
|
18398
|
+
message.componentId = reader.string();
|
|
18399
|
+
continue;
|
|
18400
|
+
}
|
|
18401
|
+
case 4: {
|
|
18402
|
+
if (tag !== 34) {
|
|
18403
|
+
break;
|
|
18404
|
+
}
|
|
18405
|
+
message.channelId = reader.string();
|
|
18406
|
+
continue;
|
|
18407
|
+
}
|
|
18408
|
+
}
|
|
18409
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
18410
|
+
break;
|
|
18411
|
+
}
|
|
18412
|
+
reader.skip(tag & 7);
|
|
18413
|
+
}
|
|
18414
|
+
return message;
|
|
18415
|
+
},
|
|
18416
|
+
fromJSON(object) {
|
|
18417
|
+
return {
|
|
18418
|
+
roomId: isSet2(object.roomId) ? globalThis.String(object.roomId) : "",
|
|
18419
|
+
peerId: isSet2(object.peerId) ? globalThis.String(object.peerId) : void 0,
|
|
18420
|
+
componentId: isSet2(object.componentId) ? globalThis.String(object.componentId) : void 0,
|
|
18421
|
+
channelId: isSet2(object.channelId) ? globalThis.String(object.channelId) : ""
|
|
18422
|
+
};
|
|
18423
|
+
},
|
|
18424
|
+
toJSON(message) {
|
|
18425
|
+
const obj = {};
|
|
18426
|
+
if (message.roomId !== "") {
|
|
18427
|
+
obj.roomId = message.roomId;
|
|
18428
|
+
}
|
|
18429
|
+
if (message.peerId !== void 0) {
|
|
18430
|
+
obj.peerId = message.peerId;
|
|
18431
|
+
}
|
|
18432
|
+
if (message.componentId !== void 0) {
|
|
18433
|
+
obj.componentId = message.componentId;
|
|
18434
|
+
}
|
|
18435
|
+
if (message.channelId !== "") {
|
|
18436
|
+
obj.channelId = message.channelId;
|
|
18437
|
+
}
|
|
18438
|
+
return obj;
|
|
18439
|
+
},
|
|
18440
|
+
create(base) {
|
|
18441
|
+
return ServerMessage_ChannelAdded.fromPartial(base ?? {});
|
|
18442
|
+
},
|
|
18443
|
+
fromPartial(object) {
|
|
18444
|
+
const message = createBaseServerMessage_ChannelAdded();
|
|
18445
|
+
message.roomId = object.roomId ?? "";
|
|
18446
|
+
message.peerId = object.peerId ?? void 0;
|
|
18447
|
+
message.componentId = object.componentId ?? void 0;
|
|
18448
|
+
message.channelId = object.channelId ?? "";
|
|
18449
|
+
return message;
|
|
18450
|
+
}
|
|
18451
|
+
};
|
|
18452
|
+
function createBaseServerMessage_ChannelRemoved() {
|
|
18453
|
+
return { roomId: "", peerId: void 0, componentId: void 0, channelId: "" };
|
|
18454
|
+
}
|
|
18455
|
+
var ServerMessage_ChannelRemoved = {
|
|
18456
|
+
encode(message, writer = new BinaryWriter()) {
|
|
18457
|
+
if (message.roomId !== "") {
|
|
18458
|
+
writer.uint32(10).string(message.roomId);
|
|
18459
|
+
}
|
|
18460
|
+
if (message.peerId !== void 0) {
|
|
18461
|
+
writer.uint32(18).string(message.peerId);
|
|
18462
|
+
}
|
|
18463
|
+
if (message.componentId !== void 0) {
|
|
18464
|
+
writer.uint32(26).string(message.componentId);
|
|
18465
|
+
}
|
|
18466
|
+
if (message.channelId !== "") {
|
|
18467
|
+
writer.uint32(34).string(message.channelId);
|
|
18468
|
+
}
|
|
18469
|
+
return writer;
|
|
18470
|
+
},
|
|
18471
|
+
decode(input, length) {
|
|
18472
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
18473
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
18474
|
+
const message = createBaseServerMessage_ChannelRemoved();
|
|
18475
|
+
while (reader.pos < end) {
|
|
18476
|
+
const tag = reader.uint32();
|
|
18477
|
+
switch (tag >>> 3) {
|
|
18478
|
+
case 1: {
|
|
18479
|
+
if (tag !== 10) {
|
|
18480
|
+
break;
|
|
18481
|
+
}
|
|
18482
|
+
message.roomId = reader.string();
|
|
18483
|
+
continue;
|
|
18484
|
+
}
|
|
18485
|
+
case 2: {
|
|
18486
|
+
if (tag !== 18) {
|
|
18487
|
+
break;
|
|
18488
|
+
}
|
|
18489
|
+
message.peerId = reader.string();
|
|
18490
|
+
continue;
|
|
18491
|
+
}
|
|
18492
|
+
case 3: {
|
|
18493
|
+
if (tag !== 26) {
|
|
18494
|
+
break;
|
|
18495
|
+
}
|
|
18496
|
+
message.componentId = reader.string();
|
|
18497
|
+
continue;
|
|
18498
|
+
}
|
|
18499
|
+
case 4: {
|
|
18500
|
+
if (tag !== 34) {
|
|
18501
|
+
break;
|
|
18502
|
+
}
|
|
18503
|
+
message.channelId = reader.string();
|
|
18504
|
+
continue;
|
|
18505
|
+
}
|
|
18506
|
+
}
|
|
18507
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
18508
|
+
break;
|
|
18509
|
+
}
|
|
18510
|
+
reader.skip(tag & 7);
|
|
18511
|
+
}
|
|
18512
|
+
return message;
|
|
18513
|
+
},
|
|
18514
|
+
fromJSON(object) {
|
|
18515
|
+
return {
|
|
18516
|
+
roomId: isSet2(object.roomId) ? globalThis.String(object.roomId) : "",
|
|
18517
|
+
peerId: isSet2(object.peerId) ? globalThis.String(object.peerId) : void 0,
|
|
18518
|
+
componentId: isSet2(object.componentId) ? globalThis.String(object.componentId) : void 0,
|
|
18519
|
+
channelId: isSet2(object.channelId) ? globalThis.String(object.channelId) : ""
|
|
18520
|
+
};
|
|
18521
|
+
},
|
|
18522
|
+
toJSON(message) {
|
|
18523
|
+
const obj = {};
|
|
18524
|
+
if (message.roomId !== "") {
|
|
18525
|
+
obj.roomId = message.roomId;
|
|
18526
|
+
}
|
|
18527
|
+
if (message.peerId !== void 0) {
|
|
18528
|
+
obj.peerId = message.peerId;
|
|
18529
|
+
}
|
|
18530
|
+
if (message.componentId !== void 0) {
|
|
18531
|
+
obj.componentId = message.componentId;
|
|
18532
|
+
}
|
|
18533
|
+
if (message.channelId !== "") {
|
|
18534
|
+
obj.channelId = message.channelId;
|
|
18535
|
+
}
|
|
18536
|
+
return obj;
|
|
18537
|
+
},
|
|
18538
|
+
create(base) {
|
|
18539
|
+
return ServerMessage_ChannelRemoved.fromPartial(base ?? {});
|
|
18540
|
+
},
|
|
18541
|
+
fromPartial(object) {
|
|
18542
|
+
const message = createBaseServerMessage_ChannelRemoved();
|
|
18543
|
+
message.roomId = object.roomId ?? "";
|
|
18544
|
+
message.peerId = object.peerId ?? void 0;
|
|
18545
|
+
message.componentId = object.componentId ?? void 0;
|
|
18546
|
+
message.channelId = object.channelId ?? "";
|
|
18547
|
+
return message;
|
|
18548
|
+
}
|
|
18549
|
+
};
|
|
18328
18550
|
function createBaseServerMessage_StreamConnected() {
|
|
18329
18551
|
return { streamId: "" };
|
|
18330
18552
|
}
|
|
@@ -18709,7 +18931,8 @@ var require_dist2 = __commonJS({
|
|
|
18709
18931
|
addTrack: void 0,
|
|
18710
18932
|
removeTrack: void 0,
|
|
18711
18933
|
trackData: void 0,
|
|
18712
|
-
interruptTrack: void 0
|
|
18934
|
+
interruptTrack: void 0,
|
|
18935
|
+
captureImage: void 0
|
|
18713
18936
|
};
|
|
18714
18937
|
}
|
|
18715
18938
|
var AgentRequest2 = {
|
|
@@ -18729,6 +18952,9 @@ var require_dist2 = __commonJS({
|
|
|
18729
18952
|
if (message.interruptTrack !== void 0) {
|
|
18730
18953
|
AgentRequest_InterruptTrack.encode(message.interruptTrack, writer.uint32(42).fork()).join();
|
|
18731
18954
|
}
|
|
18955
|
+
if (message.captureImage !== void 0) {
|
|
18956
|
+
AgentRequest_CaptureImage.encode(message.captureImage, writer.uint32(50).fork()).join();
|
|
18957
|
+
}
|
|
18732
18958
|
return writer;
|
|
18733
18959
|
},
|
|
18734
18960
|
decode(input, length) {
|
|
@@ -18773,6 +18999,13 @@ var require_dist2 = __commonJS({
|
|
|
18773
18999
|
message.interruptTrack = AgentRequest_InterruptTrack.decode(reader, reader.uint32());
|
|
18774
19000
|
continue;
|
|
18775
19001
|
}
|
|
19002
|
+
case 6: {
|
|
19003
|
+
if (tag !== 50) {
|
|
19004
|
+
break;
|
|
19005
|
+
}
|
|
19006
|
+
message.captureImage = AgentRequest_CaptureImage.decode(reader, reader.uint32());
|
|
19007
|
+
continue;
|
|
19008
|
+
}
|
|
18776
19009
|
}
|
|
18777
19010
|
if ((tag & 7) === 4 || tag === 0) {
|
|
18778
19011
|
break;
|
|
@@ -18787,7 +19020,8 @@ var require_dist2 = __commonJS({
|
|
|
18787
19020
|
addTrack: isSet3(object.addTrack) ? AgentRequest_AddTrack.fromJSON(object.addTrack) : void 0,
|
|
18788
19021
|
removeTrack: isSet3(object.removeTrack) ? AgentRequest_RemoveTrack.fromJSON(object.removeTrack) : void 0,
|
|
18789
19022
|
trackData: isSet3(object.trackData) ? AgentRequest_TrackData2.fromJSON(object.trackData) : void 0,
|
|
18790
|
-
interruptTrack: isSet3(object.interruptTrack) ? AgentRequest_InterruptTrack.fromJSON(object.interruptTrack) : void 0
|
|
19023
|
+
interruptTrack: isSet3(object.interruptTrack) ? AgentRequest_InterruptTrack.fromJSON(object.interruptTrack) : void 0,
|
|
19024
|
+
captureImage: isSet3(object.captureImage) ? AgentRequest_CaptureImage.fromJSON(object.captureImage) : void 0
|
|
18791
19025
|
};
|
|
18792
19026
|
},
|
|
18793
19027
|
toJSON(message) {
|
|
@@ -18807,6 +19041,9 @@ var require_dist2 = __commonJS({
|
|
|
18807
19041
|
if (message.interruptTrack !== void 0) {
|
|
18808
19042
|
obj.interruptTrack = AgentRequest_InterruptTrack.toJSON(message.interruptTrack);
|
|
18809
19043
|
}
|
|
19044
|
+
if (message.captureImage !== void 0) {
|
|
19045
|
+
obj.captureImage = AgentRequest_CaptureImage.toJSON(message.captureImage);
|
|
19046
|
+
}
|
|
18810
19047
|
return obj;
|
|
18811
19048
|
},
|
|
18812
19049
|
create(base) {
|
|
@@ -18819,6 +19056,7 @@ var require_dist2 = __commonJS({
|
|
|
18819
19056
|
message.removeTrack = object.removeTrack !== void 0 && object.removeTrack !== null ? AgentRequest_RemoveTrack.fromPartial(object.removeTrack) : void 0;
|
|
18820
19057
|
message.trackData = object.trackData !== void 0 && object.trackData !== null ? AgentRequest_TrackData2.fromPartial(object.trackData) : void 0;
|
|
18821
19058
|
message.interruptTrack = object.interruptTrack !== void 0 && object.interruptTrack !== null ? AgentRequest_InterruptTrack.fromPartial(object.interruptTrack) : void 0;
|
|
19059
|
+
message.captureImage = object.captureImage !== void 0 && object.captureImage !== null ? AgentRequest_CaptureImage.fromPartial(object.captureImage) : void 0;
|
|
18822
19060
|
return message;
|
|
18823
19061
|
}
|
|
18824
19062
|
};
|
|
@@ -19194,8 +19432,59 @@ var require_dist2 = __commonJS({
|
|
|
19194
19432
|
return message;
|
|
19195
19433
|
}
|
|
19196
19434
|
};
|
|
19435
|
+
function createBaseAgentRequest_CaptureImage() {
|
|
19436
|
+
return { trackId: "" };
|
|
19437
|
+
}
|
|
19438
|
+
var AgentRequest_CaptureImage = {
|
|
19439
|
+
encode(message, writer = new BinaryWriter()) {
|
|
19440
|
+
if (message.trackId !== "") {
|
|
19441
|
+
writer.uint32(10).string(message.trackId);
|
|
19442
|
+
}
|
|
19443
|
+
return writer;
|
|
19444
|
+
},
|
|
19445
|
+
decode(input, length) {
|
|
19446
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
19447
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
19448
|
+
const message = createBaseAgentRequest_CaptureImage();
|
|
19449
|
+
while (reader.pos < end) {
|
|
19450
|
+
const tag = reader.uint32();
|
|
19451
|
+
switch (tag >>> 3) {
|
|
19452
|
+
case 1: {
|
|
19453
|
+
if (tag !== 10) {
|
|
19454
|
+
break;
|
|
19455
|
+
}
|
|
19456
|
+
message.trackId = reader.string();
|
|
19457
|
+
continue;
|
|
19458
|
+
}
|
|
19459
|
+
}
|
|
19460
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
19461
|
+
break;
|
|
19462
|
+
}
|
|
19463
|
+
reader.skip(tag & 7);
|
|
19464
|
+
}
|
|
19465
|
+
return message;
|
|
19466
|
+
},
|
|
19467
|
+
fromJSON(object) {
|
|
19468
|
+
return { trackId: isSet3(object.trackId) ? globalThis.String(object.trackId) : "" };
|
|
19469
|
+
},
|
|
19470
|
+
toJSON(message) {
|
|
19471
|
+
const obj = {};
|
|
19472
|
+
if (message.trackId !== "") {
|
|
19473
|
+
obj.trackId = message.trackId;
|
|
19474
|
+
}
|
|
19475
|
+
return obj;
|
|
19476
|
+
},
|
|
19477
|
+
create(base) {
|
|
19478
|
+
return AgentRequest_CaptureImage.fromPartial(base ?? {});
|
|
19479
|
+
},
|
|
19480
|
+
fromPartial(object) {
|
|
19481
|
+
const message = createBaseAgentRequest_CaptureImage();
|
|
19482
|
+
message.trackId = object.trackId ?? "";
|
|
19483
|
+
return message;
|
|
19484
|
+
}
|
|
19485
|
+
};
|
|
19197
19486
|
function createBaseAgentResponse() {
|
|
19198
|
-
return { authenticated: void 0, trackData: void 0 };
|
|
19487
|
+
return { authenticated: void 0, trackData: void 0, trackImage: void 0 };
|
|
19199
19488
|
}
|
|
19200
19489
|
var AgentResponse2 = {
|
|
19201
19490
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -19205,6 +19494,9 @@ var require_dist2 = __commonJS({
|
|
|
19205
19494
|
if (message.trackData !== void 0) {
|
|
19206
19495
|
AgentResponse_TrackData2.encode(message.trackData, writer.uint32(18).fork()).join();
|
|
19207
19496
|
}
|
|
19497
|
+
if (message.trackImage !== void 0) {
|
|
19498
|
+
AgentResponse_TrackImage.encode(message.trackImage, writer.uint32(26).fork()).join();
|
|
19499
|
+
}
|
|
19208
19500
|
return writer;
|
|
19209
19501
|
},
|
|
19210
19502
|
decode(input, length) {
|
|
@@ -19228,6 +19520,13 @@ var require_dist2 = __commonJS({
|
|
|
19228
19520
|
message.trackData = AgentResponse_TrackData2.decode(reader, reader.uint32());
|
|
19229
19521
|
continue;
|
|
19230
19522
|
}
|
|
19523
|
+
case 3: {
|
|
19524
|
+
if (tag !== 26) {
|
|
19525
|
+
break;
|
|
19526
|
+
}
|
|
19527
|
+
message.trackImage = AgentResponse_TrackImage.decode(reader, reader.uint32());
|
|
19528
|
+
continue;
|
|
19529
|
+
}
|
|
19231
19530
|
}
|
|
19232
19531
|
if ((tag & 7) === 4 || tag === 0) {
|
|
19233
19532
|
break;
|
|
@@ -19239,7 +19538,8 @@ var require_dist2 = __commonJS({
|
|
|
19239
19538
|
fromJSON(object) {
|
|
19240
19539
|
return {
|
|
19241
19540
|
authenticated: isSet3(object.authenticated) ? AgentResponse_Authenticated.fromJSON(object.authenticated) : void 0,
|
|
19242
|
-
trackData: isSet3(object.trackData) ? AgentResponse_TrackData2.fromJSON(object.trackData) : void 0
|
|
19541
|
+
trackData: isSet3(object.trackData) ? AgentResponse_TrackData2.fromJSON(object.trackData) : void 0,
|
|
19542
|
+
trackImage: isSet3(object.trackImage) ? AgentResponse_TrackImage.fromJSON(object.trackImage) : void 0
|
|
19243
19543
|
};
|
|
19244
19544
|
},
|
|
19245
19545
|
toJSON(message) {
|
|
@@ -19250,6 +19550,9 @@ var require_dist2 = __commonJS({
|
|
|
19250
19550
|
if (message.trackData !== void 0) {
|
|
19251
19551
|
obj.trackData = AgentResponse_TrackData2.toJSON(message.trackData);
|
|
19252
19552
|
}
|
|
19553
|
+
if (message.trackImage !== void 0) {
|
|
19554
|
+
obj.trackImage = AgentResponse_TrackImage.toJSON(message.trackImage);
|
|
19555
|
+
}
|
|
19253
19556
|
return obj;
|
|
19254
19557
|
},
|
|
19255
19558
|
create(base) {
|
|
@@ -19259,6 +19562,7 @@ var require_dist2 = __commonJS({
|
|
|
19259
19562
|
const message = createBaseAgentResponse();
|
|
19260
19563
|
message.authenticated = object.authenticated !== void 0 && object.authenticated !== null ? AgentResponse_Authenticated.fromPartial(object.authenticated) : void 0;
|
|
19261
19564
|
message.trackData = object.trackData !== void 0 && object.trackData !== null ? AgentResponse_TrackData2.fromPartial(object.trackData) : void 0;
|
|
19565
|
+
message.trackImage = object.trackImage !== void 0 && object.trackImage !== null ? AgentResponse_TrackImage.fromPartial(object.trackImage) : void 0;
|
|
19262
19566
|
return message;
|
|
19263
19567
|
}
|
|
19264
19568
|
};
|
|
@@ -19382,6 +19686,89 @@ var require_dist2 = __commonJS({
|
|
|
19382
19686
|
return message;
|
|
19383
19687
|
}
|
|
19384
19688
|
};
|
|
19689
|
+
function createBaseAgentResponse_TrackImage() {
|
|
19690
|
+
return { trackId: "", contentType: "", data: new Uint8Array(0) };
|
|
19691
|
+
}
|
|
19692
|
+
var AgentResponse_TrackImage = {
|
|
19693
|
+
encode(message, writer = new BinaryWriter()) {
|
|
19694
|
+
if (message.trackId !== "") {
|
|
19695
|
+
writer.uint32(10).string(message.trackId);
|
|
19696
|
+
}
|
|
19697
|
+
if (message.contentType !== "") {
|
|
19698
|
+
writer.uint32(18).string(message.contentType);
|
|
19699
|
+
}
|
|
19700
|
+
if (message.data.length !== 0) {
|
|
19701
|
+
writer.uint32(26).bytes(message.data);
|
|
19702
|
+
}
|
|
19703
|
+
return writer;
|
|
19704
|
+
},
|
|
19705
|
+
decode(input, length) {
|
|
19706
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
19707
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
19708
|
+
const message = createBaseAgentResponse_TrackImage();
|
|
19709
|
+
while (reader.pos < end) {
|
|
19710
|
+
const tag = reader.uint32();
|
|
19711
|
+
switch (tag >>> 3) {
|
|
19712
|
+
case 1: {
|
|
19713
|
+
if (tag !== 10) {
|
|
19714
|
+
break;
|
|
19715
|
+
}
|
|
19716
|
+
message.trackId = reader.string();
|
|
19717
|
+
continue;
|
|
19718
|
+
}
|
|
19719
|
+
case 2: {
|
|
19720
|
+
if (tag !== 18) {
|
|
19721
|
+
break;
|
|
19722
|
+
}
|
|
19723
|
+
message.contentType = reader.string();
|
|
19724
|
+
continue;
|
|
19725
|
+
}
|
|
19726
|
+
case 3: {
|
|
19727
|
+
if (tag !== 26) {
|
|
19728
|
+
break;
|
|
19729
|
+
}
|
|
19730
|
+
message.data = reader.bytes();
|
|
19731
|
+
continue;
|
|
19732
|
+
}
|
|
19733
|
+
}
|
|
19734
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
19735
|
+
break;
|
|
19736
|
+
}
|
|
19737
|
+
reader.skip(tag & 7);
|
|
19738
|
+
}
|
|
19739
|
+
return message;
|
|
19740
|
+
},
|
|
19741
|
+
fromJSON(object) {
|
|
19742
|
+
return {
|
|
19743
|
+
trackId: isSet3(object.trackId) ? globalThis.String(object.trackId) : "",
|
|
19744
|
+
contentType: isSet3(object.contentType) ? globalThis.String(object.contentType) : "",
|
|
19745
|
+
data: isSet3(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0)
|
|
19746
|
+
};
|
|
19747
|
+
},
|
|
19748
|
+
toJSON(message) {
|
|
19749
|
+
const obj = {};
|
|
19750
|
+
if (message.trackId !== "") {
|
|
19751
|
+
obj.trackId = message.trackId;
|
|
19752
|
+
}
|
|
19753
|
+
if (message.contentType !== "") {
|
|
19754
|
+
obj.contentType = message.contentType;
|
|
19755
|
+
}
|
|
19756
|
+
if (message.data.length !== 0) {
|
|
19757
|
+
obj.data = base64FromBytes(message.data);
|
|
19758
|
+
}
|
|
19759
|
+
return obj;
|
|
19760
|
+
},
|
|
19761
|
+
create(base) {
|
|
19762
|
+
return AgentResponse_TrackImage.fromPartial(base ?? {});
|
|
19763
|
+
},
|
|
19764
|
+
fromPartial(object) {
|
|
19765
|
+
const message = createBaseAgentResponse_TrackImage();
|
|
19766
|
+
message.trackId = object.trackId ?? "";
|
|
19767
|
+
message.contentType = object.contentType ?? "";
|
|
19768
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
19769
|
+
return message;
|
|
19770
|
+
}
|
|
19771
|
+
};
|
|
19385
19772
|
function bytesFromBase64(b64) {
|
|
19386
19773
|
if (globalThis.Buffer) {
|
|
19387
19774
|
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
@@ -19428,14 +19815,14 @@ __export(index_exports, {
|
|
|
19428
19815
|
PeerOptionsWebRTC: () => import_fishjam_openapi2.PeerOptionsWebRTC,
|
|
19429
19816
|
PeerStatus: () => import_fishjam_openapi2.PeerStatus,
|
|
19430
19817
|
RoomConfig: () => import_fishjam_openapi2.RoomConfig,
|
|
19431
|
-
RoomConfigRoomTypeEnum: () => import_fishjam_openapi2.RoomConfigRoomTypeEnum,
|
|
19432
|
-
RoomConfigVideoCodecEnum: () => import_fishjam_openapi2.RoomConfigVideoCodecEnum,
|
|
19433
19818
|
RoomNotFoundException: () => RoomNotFoundException,
|
|
19819
|
+
RoomType: () => import_fishjam_openapi2.RoomType,
|
|
19434
19820
|
ServerMessage: () => import_fishjam_proto3.ServerMessage,
|
|
19435
19821
|
ServiceUnavailableException: () => ServiceUnavailableException,
|
|
19436
19822
|
StreamerToken: () => import_fishjam_openapi2.StreamerToken,
|
|
19437
19823
|
UnauthorizedException: () => UnauthorizedException,
|
|
19438
19824
|
UnknownException: () => UnknownException,
|
|
19825
|
+
VideoCodec: () => import_fishjam_openapi2.VideoCodec,
|
|
19439
19826
|
ViewerToken: () => import_fishjam_openapi2.ViewerToken
|
|
19440
19827
|
});
|
|
19441
19828
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -19596,7 +19983,7 @@ var FishjamAgent = class extends import_events2.EventEmitter {
|
|
|
19596
19983
|
return track;
|
|
19597
19984
|
}
|
|
19598
19985
|
/**
|
|
19599
|
-
* Interrupt track
|
|
19986
|
+
* Interrupt track identified by `trackId`.
|
|
19600
19987
|
*
|
|
19601
19988
|
* Any audio that has been sent by the agent, but not played
|
|
19602
19989
|
* by Fishjam will be cleared and be prevented from playing.
|
|
@@ -19686,12 +20073,98 @@ var mapException = (error, entity) => {
|
|
|
19686
20073
|
}
|
|
19687
20074
|
};
|
|
19688
20075
|
|
|
20076
|
+
// package.json
|
|
20077
|
+
var package_default = {
|
|
20078
|
+
name: "@fishjam-cloud/js-server-sdk",
|
|
20079
|
+
version: "0.25.0",
|
|
20080
|
+
description: "Fishjam server SDK for JavaScript",
|
|
20081
|
+
homepage: "https://github.com/fishjam-cloud/js-server-sdk",
|
|
20082
|
+
author: "Fishjam Team",
|
|
20083
|
+
repository: {
|
|
20084
|
+
type: "git",
|
|
20085
|
+
url: "https://github.com/fishjam-cloud/js-server-sdk.git"
|
|
20086
|
+
},
|
|
20087
|
+
bugs: {
|
|
20088
|
+
url: "https://github.com/fishjam-cloud/js-server-sdk/issues"
|
|
20089
|
+
},
|
|
20090
|
+
license: "Apache-2.0",
|
|
20091
|
+
keywords: [
|
|
20092
|
+
"webrtc",
|
|
20093
|
+
"fishjam",
|
|
20094
|
+
"server",
|
|
20095
|
+
"membrane"
|
|
20096
|
+
],
|
|
20097
|
+
main: "./dist/index.js",
|
|
20098
|
+
types: "./dist/index.d.ts",
|
|
20099
|
+
files: [
|
|
20100
|
+
"dist"
|
|
20101
|
+
],
|
|
20102
|
+
exports: {
|
|
20103
|
+
".": "./dist/index.js",
|
|
20104
|
+
"./gemini": "./dist/integrations/gemini.js"
|
|
20105
|
+
},
|
|
20106
|
+
scripts: {
|
|
20107
|
+
build: "tsup --dts-resolve",
|
|
20108
|
+
format: "prettier --write .",
|
|
20109
|
+
"format:check": "prettier --check .",
|
|
20110
|
+
typecheck: "tsc --noEmit",
|
|
20111
|
+
lint: "eslint . --fix",
|
|
20112
|
+
"lint:check": "eslint . "
|
|
20113
|
+
},
|
|
20114
|
+
tsup: {
|
|
20115
|
+
entry: [
|
|
20116
|
+
"src/index.ts",
|
|
20117
|
+
"src/integrations/gemini.ts",
|
|
20118
|
+
"src/proto.ts"
|
|
20119
|
+
],
|
|
20120
|
+
noExternal: [
|
|
20121
|
+
"fishjam-openapi",
|
|
20122
|
+
"fishjam-proto"
|
|
20123
|
+
],
|
|
20124
|
+
minify: false,
|
|
20125
|
+
format: [
|
|
20126
|
+
"cjs",
|
|
20127
|
+
"esm"
|
|
20128
|
+
],
|
|
20129
|
+
outDir: "dist"
|
|
20130
|
+
},
|
|
20131
|
+
dependencies: {
|
|
20132
|
+
axios: "^1.7.9",
|
|
20133
|
+
uuid: "^11.1.0"
|
|
20134
|
+
},
|
|
20135
|
+
peerDependencies: {
|
|
20136
|
+
"@google/genai": "^1.0.0"
|
|
20137
|
+
},
|
|
20138
|
+
peerDependenciesMeta: {
|
|
20139
|
+
"@google/genai": {
|
|
20140
|
+
optional: true
|
|
20141
|
+
}
|
|
20142
|
+
},
|
|
20143
|
+
devDependencies: {
|
|
20144
|
+
"@fishjam-cloud/fishjam-openapi": "workspace:*",
|
|
20145
|
+
"@fishjam-cloud/fishjam-proto": "workspace:*",
|
|
20146
|
+
"@openapitools/openapi-generator-cli": "^2.18.4",
|
|
20147
|
+
"@types/node": "^22.13.16",
|
|
20148
|
+
"@types/websocket": "^1.0.10",
|
|
20149
|
+
eslint: "^9.33.0",
|
|
20150
|
+
prettier: "^3.6.2",
|
|
20151
|
+
tsup: "^8.4.0",
|
|
20152
|
+
"typed-emitter": "^2.1.0"
|
|
20153
|
+
},
|
|
20154
|
+
"lint-staged": {
|
|
20155
|
+
"*.{js,ts,tsx,mjs,cjs}": [
|
|
20156
|
+
"eslint --fix --config packages/js-server-sdk/eslint.config.mjs"
|
|
20157
|
+
]
|
|
20158
|
+
}
|
|
20159
|
+
};
|
|
20160
|
+
|
|
19689
20161
|
// src/client.ts
|
|
19690
20162
|
var FishjamClient = class {
|
|
19691
20163
|
roomApi;
|
|
19692
20164
|
viewerApi;
|
|
19693
20165
|
streamerApi;
|
|
19694
20166
|
fishjamConfig;
|
|
20167
|
+
deprecationWarningShown = false;
|
|
19695
20168
|
/**
|
|
19696
20169
|
* Create new instance of Fishjam Client.
|
|
19697
20170
|
*
|
|
@@ -19706,15 +20179,34 @@ var FishjamClient = class {
|
|
|
19706
20179
|
constructor(config) {
|
|
19707
20180
|
const client = import_axios.default.create({
|
|
19708
20181
|
headers: {
|
|
19709
|
-
Authorization: `Bearer ${config.managementToken}
|
|
20182
|
+
Authorization: `Bearer ${config.managementToken}`,
|
|
20183
|
+
"x-fishjam-api-client": `js-server/${package_default.version}`
|
|
19710
20184
|
}
|
|
19711
20185
|
});
|
|
20186
|
+
client.interceptors.response.use((response) => {
|
|
20187
|
+
this.handleDeprecationHeader(response.headers);
|
|
20188
|
+
return response;
|
|
20189
|
+
});
|
|
19712
20190
|
const fishjamUrl = getFishjamUrl(config);
|
|
19713
20191
|
this.roomApi = new import_fishjam_openapi.RoomApi(void 0, fishjamUrl, client);
|
|
19714
20192
|
this.viewerApi = new import_fishjam_openapi.ViewerApi(void 0, fishjamUrl, client);
|
|
19715
20193
|
this.streamerApi = new import_fishjam_openapi.StreamerApi(void 0, fishjamUrl, client);
|
|
19716
20194
|
this.fishjamConfig = config;
|
|
19717
20195
|
}
|
|
20196
|
+
handleDeprecationHeader(headers) {
|
|
20197
|
+
try {
|
|
20198
|
+
const deprecationHeader = headers["x-fishjam-api-deprecated"];
|
|
20199
|
+
if (!deprecationHeader || this.deprecationWarningShown) return;
|
|
20200
|
+
const deprecationStatus = JSON.parse(deprecationHeader);
|
|
20201
|
+
if (deprecationStatus.status === "unsupported") {
|
|
20202
|
+
console.error(deprecationStatus.message);
|
|
20203
|
+
} else if (deprecationStatus.status === "deprecated") {
|
|
20204
|
+
console.warn(deprecationStatus.message);
|
|
20205
|
+
}
|
|
20206
|
+
this.deprecationWarningShown = true;
|
|
20207
|
+
} catch {
|
|
20208
|
+
}
|
|
20209
|
+
}
|
|
19718
20210
|
/**
|
|
19719
20211
|
* Create a new room. All peers connected to the same room will be able to send/receive streams to each other.
|
|
19720
20212
|
*/
|
|
@@ -19885,14 +20377,14 @@ var FishjamClient = class {
|
|
|
19885
20377
|
PeerOptionsWebRTC,
|
|
19886
20378
|
PeerStatus,
|
|
19887
20379
|
RoomConfig,
|
|
19888
|
-
RoomConfigRoomTypeEnum,
|
|
19889
|
-
RoomConfigVideoCodecEnum,
|
|
19890
20380
|
RoomNotFoundException,
|
|
20381
|
+
RoomType,
|
|
19891
20382
|
ServerMessage,
|
|
19892
20383
|
ServiceUnavailableException,
|
|
19893
20384
|
StreamerToken,
|
|
19894
20385
|
UnauthorizedException,
|
|
19895
20386
|
UnknownException,
|
|
20387
|
+
VideoCodec,
|
|
19896
20388
|
ViewerToken
|
|
19897
20389
|
});
|
|
19898
20390
|
/*! Bundled license information:
|