@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.mjs
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
__commonJS,
|
|
3
3
|
__require,
|
|
4
|
-
__toESM
|
|
5
|
-
|
|
4
|
+
__toESM,
|
|
5
|
+
package_default
|
|
6
|
+
} from "./chunk-QK3SKSR4.mjs";
|
|
6
7
|
|
|
7
8
|
// ../fishjam-openapi/dist/index.js
|
|
8
9
|
var require_dist = __commonJS({
|
|
@@ -10761,19 +10762,16 @@ var require_dist = __commonJS({
|
|
|
10761
10762
|
});
|
|
10762
10763
|
var index_exports = {};
|
|
10763
10764
|
__export(index_exports, {
|
|
10765
|
+
AudioFormat: () => AudioFormat,
|
|
10766
|
+
AudioSampleRate: () => AudioSampleRate,
|
|
10764
10767
|
Configuration: () => Configuration,
|
|
10765
|
-
PeerOptionsAgentOutputAudioFormatEnum: () => PeerOptionsAgentOutputAudioFormatEnum,
|
|
10766
|
-
PeerOptionsAgentOutputAudioSampleRateEnum: () => PeerOptionsAgentOutputAudioSampleRateEnum,
|
|
10767
|
-
PeerOptionsAgentSubscribeModeEnum: () => PeerOptionsAgentSubscribeModeEnum,
|
|
10768
|
-
PeerOptionsWebRTCSubscribeModeEnum: () => PeerOptionsWebRTCSubscribeModeEnum,
|
|
10769
10768
|
PeerStatus: () => PeerStatus2,
|
|
10770
10769
|
PeerType: () => PeerType,
|
|
10771
10770
|
RoomApi: () => RoomApi2,
|
|
10772
10771
|
RoomApiAxiosParamCreator: () => RoomApiAxiosParamCreator,
|
|
10773
10772
|
RoomApiFactory: () => RoomApiFactory,
|
|
10774
10773
|
RoomApiFp: () => RoomApiFp,
|
|
10775
|
-
|
|
10776
|
-
RoomConfigVideoCodecEnum: () => RoomConfigVideoCodecEnum2,
|
|
10774
|
+
RoomType: () => RoomType2,
|
|
10777
10775
|
StreamApi: () => StreamApi,
|
|
10778
10776
|
StreamApiAxiosParamCreator: () => StreamApiAxiosParamCreator,
|
|
10779
10777
|
StreamApiFactory: () => StreamApiFactory,
|
|
@@ -10784,7 +10782,8 @@ var require_dist = __commonJS({
|
|
|
10784
10782
|
StreamerApiFp: () => StreamerApiFp,
|
|
10785
10783
|
StreamerStatusEnum: () => StreamerStatusEnum,
|
|
10786
10784
|
SubscribeMode: () => SubscribeMode,
|
|
10787
|
-
|
|
10785
|
+
TrackType: () => TrackType,
|
|
10786
|
+
VideoCodec: () => VideoCodec2,
|
|
10788
10787
|
ViewerApi: () => ViewerApi2,
|
|
10789
10788
|
ViewerApiAxiosParamCreator: () => ViewerApiAxiosParamCreator,
|
|
10790
10789
|
ViewerApiFactory: () => ViewerApiFactory,
|
|
@@ -14029,21 +14028,13 @@ var require_dist = __commonJS({
|
|
|
14029
14028
|
return axios22.request(axiosRequestArgs);
|
|
14030
14029
|
};
|
|
14031
14030
|
};
|
|
14032
|
-
var
|
|
14033
|
-
Auto: "auto",
|
|
14034
|
-
Manual: "manual"
|
|
14035
|
-
};
|
|
14036
|
-
var PeerOptionsAgentOutputAudioFormatEnum = {
|
|
14031
|
+
var AudioFormat = {
|
|
14037
14032
|
Pcm16: "pcm16"
|
|
14038
14033
|
};
|
|
14039
|
-
var
|
|
14034
|
+
var AudioSampleRate = {
|
|
14040
14035
|
NUMBER_16000: 16e3,
|
|
14041
14036
|
NUMBER_24000: 24e3
|
|
14042
14037
|
};
|
|
14043
|
-
var PeerOptionsWebRTCSubscribeModeEnum = {
|
|
14044
|
-
Auto: "auto",
|
|
14045
|
-
Manual: "manual"
|
|
14046
|
-
};
|
|
14047
14038
|
var PeerStatus2 = {
|
|
14048
14039
|
Connected: "connected",
|
|
14049
14040
|
Disconnected: "disconnected"
|
|
@@ -14052,7 +14043,7 @@ var require_dist = __commonJS({
|
|
|
14052
14043
|
Webrtc: "webrtc",
|
|
14053
14044
|
Agent: "agent"
|
|
14054
14045
|
};
|
|
14055
|
-
var
|
|
14046
|
+
var RoomType2 = {
|
|
14056
14047
|
FullFeature: "full_feature",
|
|
14057
14048
|
AudioOnly: "audio_only",
|
|
14058
14049
|
Broadcaster: "broadcaster",
|
|
@@ -14060,10 +14051,6 @@ var require_dist = __commonJS({
|
|
|
14060
14051
|
Conference: "conference",
|
|
14061
14052
|
AudioOnlyLivestream: "audio_only_livestream"
|
|
14062
14053
|
};
|
|
14063
|
-
var RoomConfigVideoCodecEnum2 = {
|
|
14064
|
-
H264: "h264",
|
|
14065
|
-
Vp8: "vp8"
|
|
14066
|
-
};
|
|
14067
14054
|
var StreamerStatusEnum = {
|
|
14068
14055
|
Connected: "connected",
|
|
14069
14056
|
Disconnected: "disconnected"
|
|
@@ -14072,10 +14059,14 @@ var require_dist = __commonJS({
|
|
|
14072
14059
|
Auto: "auto",
|
|
14073
14060
|
Manual: "manual"
|
|
14074
14061
|
};
|
|
14075
|
-
var
|
|
14062
|
+
var TrackType = {
|
|
14076
14063
|
Audio: "audio",
|
|
14077
14064
|
Video: "video"
|
|
14078
14065
|
};
|
|
14066
|
+
var VideoCodec2 = {
|
|
14067
|
+
H264: "h264",
|
|
14068
|
+
Vp8: "vp8"
|
|
14069
|
+
};
|
|
14079
14070
|
var ViewerStatusEnum = {
|
|
14080
14071
|
Connected: "connected",
|
|
14081
14072
|
Disconnected: "disconnected"
|
|
@@ -14086,11 +14077,11 @@ var require_dist = __commonJS({
|
|
|
14086
14077
|
*
|
|
14087
14078
|
* @summary Create peer
|
|
14088
14079
|
* @param {string} roomId Room id
|
|
14089
|
-
* @param {
|
|
14080
|
+
* @param {PeerConfig} [peerConfig] Peer specification
|
|
14090
14081
|
* @param {*} [options] Override http request option.
|
|
14091
14082
|
* @throws {RequiredError}
|
|
14092
14083
|
*/
|
|
14093
|
-
addPeer: async (roomId,
|
|
14084
|
+
addPeer: async (roomId, peerConfig, options = {}) => {
|
|
14094
14085
|
assertParamExists("addPeer", "roomId", roomId);
|
|
14095
14086
|
const localVarPath = `/room/{room_id}/peer`.replace(`{${"room_id"}}`, encodeURIComponent(String(roomId)));
|
|
14096
14087
|
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
@@ -14106,7 +14097,7 @@ var require_dist = __commonJS({
|
|
|
14106
14097
|
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
14107
14098
|
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
14108
14099
|
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
14109
|
-
localVarRequestOptions.data = serializeDataIfNeeded(
|
|
14100
|
+
localVarRequestOptions.data = serializeDataIfNeeded(peerConfig, localVarRequestOptions, configuration);
|
|
14110
14101
|
return {
|
|
14111
14102
|
url: toPathString(localVarUrlObj),
|
|
14112
14103
|
options: localVarRequestOptions
|
|
@@ -14351,12 +14342,12 @@ var require_dist = __commonJS({
|
|
|
14351
14342
|
*
|
|
14352
14343
|
* @summary Create peer
|
|
14353
14344
|
* @param {string} roomId Room id
|
|
14354
|
-
* @param {
|
|
14345
|
+
* @param {PeerConfig} [peerConfig] Peer specification
|
|
14355
14346
|
* @param {*} [options] Override http request option.
|
|
14356
14347
|
* @throws {RequiredError}
|
|
14357
14348
|
*/
|
|
14358
|
-
async addPeer(roomId,
|
|
14359
|
-
const localVarAxiosArgs = await localVarAxiosParamCreator.addPeer(roomId,
|
|
14349
|
+
async addPeer(roomId, peerConfig, options) {
|
|
14350
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.addPeer(roomId, peerConfig, options);
|
|
14360
14351
|
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
14361
14352
|
const localVarOperationServerBasePath = operationServerMap["RoomApi.addPeer"]?.[localVarOperationServerIndex]?.url;
|
|
14362
14353
|
return (axios22, basePath) => createRequestFunction(localVarAxiosArgs, axios_default, BASE_PATH, configuration)(axios22, localVarOperationServerBasePath || basePath);
|
|
@@ -14479,12 +14470,12 @@ var require_dist = __commonJS({
|
|
|
14479
14470
|
*
|
|
14480
14471
|
* @summary Create peer
|
|
14481
14472
|
* @param {string} roomId Room id
|
|
14482
|
-
* @param {
|
|
14473
|
+
* @param {PeerConfig} [peerConfig] Peer specification
|
|
14483
14474
|
* @param {*} [options] Override http request option.
|
|
14484
14475
|
* @throws {RequiredError}
|
|
14485
14476
|
*/
|
|
14486
|
-
addPeer(roomId,
|
|
14487
|
-
return localVarFp.addPeer(roomId,
|
|
14477
|
+
addPeer(roomId, peerConfig, options) {
|
|
14478
|
+
return localVarFp.addPeer(roomId, peerConfig, options).then((request) => request(axios22, basePath));
|
|
14488
14479
|
},
|
|
14489
14480
|
/**
|
|
14490
14481
|
*
|
|
@@ -14578,13 +14569,13 @@ var require_dist = __commonJS({
|
|
|
14578
14569
|
*
|
|
14579
14570
|
* @summary Create peer
|
|
14580
14571
|
* @param {string} roomId Room id
|
|
14581
|
-
* @param {
|
|
14572
|
+
* @param {PeerConfig} [peerConfig] Peer specification
|
|
14582
14573
|
* @param {*} [options] Override http request option.
|
|
14583
14574
|
* @throws {RequiredError}
|
|
14584
14575
|
* @memberof RoomApi
|
|
14585
14576
|
*/
|
|
14586
|
-
addPeer(roomId,
|
|
14587
|
-
return RoomApiFp(this.configuration).addPeer(roomId,
|
|
14577
|
+
addPeer(roomId, peerConfig, options) {
|
|
14578
|
+
return RoomApiFp(this.configuration).addPeer(roomId, peerConfig, options).then((request) => request(this.axios, this.basePath));
|
|
14588
14579
|
}
|
|
14589
14580
|
/**
|
|
14590
14581
|
*
|
|
@@ -14713,7 +14704,7 @@ var require_dist = __commonJS({
|
|
|
14713
14704
|
/**
|
|
14714
14705
|
*
|
|
14715
14706
|
* @summary Deletes stream
|
|
14716
|
-
* @param {string} streamId
|
|
14707
|
+
* @param {string} streamId Stream ID
|
|
14717
14708
|
* @param {*} [options] Override http request option.
|
|
14718
14709
|
* @throws {RequiredError}
|
|
14719
14710
|
*/
|
|
@@ -14765,7 +14756,7 @@ var require_dist = __commonJS({
|
|
|
14765
14756
|
/**
|
|
14766
14757
|
*
|
|
14767
14758
|
* @summary Shows information about the stream
|
|
14768
|
-
* @param {string} streamId
|
|
14759
|
+
* @param {string} streamId Stream ID
|
|
14769
14760
|
* @param {*} [options] Override http request option.
|
|
14770
14761
|
* @throws {RequiredError}
|
|
14771
14762
|
*/
|
|
@@ -14810,7 +14801,7 @@ var require_dist = __commonJS({
|
|
|
14810
14801
|
/**
|
|
14811
14802
|
*
|
|
14812
14803
|
* @summary Deletes stream
|
|
14813
|
-
* @param {string} streamId
|
|
14804
|
+
* @param {string} streamId Stream ID
|
|
14814
14805
|
* @param {*} [options] Override http request option.
|
|
14815
14806
|
* @throws {RequiredError}
|
|
14816
14807
|
*/
|
|
@@ -14835,7 +14826,7 @@ var require_dist = __commonJS({
|
|
|
14835
14826
|
/**
|
|
14836
14827
|
*
|
|
14837
14828
|
* @summary Shows information about the stream
|
|
14838
|
-
* @param {string} streamId
|
|
14829
|
+
* @param {string} streamId Stream ID
|
|
14839
14830
|
* @param {*} [options] Override http request option.
|
|
14840
14831
|
* @throws {RequiredError}
|
|
14841
14832
|
*/
|
|
@@ -14863,7 +14854,7 @@ var require_dist = __commonJS({
|
|
|
14863
14854
|
/**
|
|
14864
14855
|
*
|
|
14865
14856
|
* @summary Deletes stream
|
|
14866
|
-
* @param {string} streamId
|
|
14857
|
+
* @param {string} streamId Stream ID
|
|
14867
14858
|
* @param {*} [options] Override http request option.
|
|
14868
14859
|
* @throws {RequiredError}
|
|
14869
14860
|
*/
|
|
@@ -14882,7 +14873,7 @@ var require_dist = __commonJS({
|
|
|
14882
14873
|
/**
|
|
14883
14874
|
*
|
|
14884
14875
|
* @summary Shows information about the stream
|
|
14885
|
-
* @param {string} streamId
|
|
14876
|
+
* @param {string} streamId Stream ID
|
|
14886
14877
|
* @param {*} [options] Override http request option.
|
|
14887
14878
|
* @throws {RequiredError}
|
|
14888
14879
|
*/
|
|
@@ -14906,7 +14897,7 @@ var require_dist = __commonJS({
|
|
|
14906
14897
|
/**
|
|
14907
14898
|
*
|
|
14908
14899
|
* @summary Deletes stream
|
|
14909
|
-
* @param {string} streamId
|
|
14900
|
+
* @param {string} streamId Stream ID
|
|
14910
14901
|
* @param {*} [options] Override http request option.
|
|
14911
14902
|
* @throws {RequiredError}
|
|
14912
14903
|
* @memberof StreamApi
|
|
@@ -14927,7 +14918,7 @@ var require_dist = __commonJS({
|
|
|
14927
14918
|
/**
|
|
14928
14919
|
*
|
|
14929
14920
|
* @summary Shows information about the stream
|
|
14930
|
-
* @param {string} streamId
|
|
14921
|
+
* @param {string} streamId Stream ID
|
|
14931
14922
|
* @param {*} [options] Override http request option.
|
|
14932
14923
|
* @throws {RequiredError}
|
|
14933
14924
|
* @memberof StreamApi
|
|
@@ -15456,15 +15447,19 @@ var require_dist2 = __commonJS({
|
|
|
15456
15447
|
AgentRequest_AddTrack: () => AgentRequest_AddTrack,
|
|
15457
15448
|
AgentRequest_AddTrack_CodecParameters: () => AgentRequest_AddTrack_CodecParameters,
|
|
15458
15449
|
AgentRequest_AuthRequest: () => AgentRequest_AuthRequest,
|
|
15450
|
+
AgentRequest_CaptureImage: () => AgentRequest_CaptureImage,
|
|
15459
15451
|
AgentRequest_InterruptTrack: () => AgentRequest_InterruptTrack,
|
|
15460
15452
|
AgentRequest_RemoveTrack: () => AgentRequest_RemoveTrack,
|
|
15461
15453
|
AgentRequest_TrackData: () => AgentRequest_TrackData2,
|
|
15462
15454
|
AgentResponse: () => AgentResponse2,
|
|
15463
15455
|
AgentResponse_Authenticated: () => AgentResponse_Authenticated,
|
|
15464
15456
|
AgentResponse_TrackData: () => AgentResponse_TrackData2,
|
|
15457
|
+
AgentResponse_TrackImage: () => AgentResponse_TrackImage,
|
|
15465
15458
|
ServerMessage: () => ServerMessage3,
|
|
15466
15459
|
ServerMessage_AuthRequest: () => ServerMessage_AuthRequest,
|
|
15467
15460
|
ServerMessage_Authenticated: () => ServerMessage_Authenticated,
|
|
15461
|
+
ServerMessage_ChannelAdded: () => ServerMessage_ChannelAdded,
|
|
15462
|
+
ServerMessage_ChannelRemoved: () => ServerMessage_ChannelRemoved,
|
|
15468
15463
|
ServerMessage_ComponentCrashed: () => ServerMessage_ComponentCrashed,
|
|
15469
15464
|
ServerMessage_EventType: () => ServerMessage_EventType2,
|
|
15470
15465
|
ServerMessage_HlsPlayable: () => ServerMessage_HlsPlayable,
|
|
@@ -16468,7 +16463,9 @@ var require_dist2 = __commonJS({
|
|
|
16468
16463
|
viewerConnected: void 0,
|
|
16469
16464
|
viewerDisconnected: void 0,
|
|
16470
16465
|
streamerConnected: void 0,
|
|
16471
|
-
streamerDisconnected: void 0
|
|
16466
|
+
streamerDisconnected: void 0,
|
|
16467
|
+
channelAdded: void 0,
|
|
16468
|
+
channelRemoved: void 0
|
|
16472
16469
|
};
|
|
16473
16470
|
}
|
|
16474
16471
|
var ServerMessage3 = {
|
|
@@ -16551,6 +16548,12 @@ var require_dist2 = __commonJS({
|
|
|
16551
16548
|
if (message.streamerDisconnected !== void 0) {
|
|
16552
16549
|
ServerMessage_StreamerDisconnected.encode(message.streamerDisconnected, writer.uint32(218).fork()).join();
|
|
16553
16550
|
}
|
|
16551
|
+
if (message.channelAdded !== void 0) {
|
|
16552
|
+
ServerMessage_ChannelAdded.encode(message.channelAdded, writer.uint32(226).fork()).join();
|
|
16553
|
+
}
|
|
16554
|
+
if (message.channelRemoved !== void 0) {
|
|
16555
|
+
ServerMessage_ChannelRemoved.encode(message.channelRemoved, writer.uint32(234).fork()).join();
|
|
16556
|
+
}
|
|
16554
16557
|
return writer;
|
|
16555
16558
|
},
|
|
16556
16559
|
decode(input, length) {
|
|
@@ -16742,6 +16745,20 @@ var require_dist2 = __commonJS({
|
|
|
16742
16745
|
message.streamerDisconnected = ServerMessage_StreamerDisconnected.decode(reader, reader.uint32());
|
|
16743
16746
|
continue;
|
|
16744
16747
|
}
|
|
16748
|
+
case 28: {
|
|
16749
|
+
if (tag !== 226) {
|
|
16750
|
+
break;
|
|
16751
|
+
}
|
|
16752
|
+
message.channelAdded = ServerMessage_ChannelAdded.decode(reader, reader.uint32());
|
|
16753
|
+
continue;
|
|
16754
|
+
}
|
|
16755
|
+
case 29: {
|
|
16756
|
+
if (tag !== 234) {
|
|
16757
|
+
break;
|
|
16758
|
+
}
|
|
16759
|
+
message.channelRemoved = ServerMessage_ChannelRemoved.decode(reader, reader.uint32());
|
|
16760
|
+
continue;
|
|
16761
|
+
}
|
|
16745
16762
|
}
|
|
16746
16763
|
if ((tag & 7) === 4 || tag === 0) {
|
|
16747
16764
|
break;
|
|
@@ -16777,7 +16794,9 @@ var require_dist2 = __commonJS({
|
|
|
16777
16794
|
viewerConnected: isSet2(object.viewerConnected) ? ServerMessage_ViewerConnected.fromJSON(object.viewerConnected) : void 0,
|
|
16778
16795
|
viewerDisconnected: isSet2(object.viewerDisconnected) ? ServerMessage_ViewerDisconnected.fromJSON(object.viewerDisconnected) : void 0,
|
|
16779
16796
|
streamerConnected: isSet2(object.streamerConnected) ? ServerMessage_StreamerConnected.fromJSON(object.streamerConnected) : void 0,
|
|
16780
|
-
streamerDisconnected: isSet2(object.streamerDisconnected) ? ServerMessage_StreamerDisconnected.fromJSON(object.streamerDisconnected) : void 0
|
|
16797
|
+
streamerDisconnected: isSet2(object.streamerDisconnected) ? ServerMessage_StreamerDisconnected.fromJSON(object.streamerDisconnected) : void 0,
|
|
16798
|
+
channelAdded: isSet2(object.channelAdded) ? ServerMessage_ChannelAdded.fromJSON(object.channelAdded) : void 0,
|
|
16799
|
+
channelRemoved: isSet2(object.channelRemoved) ? ServerMessage_ChannelRemoved.fromJSON(object.channelRemoved) : void 0
|
|
16781
16800
|
};
|
|
16782
16801
|
},
|
|
16783
16802
|
toJSON(message) {
|
|
@@ -16860,6 +16879,12 @@ var require_dist2 = __commonJS({
|
|
|
16860
16879
|
if (message.streamerDisconnected !== void 0) {
|
|
16861
16880
|
obj.streamerDisconnected = ServerMessage_StreamerDisconnected.toJSON(message.streamerDisconnected);
|
|
16862
16881
|
}
|
|
16882
|
+
if (message.channelAdded !== void 0) {
|
|
16883
|
+
obj.channelAdded = ServerMessage_ChannelAdded.toJSON(message.channelAdded);
|
|
16884
|
+
}
|
|
16885
|
+
if (message.channelRemoved !== void 0) {
|
|
16886
|
+
obj.channelRemoved = ServerMessage_ChannelRemoved.toJSON(message.channelRemoved);
|
|
16887
|
+
}
|
|
16863
16888
|
return obj;
|
|
16864
16889
|
},
|
|
16865
16890
|
create(base) {
|
|
@@ -16893,6 +16918,8 @@ var require_dist2 = __commonJS({
|
|
|
16893
16918
|
message.viewerDisconnected = object.viewerDisconnected !== void 0 && object.viewerDisconnected !== null ? ServerMessage_ViewerDisconnected.fromPartial(object.viewerDisconnected) : void 0;
|
|
16894
16919
|
message.streamerConnected = object.streamerConnected !== void 0 && object.streamerConnected !== null ? ServerMessage_StreamerConnected.fromPartial(object.streamerConnected) : void 0;
|
|
16895
16920
|
message.streamerDisconnected = object.streamerDisconnected !== void 0 && object.streamerDisconnected !== null ? ServerMessage_StreamerDisconnected.fromPartial(object.streamerDisconnected) : void 0;
|
|
16921
|
+
message.channelAdded = object.channelAdded !== void 0 && object.channelAdded !== null ? ServerMessage_ChannelAdded.fromPartial(object.channelAdded) : void 0;
|
|
16922
|
+
message.channelRemoved = object.channelRemoved !== void 0 && object.channelRemoved !== null ? ServerMessage_ChannelRemoved.fromPartial(object.channelRemoved) : void 0;
|
|
16896
16923
|
return message;
|
|
16897
16924
|
}
|
|
16898
16925
|
};
|
|
@@ -18299,6 +18326,202 @@ var require_dist2 = __commonJS({
|
|
|
18299
18326
|
return message;
|
|
18300
18327
|
}
|
|
18301
18328
|
};
|
|
18329
|
+
function createBaseServerMessage_ChannelAdded() {
|
|
18330
|
+
return { roomId: "", peerId: void 0, componentId: void 0, channelId: "" };
|
|
18331
|
+
}
|
|
18332
|
+
var ServerMessage_ChannelAdded = {
|
|
18333
|
+
encode(message, writer = new BinaryWriter()) {
|
|
18334
|
+
if (message.roomId !== "") {
|
|
18335
|
+
writer.uint32(10).string(message.roomId);
|
|
18336
|
+
}
|
|
18337
|
+
if (message.peerId !== void 0) {
|
|
18338
|
+
writer.uint32(18).string(message.peerId);
|
|
18339
|
+
}
|
|
18340
|
+
if (message.componentId !== void 0) {
|
|
18341
|
+
writer.uint32(26).string(message.componentId);
|
|
18342
|
+
}
|
|
18343
|
+
if (message.channelId !== "") {
|
|
18344
|
+
writer.uint32(34).string(message.channelId);
|
|
18345
|
+
}
|
|
18346
|
+
return writer;
|
|
18347
|
+
},
|
|
18348
|
+
decode(input, length) {
|
|
18349
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
18350
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
18351
|
+
const message = createBaseServerMessage_ChannelAdded();
|
|
18352
|
+
while (reader.pos < end) {
|
|
18353
|
+
const tag = reader.uint32();
|
|
18354
|
+
switch (tag >>> 3) {
|
|
18355
|
+
case 1: {
|
|
18356
|
+
if (tag !== 10) {
|
|
18357
|
+
break;
|
|
18358
|
+
}
|
|
18359
|
+
message.roomId = reader.string();
|
|
18360
|
+
continue;
|
|
18361
|
+
}
|
|
18362
|
+
case 2: {
|
|
18363
|
+
if (tag !== 18) {
|
|
18364
|
+
break;
|
|
18365
|
+
}
|
|
18366
|
+
message.peerId = reader.string();
|
|
18367
|
+
continue;
|
|
18368
|
+
}
|
|
18369
|
+
case 3: {
|
|
18370
|
+
if (tag !== 26) {
|
|
18371
|
+
break;
|
|
18372
|
+
}
|
|
18373
|
+
message.componentId = reader.string();
|
|
18374
|
+
continue;
|
|
18375
|
+
}
|
|
18376
|
+
case 4: {
|
|
18377
|
+
if (tag !== 34) {
|
|
18378
|
+
break;
|
|
18379
|
+
}
|
|
18380
|
+
message.channelId = reader.string();
|
|
18381
|
+
continue;
|
|
18382
|
+
}
|
|
18383
|
+
}
|
|
18384
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
18385
|
+
break;
|
|
18386
|
+
}
|
|
18387
|
+
reader.skip(tag & 7);
|
|
18388
|
+
}
|
|
18389
|
+
return message;
|
|
18390
|
+
},
|
|
18391
|
+
fromJSON(object) {
|
|
18392
|
+
return {
|
|
18393
|
+
roomId: isSet2(object.roomId) ? globalThis.String(object.roomId) : "",
|
|
18394
|
+
peerId: isSet2(object.peerId) ? globalThis.String(object.peerId) : void 0,
|
|
18395
|
+
componentId: isSet2(object.componentId) ? globalThis.String(object.componentId) : void 0,
|
|
18396
|
+
channelId: isSet2(object.channelId) ? globalThis.String(object.channelId) : ""
|
|
18397
|
+
};
|
|
18398
|
+
},
|
|
18399
|
+
toJSON(message) {
|
|
18400
|
+
const obj = {};
|
|
18401
|
+
if (message.roomId !== "") {
|
|
18402
|
+
obj.roomId = message.roomId;
|
|
18403
|
+
}
|
|
18404
|
+
if (message.peerId !== void 0) {
|
|
18405
|
+
obj.peerId = message.peerId;
|
|
18406
|
+
}
|
|
18407
|
+
if (message.componentId !== void 0) {
|
|
18408
|
+
obj.componentId = message.componentId;
|
|
18409
|
+
}
|
|
18410
|
+
if (message.channelId !== "") {
|
|
18411
|
+
obj.channelId = message.channelId;
|
|
18412
|
+
}
|
|
18413
|
+
return obj;
|
|
18414
|
+
},
|
|
18415
|
+
create(base) {
|
|
18416
|
+
return ServerMessage_ChannelAdded.fromPartial(base ?? {});
|
|
18417
|
+
},
|
|
18418
|
+
fromPartial(object) {
|
|
18419
|
+
const message = createBaseServerMessage_ChannelAdded();
|
|
18420
|
+
message.roomId = object.roomId ?? "";
|
|
18421
|
+
message.peerId = object.peerId ?? void 0;
|
|
18422
|
+
message.componentId = object.componentId ?? void 0;
|
|
18423
|
+
message.channelId = object.channelId ?? "";
|
|
18424
|
+
return message;
|
|
18425
|
+
}
|
|
18426
|
+
};
|
|
18427
|
+
function createBaseServerMessage_ChannelRemoved() {
|
|
18428
|
+
return { roomId: "", peerId: void 0, componentId: void 0, channelId: "" };
|
|
18429
|
+
}
|
|
18430
|
+
var ServerMessage_ChannelRemoved = {
|
|
18431
|
+
encode(message, writer = new BinaryWriter()) {
|
|
18432
|
+
if (message.roomId !== "") {
|
|
18433
|
+
writer.uint32(10).string(message.roomId);
|
|
18434
|
+
}
|
|
18435
|
+
if (message.peerId !== void 0) {
|
|
18436
|
+
writer.uint32(18).string(message.peerId);
|
|
18437
|
+
}
|
|
18438
|
+
if (message.componentId !== void 0) {
|
|
18439
|
+
writer.uint32(26).string(message.componentId);
|
|
18440
|
+
}
|
|
18441
|
+
if (message.channelId !== "") {
|
|
18442
|
+
writer.uint32(34).string(message.channelId);
|
|
18443
|
+
}
|
|
18444
|
+
return writer;
|
|
18445
|
+
},
|
|
18446
|
+
decode(input, length) {
|
|
18447
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
18448
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
18449
|
+
const message = createBaseServerMessage_ChannelRemoved();
|
|
18450
|
+
while (reader.pos < end) {
|
|
18451
|
+
const tag = reader.uint32();
|
|
18452
|
+
switch (tag >>> 3) {
|
|
18453
|
+
case 1: {
|
|
18454
|
+
if (tag !== 10) {
|
|
18455
|
+
break;
|
|
18456
|
+
}
|
|
18457
|
+
message.roomId = reader.string();
|
|
18458
|
+
continue;
|
|
18459
|
+
}
|
|
18460
|
+
case 2: {
|
|
18461
|
+
if (tag !== 18) {
|
|
18462
|
+
break;
|
|
18463
|
+
}
|
|
18464
|
+
message.peerId = reader.string();
|
|
18465
|
+
continue;
|
|
18466
|
+
}
|
|
18467
|
+
case 3: {
|
|
18468
|
+
if (tag !== 26) {
|
|
18469
|
+
break;
|
|
18470
|
+
}
|
|
18471
|
+
message.componentId = reader.string();
|
|
18472
|
+
continue;
|
|
18473
|
+
}
|
|
18474
|
+
case 4: {
|
|
18475
|
+
if (tag !== 34) {
|
|
18476
|
+
break;
|
|
18477
|
+
}
|
|
18478
|
+
message.channelId = reader.string();
|
|
18479
|
+
continue;
|
|
18480
|
+
}
|
|
18481
|
+
}
|
|
18482
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
18483
|
+
break;
|
|
18484
|
+
}
|
|
18485
|
+
reader.skip(tag & 7);
|
|
18486
|
+
}
|
|
18487
|
+
return message;
|
|
18488
|
+
},
|
|
18489
|
+
fromJSON(object) {
|
|
18490
|
+
return {
|
|
18491
|
+
roomId: isSet2(object.roomId) ? globalThis.String(object.roomId) : "",
|
|
18492
|
+
peerId: isSet2(object.peerId) ? globalThis.String(object.peerId) : void 0,
|
|
18493
|
+
componentId: isSet2(object.componentId) ? globalThis.String(object.componentId) : void 0,
|
|
18494
|
+
channelId: isSet2(object.channelId) ? globalThis.String(object.channelId) : ""
|
|
18495
|
+
};
|
|
18496
|
+
},
|
|
18497
|
+
toJSON(message) {
|
|
18498
|
+
const obj = {};
|
|
18499
|
+
if (message.roomId !== "") {
|
|
18500
|
+
obj.roomId = message.roomId;
|
|
18501
|
+
}
|
|
18502
|
+
if (message.peerId !== void 0) {
|
|
18503
|
+
obj.peerId = message.peerId;
|
|
18504
|
+
}
|
|
18505
|
+
if (message.componentId !== void 0) {
|
|
18506
|
+
obj.componentId = message.componentId;
|
|
18507
|
+
}
|
|
18508
|
+
if (message.channelId !== "") {
|
|
18509
|
+
obj.channelId = message.channelId;
|
|
18510
|
+
}
|
|
18511
|
+
return obj;
|
|
18512
|
+
},
|
|
18513
|
+
create(base) {
|
|
18514
|
+
return ServerMessage_ChannelRemoved.fromPartial(base ?? {});
|
|
18515
|
+
},
|
|
18516
|
+
fromPartial(object) {
|
|
18517
|
+
const message = createBaseServerMessage_ChannelRemoved();
|
|
18518
|
+
message.roomId = object.roomId ?? "";
|
|
18519
|
+
message.peerId = object.peerId ?? void 0;
|
|
18520
|
+
message.componentId = object.componentId ?? void 0;
|
|
18521
|
+
message.channelId = object.channelId ?? "";
|
|
18522
|
+
return message;
|
|
18523
|
+
}
|
|
18524
|
+
};
|
|
18302
18525
|
function createBaseServerMessage_StreamConnected() {
|
|
18303
18526
|
return { streamId: "" };
|
|
18304
18527
|
}
|
|
@@ -18683,7 +18906,8 @@ var require_dist2 = __commonJS({
|
|
|
18683
18906
|
addTrack: void 0,
|
|
18684
18907
|
removeTrack: void 0,
|
|
18685
18908
|
trackData: void 0,
|
|
18686
|
-
interruptTrack: void 0
|
|
18909
|
+
interruptTrack: void 0,
|
|
18910
|
+
captureImage: void 0
|
|
18687
18911
|
};
|
|
18688
18912
|
}
|
|
18689
18913
|
var AgentRequest2 = {
|
|
@@ -18703,6 +18927,9 @@ var require_dist2 = __commonJS({
|
|
|
18703
18927
|
if (message.interruptTrack !== void 0) {
|
|
18704
18928
|
AgentRequest_InterruptTrack.encode(message.interruptTrack, writer.uint32(42).fork()).join();
|
|
18705
18929
|
}
|
|
18930
|
+
if (message.captureImage !== void 0) {
|
|
18931
|
+
AgentRequest_CaptureImage.encode(message.captureImage, writer.uint32(50).fork()).join();
|
|
18932
|
+
}
|
|
18706
18933
|
return writer;
|
|
18707
18934
|
},
|
|
18708
18935
|
decode(input, length) {
|
|
@@ -18747,6 +18974,13 @@ var require_dist2 = __commonJS({
|
|
|
18747
18974
|
message.interruptTrack = AgentRequest_InterruptTrack.decode(reader, reader.uint32());
|
|
18748
18975
|
continue;
|
|
18749
18976
|
}
|
|
18977
|
+
case 6: {
|
|
18978
|
+
if (tag !== 50) {
|
|
18979
|
+
break;
|
|
18980
|
+
}
|
|
18981
|
+
message.captureImage = AgentRequest_CaptureImage.decode(reader, reader.uint32());
|
|
18982
|
+
continue;
|
|
18983
|
+
}
|
|
18750
18984
|
}
|
|
18751
18985
|
if ((tag & 7) === 4 || tag === 0) {
|
|
18752
18986
|
break;
|
|
@@ -18761,7 +18995,8 @@ var require_dist2 = __commonJS({
|
|
|
18761
18995
|
addTrack: isSet3(object.addTrack) ? AgentRequest_AddTrack.fromJSON(object.addTrack) : void 0,
|
|
18762
18996
|
removeTrack: isSet3(object.removeTrack) ? AgentRequest_RemoveTrack.fromJSON(object.removeTrack) : void 0,
|
|
18763
18997
|
trackData: isSet3(object.trackData) ? AgentRequest_TrackData2.fromJSON(object.trackData) : void 0,
|
|
18764
|
-
interruptTrack: isSet3(object.interruptTrack) ? AgentRequest_InterruptTrack.fromJSON(object.interruptTrack) : void 0
|
|
18998
|
+
interruptTrack: isSet3(object.interruptTrack) ? AgentRequest_InterruptTrack.fromJSON(object.interruptTrack) : void 0,
|
|
18999
|
+
captureImage: isSet3(object.captureImage) ? AgentRequest_CaptureImage.fromJSON(object.captureImage) : void 0
|
|
18765
19000
|
};
|
|
18766
19001
|
},
|
|
18767
19002
|
toJSON(message) {
|
|
@@ -18781,6 +19016,9 @@ var require_dist2 = __commonJS({
|
|
|
18781
19016
|
if (message.interruptTrack !== void 0) {
|
|
18782
19017
|
obj.interruptTrack = AgentRequest_InterruptTrack.toJSON(message.interruptTrack);
|
|
18783
19018
|
}
|
|
19019
|
+
if (message.captureImage !== void 0) {
|
|
19020
|
+
obj.captureImage = AgentRequest_CaptureImage.toJSON(message.captureImage);
|
|
19021
|
+
}
|
|
18784
19022
|
return obj;
|
|
18785
19023
|
},
|
|
18786
19024
|
create(base) {
|
|
@@ -18793,6 +19031,7 @@ var require_dist2 = __commonJS({
|
|
|
18793
19031
|
message.removeTrack = object.removeTrack !== void 0 && object.removeTrack !== null ? AgentRequest_RemoveTrack.fromPartial(object.removeTrack) : void 0;
|
|
18794
19032
|
message.trackData = object.trackData !== void 0 && object.trackData !== null ? AgentRequest_TrackData2.fromPartial(object.trackData) : void 0;
|
|
18795
19033
|
message.interruptTrack = object.interruptTrack !== void 0 && object.interruptTrack !== null ? AgentRequest_InterruptTrack.fromPartial(object.interruptTrack) : void 0;
|
|
19034
|
+
message.captureImage = object.captureImage !== void 0 && object.captureImage !== null ? AgentRequest_CaptureImage.fromPartial(object.captureImage) : void 0;
|
|
18796
19035
|
return message;
|
|
18797
19036
|
}
|
|
18798
19037
|
};
|
|
@@ -19168,8 +19407,59 @@ var require_dist2 = __commonJS({
|
|
|
19168
19407
|
return message;
|
|
19169
19408
|
}
|
|
19170
19409
|
};
|
|
19410
|
+
function createBaseAgentRequest_CaptureImage() {
|
|
19411
|
+
return { trackId: "" };
|
|
19412
|
+
}
|
|
19413
|
+
var AgentRequest_CaptureImage = {
|
|
19414
|
+
encode(message, writer = new BinaryWriter()) {
|
|
19415
|
+
if (message.trackId !== "") {
|
|
19416
|
+
writer.uint32(10).string(message.trackId);
|
|
19417
|
+
}
|
|
19418
|
+
return writer;
|
|
19419
|
+
},
|
|
19420
|
+
decode(input, length) {
|
|
19421
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
19422
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
19423
|
+
const message = createBaseAgentRequest_CaptureImage();
|
|
19424
|
+
while (reader.pos < end) {
|
|
19425
|
+
const tag = reader.uint32();
|
|
19426
|
+
switch (tag >>> 3) {
|
|
19427
|
+
case 1: {
|
|
19428
|
+
if (tag !== 10) {
|
|
19429
|
+
break;
|
|
19430
|
+
}
|
|
19431
|
+
message.trackId = reader.string();
|
|
19432
|
+
continue;
|
|
19433
|
+
}
|
|
19434
|
+
}
|
|
19435
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
19436
|
+
break;
|
|
19437
|
+
}
|
|
19438
|
+
reader.skip(tag & 7);
|
|
19439
|
+
}
|
|
19440
|
+
return message;
|
|
19441
|
+
},
|
|
19442
|
+
fromJSON(object) {
|
|
19443
|
+
return { trackId: isSet3(object.trackId) ? globalThis.String(object.trackId) : "" };
|
|
19444
|
+
},
|
|
19445
|
+
toJSON(message) {
|
|
19446
|
+
const obj = {};
|
|
19447
|
+
if (message.trackId !== "") {
|
|
19448
|
+
obj.trackId = message.trackId;
|
|
19449
|
+
}
|
|
19450
|
+
return obj;
|
|
19451
|
+
},
|
|
19452
|
+
create(base) {
|
|
19453
|
+
return AgentRequest_CaptureImage.fromPartial(base ?? {});
|
|
19454
|
+
},
|
|
19455
|
+
fromPartial(object) {
|
|
19456
|
+
const message = createBaseAgentRequest_CaptureImage();
|
|
19457
|
+
message.trackId = object.trackId ?? "";
|
|
19458
|
+
return message;
|
|
19459
|
+
}
|
|
19460
|
+
};
|
|
19171
19461
|
function createBaseAgentResponse() {
|
|
19172
|
-
return { authenticated: void 0, trackData: void 0 };
|
|
19462
|
+
return { authenticated: void 0, trackData: void 0, trackImage: void 0 };
|
|
19173
19463
|
}
|
|
19174
19464
|
var AgentResponse2 = {
|
|
19175
19465
|
encode(message, writer = new BinaryWriter()) {
|
|
@@ -19179,6 +19469,9 @@ var require_dist2 = __commonJS({
|
|
|
19179
19469
|
if (message.trackData !== void 0) {
|
|
19180
19470
|
AgentResponse_TrackData2.encode(message.trackData, writer.uint32(18).fork()).join();
|
|
19181
19471
|
}
|
|
19472
|
+
if (message.trackImage !== void 0) {
|
|
19473
|
+
AgentResponse_TrackImage.encode(message.trackImage, writer.uint32(26).fork()).join();
|
|
19474
|
+
}
|
|
19182
19475
|
return writer;
|
|
19183
19476
|
},
|
|
19184
19477
|
decode(input, length) {
|
|
@@ -19202,6 +19495,13 @@ var require_dist2 = __commonJS({
|
|
|
19202
19495
|
message.trackData = AgentResponse_TrackData2.decode(reader, reader.uint32());
|
|
19203
19496
|
continue;
|
|
19204
19497
|
}
|
|
19498
|
+
case 3: {
|
|
19499
|
+
if (tag !== 26) {
|
|
19500
|
+
break;
|
|
19501
|
+
}
|
|
19502
|
+
message.trackImage = AgentResponse_TrackImage.decode(reader, reader.uint32());
|
|
19503
|
+
continue;
|
|
19504
|
+
}
|
|
19205
19505
|
}
|
|
19206
19506
|
if ((tag & 7) === 4 || tag === 0) {
|
|
19207
19507
|
break;
|
|
@@ -19213,7 +19513,8 @@ var require_dist2 = __commonJS({
|
|
|
19213
19513
|
fromJSON(object) {
|
|
19214
19514
|
return {
|
|
19215
19515
|
authenticated: isSet3(object.authenticated) ? AgentResponse_Authenticated.fromJSON(object.authenticated) : void 0,
|
|
19216
|
-
trackData: isSet3(object.trackData) ? AgentResponse_TrackData2.fromJSON(object.trackData) : void 0
|
|
19516
|
+
trackData: isSet3(object.trackData) ? AgentResponse_TrackData2.fromJSON(object.trackData) : void 0,
|
|
19517
|
+
trackImage: isSet3(object.trackImage) ? AgentResponse_TrackImage.fromJSON(object.trackImage) : void 0
|
|
19217
19518
|
};
|
|
19218
19519
|
},
|
|
19219
19520
|
toJSON(message) {
|
|
@@ -19224,6 +19525,9 @@ var require_dist2 = __commonJS({
|
|
|
19224
19525
|
if (message.trackData !== void 0) {
|
|
19225
19526
|
obj.trackData = AgentResponse_TrackData2.toJSON(message.trackData);
|
|
19226
19527
|
}
|
|
19528
|
+
if (message.trackImage !== void 0) {
|
|
19529
|
+
obj.trackImage = AgentResponse_TrackImage.toJSON(message.trackImage);
|
|
19530
|
+
}
|
|
19227
19531
|
return obj;
|
|
19228
19532
|
},
|
|
19229
19533
|
create(base) {
|
|
@@ -19233,6 +19537,7 @@ var require_dist2 = __commonJS({
|
|
|
19233
19537
|
const message = createBaseAgentResponse();
|
|
19234
19538
|
message.authenticated = object.authenticated !== void 0 && object.authenticated !== null ? AgentResponse_Authenticated.fromPartial(object.authenticated) : void 0;
|
|
19235
19539
|
message.trackData = object.trackData !== void 0 && object.trackData !== null ? AgentResponse_TrackData2.fromPartial(object.trackData) : void 0;
|
|
19540
|
+
message.trackImage = object.trackImage !== void 0 && object.trackImage !== null ? AgentResponse_TrackImage.fromPartial(object.trackImage) : void 0;
|
|
19236
19541
|
return message;
|
|
19237
19542
|
}
|
|
19238
19543
|
};
|
|
@@ -19356,6 +19661,89 @@ var require_dist2 = __commonJS({
|
|
|
19356
19661
|
return message;
|
|
19357
19662
|
}
|
|
19358
19663
|
};
|
|
19664
|
+
function createBaseAgentResponse_TrackImage() {
|
|
19665
|
+
return { trackId: "", contentType: "", data: new Uint8Array(0) };
|
|
19666
|
+
}
|
|
19667
|
+
var AgentResponse_TrackImage = {
|
|
19668
|
+
encode(message, writer = new BinaryWriter()) {
|
|
19669
|
+
if (message.trackId !== "") {
|
|
19670
|
+
writer.uint32(10).string(message.trackId);
|
|
19671
|
+
}
|
|
19672
|
+
if (message.contentType !== "") {
|
|
19673
|
+
writer.uint32(18).string(message.contentType);
|
|
19674
|
+
}
|
|
19675
|
+
if (message.data.length !== 0) {
|
|
19676
|
+
writer.uint32(26).bytes(message.data);
|
|
19677
|
+
}
|
|
19678
|
+
return writer;
|
|
19679
|
+
},
|
|
19680
|
+
decode(input, length) {
|
|
19681
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
19682
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
19683
|
+
const message = createBaseAgentResponse_TrackImage();
|
|
19684
|
+
while (reader.pos < end) {
|
|
19685
|
+
const tag = reader.uint32();
|
|
19686
|
+
switch (tag >>> 3) {
|
|
19687
|
+
case 1: {
|
|
19688
|
+
if (tag !== 10) {
|
|
19689
|
+
break;
|
|
19690
|
+
}
|
|
19691
|
+
message.trackId = reader.string();
|
|
19692
|
+
continue;
|
|
19693
|
+
}
|
|
19694
|
+
case 2: {
|
|
19695
|
+
if (tag !== 18) {
|
|
19696
|
+
break;
|
|
19697
|
+
}
|
|
19698
|
+
message.contentType = reader.string();
|
|
19699
|
+
continue;
|
|
19700
|
+
}
|
|
19701
|
+
case 3: {
|
|
19702
|
+
if (tag !== 26) {
|
|
19703
|
+
break;
|
|
19704
|
+
}
|
|
19705
|
+
message.data = reader.bytes();
|
|
19706
|
+
continue;
|
|
19707
|
+
}
|
|
19708
|
+
}
|
|
19709
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
19710
|
+
break;
|
|
19711
|
+
}
|
|
19712
|
+
reader.skip(tag & 7);
|
|
19713
|
+
}
|
|
19714
|
+
return message;
|
|
19715
|
+
},
|
|
19716
|
+
fromJSON(object) {
|
|
19717
|
+
return {
|
|
19718
|
+
trackId: isSet3(object.trackId) ? globalThis.String(object.trackId) : "",
|
|
19719
|
+
contentType: isSet3(object.contentType) ? globalThis.String(object.contentType) : "",
|
|
19720
|
+
data: isSet3(object.data) ? bytesFromBase64(object.data) : new Uint8Array(0)
|
|
19721
|
+
};
|
|
19722
|
+
},
|
|
19723
|
+
toJSON(message) {
|
|
19724
|
+
const obj = {};
|
|
19725
|
+
if (message.trackId !== "") {
|
|
19726
|
+
obj.trackId = message.trackId;
|
|
19727
|
+
}
|
|
19728
|
+
if (message.contentType !== "") {
|
|
19729
|
+
obj.contentType = message.contentType;
|
|
19730
|
+
}
|
|
19731
|
+
if (message.data.length !== 0) {
|
|
19732
|
+
obj.data = base64FromBytes(message.data);
|
|
19733
|
+
}
|
|
19734
|
+
return obj;
|
|
19735
|
+
},
|
|
19736
|
+
create(base) {
|
|
19737
|
+
return AgentResponse_TrackImage.fromPartial(base ?? {});
|
|
19738
|
+
},
|
|
19739
|
+
fromPartial(object) {
|
|
19740
|
+
const message = createBaseAgentResponse_TrackImage();
|
|
19741
|
+
message.trackId = object.trackId ?? "";
|
|
19742
|
+
message.contentType = object.contentType ?? "";
|
|
19743
|
+
message.data = object.data ?? new Uint8Array(0);
|
|
19744
|
+
return message;
|
|
19745
|
+
}
|
|
19746
|
+
};
|
|
19359
19747
|
function bytesFromBase64(b64) {
|
|
19360
19748
|
if (globalThis.Buffer) {
|
|
19361
19749
|
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
@@ -19543,7 +19931,7 @@ var FishjamAgent = class extends EventEmitter2 {
|
|
|
19543
19931
|
return track;
|
|
19544
19932
|
}
|
|
19545
19933
|
/**
|
|
19546
|
-
* Interrupt track
|
|
19934
|
+
* Interrupt track identified by `trackId`.
|
|
19547
19935
|
*
|
|
19548
19936
|
* Any audio that has been sent by the agent, but not played
|
|
19549
19937
|
* by Fishjam will be cleared and be prevented from playing.
|
|
@@ -19639,6 +20027,7 @@ var FishjamClient = class {
|
|
|
19639
20027
|
viewerApi;
|
|
19640
20028
|
streamerApi;
|
|
19641
20029
|
fishjamConfig;
|
|
20030
|
+
deprecationWarningShown = false;
|
|
19642
20031
|
/**
|
|
19643
20032
|
* Create new instance of Fishjam Client.
|
|
19644
20033
|
*
|
|
@@ -19653,15 +20042,34 @@ var FishjamClient = class {
|
|
|
19653
20042
|
constructor(config) {
|
|
19654
20043
|
const client = axios.create({
|
|
19655
20044
|
headers: {
|
|
19656
|
-
Authorization: `Bearer ${config.managementToken}
|
|
20045
|
+
Authorization: `Bearer ${config.managementToken}`,
|
|
20046
|
+
"x-fishjam-api-client": `js-server/${package_default.version}`
|
|
19657
20047
|
}
|
|
19658
20048
|
});
|
|
20049
|
+
client.interceptors.response.use((response) => {
|
|
20050
|
+
this.handleDeprecationHeader(response.headers);
|
|
20051
|
+
return response;
|
|
20052
|
+
});
|
|
19659
20053
|
const fishjamUrl = getFishjamUrl(config);
|
|
19660
20054
|
this.roomApi = new import_fishjam_openapi.RoomApi(void 0, fishjamUrl, client);
|
|
19661
20055
|
this.viewerApi = new import_fishjam_openapi.ViewerApi(void 0, fishjamUrl, client);
|
|
19662
20056
|
this.streamerApi = new import_fishjam_openapi.StreamerApi(void 0, fishjamUrl, client);
|
|
19663
20057
|
this.fishjamConfig = config;
|
|
19664
20058
|
}
|
|
20059
|
+
handleDeprecationHeader(headers) {
|
|
20060
|
+
try {
|
|
20061
|
+
const deprecationHeader = headers["x-fishjam-api-deprecated"];
|
|
20062
|
+
if (!deprecationHeader || this.deprecationWarningShown) return;
|
|
20063
|
+
const deprecationStatus = JSON.parse(deprecationHeader);
|
|
20064
|
+
if (deprecationStatus.status === "unsupported") {
|
|
20065
|
+
console.error(deprecationStatus.message);
|
|
20066
|
+
} else if (deprecationStatus.status === "deprecated") {
|
|
20067
|
+
console.warn(deprecationStatus.message);
|
|
20068
|
+
}
|
|
20069
|
+
this.deprecationWarningShown = true;
|
|
20070
|
+
} catch {
|
|
20071
|
+
}
|
|
20072
|
+
}
|
|
19665
20073
|
/**
|
|
19666
20074
|
* Create a new room. All peers connected to the same room will be able to send/receive streams to each other.
|
|
19667
20075
|
*/
|
|
@@ -19821,10 +20229,10 @@ var export_PeerOptionsAgent = import_fishjam_openapi2.PeerOptionsAgent;
|
|
|
19821
20229
|
var export_PeerOptionsWebRTC = import_fishjam_openapi2.PeerOptionsWebRTC;
|
|
19822
20230
|
var export_PeerStatus = import_fishjam_openapi2.PeerStatus;
|
|
19823
20231
|
var export_RoomConfig = import_fishjam_openapi2.RoomConfig;
|
|
19824
|
-
var
|
|
19825
|
-
var export_RoomConfigVideoCodecEnum = import_fishjam_openapi2.RoomConfigVideoCodecEnum;
|
|
20232
|
+
var export_RoomType = import_fishjam_openapi2.RoomType;
|
|
19826
20233
|
var export_ServerMessage = import_fishjam_proto3.ServerMessage;
|
|
19827
20234
|
var export_StreamerToken = import_fishjam_openapi2.StreamerToken;
|
|
20235
|
+
var export_VideoCodec = import_fishjam_openapi2.VideoCodec;
|
|
19828
20236
|
var export_ViewerToken = import_fishjam_openapi2.ViewerToken;
|
|
19829
20237
|
export {
|
|
19830
20238
|
BadRequestException,
|
|
@@ -19841,14 +20249,14 @@ export {
|
|
|
19841
20249
|
export_PeerOptionsWebRTC as PeerOptionsWebRTC,
|
|
19842
20250
|
export_PeerStatus as PeerStatus,
|
|
19843
20251
|
export_RoomConfig as RoomConfig,
|
|
19844
|
-
export_RoomConfigRoomTypeEnum as RoomConfigRoomTypeEnum,
|
|
19845
|
-
export_RoomConfigVideoCodecEnum as RoomConfigVideoCodecEnum,
|
|
19846
20252
|
RoomNotFoundException,
|
|
20253
|
+
export_RoomType as RoomType,
|
|
19847
20254
|
export_ServerMessage as ServerMessage,
|
|
19848
20255
|
ServiceUnavailableException,
|
|
19849
20256
|
export_StreamerToken as StreamerToken,
|
|
19850
20257
|
UnauthorizedException,
|
|
19851
20258
|
UnknownException,
|
|
20259
|
+
export_VideoCodec as VideoCodec,
|
|
19852
20260
|
export_ViewerToken as ViewerToken
|
|
19853
20261
|
};
|
|
19854
20262
|
/*! Bundled license information:
|