@gbraver-burst-network/anonymous-browser-sdk 1.30.0-beta.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.
Files changed (119) hide show
  1. package/LICENSE.txt +7 -0
  2. package/Readme.md +37 -0
  3. package/lib/http-api/frontend-log.d.ts +14 -0
  4. package/lib/http-api/frontend-log.js +33 -0
  5. package/lib/http-api/issue-auth-token.d.ts +7 -0
  6. package/lib/http-api/issue-auth-token.js +29 -0
  7. package/lib/http-api/issue-coturn-credential.d.ts +12 -0
  8. package/lib/http-api/issue-coturn-credential.js +36 -0
  9. package/lib/http-api/request/frontend-log.d.ts +30 -0
  10. package/lib/http-api/request/frontend-log.js +2 -0
  11. package/lib/http-api/response/issue-auth-token.d.ts +13 -0
  12. package/lib/http-api/response/issue-auth-token.js +9 -0
  13. package/lib/http-api/response/issue-coturn-credential.d.ts +13 -0
  14. package/lib/http-api/response/issue-coturn-credential.js +9 -0
  15. package/lib/index.d.ts +5 -0
  16. package/lib/index.js +9 -0
  17. package/lib/json/parse.d.ts +7 -0
  18. package/lib/json/parse.js +20 -0
  19. package/lib/sdk/auth-token-manager.d.ts +23 -0
  20. package/lib/sdk/auth-token-manager.js +72 -0
  21. package/lib/sdk/battle-sdk.d.ts +25 -0
  22. package/lib/sdk/battle-sdk.js +2 -0
  23. package/lib/sdk/create-rtc-peer-connection.d.ts +13 -0
  24. package/lib/sdk/create-rtc-peer-connection.js +45 -0
  25. package/lib/sdk/frontend-log-manager.d.ts +23 -0
  26. package/lib/sdk/frontend-log-manager.js +65 -0
  27. package/lib/sdk/guest-battle-sdk.d.ts +36 -0
  28. package/lib/sdk/guest-battle-sdk.js +78 -0
  29. package/lib/sdk/guest-local-webrtc-sdk.d.ts +54 -0
  30. package/lib/sdk/guest-local-webrtc-sdk.js +194 -0
  31. package/lib/sdk/guest-webrtc-connection-manager.d.ts +33 -0
  32. package/lib/sdk/guest-webrtc-connection-manager.js +71 -0
  33. package/lib/sdk/host-battle-sdk.d.ts +39 -0
  34. package/lib/sdk/host-battle-sdk.js +108 -0
  35. package/lib/sdk/host-local-webrtc-sdk.d.ts +50 -0
  36. package/lib/sdk/host-local-webrtc-sdk.js +99 -0
  37. package/lib/sdk/host-webrtc-connection-manager.d.ts +37 -0
  38. package/lib/sdk/host-webrtc-connection-manager.js +84 -0
  39. package/lib/sdk/local-webrtc-room.d.ts +44 -0
  40. package/lib/sdk/local-webrtc-room.js +178 -0
  41. package/lib/sdk/websocket-connection-manager.d.ts +34 -0
  42. package/lib/sdk/websocket-connection-manager.js +92 -0
  43. package/lib/webrtc/gather-all-ice-candidate.d.ts +20 -0
  44. package/lib/webrtc/gather-all-ice-candidate.js +45 -0
  45. package/lib/webrtc/get-selected-ice-candidate-summary.d.ts +6 -0
  46. package/lib/webrtc/get-selected-ice-candidate-summary.js +36 -0
  47. package/lib/webrtc/guest/guest-message.d.ts +48 -0
  48. package/lib/webrtc/guest/guest-message.js +27 -0
  49. package/lib/webrtc/guest/receive-battle-progressed.d.ts +7 -0
  50. package/lib/webrtc/guest/receive-battle-progressed.js +29 -0
  51. package/lib/webrtc/guest/receive-battle-start.d.ts +7 -0
  52. package/lib/webrtc/guest/receive-battle-start.js +29 -0
  53. package/lib/webrtc/guest/receive-request-selected-player.d.ts +7 -0
  54. package/lib/webrtc/guest/receive-request-selected-player.js +29 -0
  55. package/lib/webrtc/guest/wait-until-data-channel.d.ts +6 -0
  56. package/lib/webrtc/guest/wait-until-data-channel.js +14 -0
  57. package/lib/webrtc/host/host-message.d.ts +1001 -0
  58. package/lib/webrtc/host/host-message.js +33 -0
  59. package/lib/webrtc/host/receive-send-command.d.ts +8 -0
  60. package/lib/webrtc/host/receive-send-command.js +31 -0
  61. package/lib/webrtc/host/request-selected-player.d.ts +16 -0
  62. package/lib/webrtc/host/request-selected-player.js +35 -0
  63. package/lib/webrtc/notify-connection-failed.d.ts +7 -0
  64. package/lib/webrtc/notify-connection-failed.js +11 -0
  65. package/lib/webrtc/rtc-ice-candidate-init-schema.d.ts +8 -0
  66. package/lib/webrtc/rtc-ice-candidate-init-schema.js +11 -0
  67. package/lib/webrtc/rtc-session-description-init-schema.d.ts +11 -0
  68. package/lib/webrtc/rtc-session-description-init-schema.js +9 -0
  69. package/lib/webrtc/wait-until-connected.d.ts +6 -0
  70. package/lib/webrtc/wait-until-connected.js +28 -0
  71. package/lib/webrtc/wait-until-data-channel-ready.d.ts +6 -0
  72. package/lib/webrtc/wait-until-data-channel-ready.js +28 -0
  73. package/lib/websocket-api/connect-ws-signal.d.ts +7 -0
  74. package/lib/websocket-api/connect-ws-signal.js +29 -0
  75. package/lib/websocket-api/create-room.d.ts +6 -0
  76. package/lib/websocket-api/create-room.js +37 -0
  77. package/lib/websocket-api/delete-signaling-channel.d.ts +11 -0
  78. package/lib/websocket-api/delete-signaling-channel.js +43 -0
  79. package/lib/websocket-api/join-room.d.ts +12 -0
  80. package/lib/websocket-api/join-room.js +40 -0
  81. package/lib/websocket-api/notify-ice-candidate-recieved.d.ts +7 -0
  82. package/lib/websocket-api/notify-ice-candidate-recieved.js +13 -0
  83. package/lib/websocket-api/request/create-room.d.ts +4 -0
  84. package/lib/websocket-api/request/create-room.js +2 -0
  85. package/lib/websocket-api/request/delete-signaling-channel.d.ts +6 -0
  86. package/lib/websocket-api/request/delete-signaling-channel.js +2 -0
  87. package/lib/websocket-api/request/index.d.ts +7 -0
  88. package/lib/websocket-api/request/index.js +2 -0
  89. package/lib/websocket-api/request/join-room.d.ts +6 -0
  90. package/lib/websocket-api/request/join-room.js +2 -0
  91. package/lib/websocket-api/request/send-ice-candidate.d.ts +8 -0
  92. package/lib/websocket-api/request/send-ice-candidate.js +2 -0
  93. package/lib/websocket-api/request/send-sdp.d.ts +8 -0
  94. package/lib/websocket-api/request/send-sdp.js +2 -0
  95. package/lib/websocket-api/response/delete-signaling-channel-accepted.d.ts +9 -0
  96. package/lib/websocket-api/response/delete-signaling-channel-accepted.js +8 -0
  97. package/lib/websocket-api/response/delete-signaling-channel-rejected.d.ts +9 -0
  98. package/lib/websocket-api/response/delete-signaling-channel-rejected.js +8 -0
  99. package/lib/websocket-api/response/join-room-accepted.d.ts +12 -0
  100. package/lib/websocket-api/response/join-room-accepted.js +9 -0
  101. package/lib/websocket-api/response/join-room-rejected.d.ts +9 -0
  102. package/lib/websocket-api/response/join-room-rejected.js +8 -0
  103. package/lib/websocket-api/response/matching.d.ts +12 -0
  104. package/lib/websocket-api/response/matching.js +9 -0
  105. package/lib/websocket-api/response/receive-ice-candidate.d.ts +20 -0
  106. package/lib/websocket-api/response/receive-ice-candidate.js +11 -0
  107. package/lib/websocket-api/response/receive-remote-sdp.d.ts +23 -0
  108. package/lib/websocket-api/response/receive-remote-sdp.js +11 -0
  109. package/lib/websocket-api/response/room-creation-result.d.ts +37 -0
  110. package/lib/websocket-api/response/room-creation-result.js +20 -0
  111. package/lib/websocket-api/response/send-sdp-rejected.d.ts +9 -0
  112. package/lib/websocket-api/response/send-sdp-rejected.js +8 -0
  113. package/lib/websocket-api/send-to-ws-signal.d.ts +7 -0
  114. package/lib/websocket-api/send-to-ws-signal.js +11 -0
  115. package/lib/websocket-api/wait-until-matching.d.ts +6 -0
  116. package/lib/websocket-api/wait-until-matching.js +29 -0
  117. package/lib/websocket-api/wait-until-sdp-recieve.d.ts +6 -0
  118. package/lib/websocket-api/wait-until-sdp-recieve.js +33 -0
  119. package/package.json +52 -0
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12
+ if (kind === "m") throw new TypeError("Private method is not writable");
13
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
15
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16
+ };
17
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
18
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
19
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
20
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
21
+ };
22
+ var _GuestBattleSDK_webRTCConnection, _GuestBattleSDK_sendExceptionSubject;
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.GuestBattleSDK = void 0;
25
+ const rxjs_1 = require("rxjs");
26
+ const guest_message_1 = require("../webrtc/guest/guest-message");
27
+ const receive_battle_progressed_1 = require("../webrtc/guest/receive-battle-progressed");
28
+ const notify_connection_failed_1 = require("../webrtc/notify-connection-failed");
29
+ /** ゲスト側バトルSDK */
30
+ class GuestBattleSDK {
31
+ /**
32
+ * コンストラクタ
33
+ * @param options オプション
34
+ * @param options.hostPlayer ホスト側のプレイヤー情報
35
+ * @param options.guestPlayer ゲスト側のプレイヤー情報
36
+ * @param options.initialState ゲームの初期状態
37
+ * @param options.initialFlowID 初期のフローID
38
+ * @param options.webRTCConnection ホストのWebRTCコネクションマネージャー
39
+ */
40
+ constructor(options) {
41
+ /** ホストのWebRTCコネクションマネージャー */
42
+ _GuestBattleSDK_webRTCConnection.set(this, void 0);
43
+ /** dataChannel.sendの例外通知ストリーム */
44
+ _GuestBattleSDK_sendExceptionSubject.set(this, new rxjs_1.Subject());
45
+ this.player = options.guestPlayer;
46
+ this.enemy = options.hostPlayer;
47
+ this.initialState = options.initialState;
48
+ this.flowID = options.initialFlowID;
49
+ __classPrivateFieldSet(this, _GuestBattleSDK_webRTCConnection, options.webRTCConnection, "f");
50
+ }
51
+ /** @override */
52
+ progress(command) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ const dataChannel = yield __classPrivateFieldGet(this, _GuestBattleSDK_webRTCConnection, "f").getOrCreateConnection().dataChannelPromise;
55
+ const battleProgressedPromise = (0, receive_battle_progressed_1.receiveBattleProgressed)(dataChannel);
56
+ try {
57
+ (0, guest_message_1.sendGuestMessage)(dataChannel, {
58
+ type: "send-command",
59
+ flowID: this.flowID,
60
+ command,
61
+ });
62
+ }
63
+ catch (error) {
64
+ __classPrivateFieldGet(this, _GuestBattleSDK_sendExceptionSubject, "f").next(error);
65
+ throw error;
66
+ }
67
+ const battleProgressed = yield battleProgressedPromise;
68
+ this.flowID = battleProgressed.flowID;
69
+ return battleProgressed.update;
70
+ });
71
+ }
72
+ /** @override */
73
+ suddenlyBattleEndNotifier() {
74
+ return (0, rxjs_1.from)(__classPrivateFieldGet(this, _GuestBattleSDK_webRTCConnection, "f").getOrCreateConnection().connectionPromise).pipe((0, rxjs_1.mergeMap)((connection) => (0, notify_connection_failed_1.notifyConnectionFailed)(connection)), (0, rxjs_1.takeUntil)(__classPrivateFieldGet(this, _GuestBattleSDK_sendExceptionSubject, "f")), (0, rxjs_1.take)(1));
75
+ }
76
+ }
77
+ exports.GuestBattleSDK = GuestBattleSDK;
78
+ _GuestBattleSDK_webRTCConnection = new WeakMap(), _GuestBattleSDK_sendExceptionSubject = new WeakMap();
@@ -0,0 +1,54 @@
1
+ import { ArmdozerId, PilotId } from "gbraver-burst-core";
2
+ import { Observable } from "rxjs";
3
+ import { BattleSDK } from "./battle-sdk";
4
+ import { GuestWebRTCConnectionManagerOptions } from "./guest-webrtc-connection-manager";
5
+ /** ローカルWebRTCゲスト用SDK */
6
+ export type GuestLocalWebRTCSDK = {
7
+ /**
8
+ * ルームに参加する
9
+ * 本メソッドでは新しいWebRTCコネクションを生成し、シグナリングも行うため、
10
+ * 既存のWebRTCコネクションやシグナリングは本メソッド内で切断される
11
+ * @param options ルーム参加のオプション
12
+ * @param options.roomID ルームID
13
+ * @param options.armdozerId ゲストが選択したアームドーザのID
14
+ * @param options.pilotId ゲストが選択したパイロットのID
15
+ * @returns ルームへの参加に成功したらBattleSDK、失敗したらnull
16
+ */
17
+ joinRoom: (options: {
18
+ roomID: string;
19
+ armdozerId: ArmdozerId;
20
+ pilotId: PilotId;
21
+ }) => Promise<BattleSDK | null>;
22
+ /**
23
+ * WebSocketのエラーを通知する
24
+ * @returns 通知ストリーム
25
+ */
26
+ websocketErrorNotifier(): Observable<unknown>;
27
+ /**
28
+ * WebSocketコネクションを切断する
29
+ * シグナリングの際に自動的に接続・切断されるが、
30
+ * シグナリングをキャンセルする場合に本メソッドを呼び出す
31
+ */
32
+ disconnectWebSocket(): void;
33
+ /**
34
+ * WebRTCコネクションを切断する
35
+ * 利用側で明示的に本メソッドを呼ばない限り、WebRTCコネクションは切断されない
36
+ */
37
+ disconnectWebRTC(): void;
38
+ };
39
+ /** LocalWebRTCGuestSDKImplコンストラクタのオプション */
40
+ type LocalWebRTCGuestSDKImplOptions = GuestWebRTCConnectionManagerOptions & {
41
+ /** WebSocketシグナルサーバーのURL */
42
+ wsSignalUrl: string;
43
+ /** WebRTCヘルパーAPIのURL */
44
+ webRTCHelperApiURL: string;
45
+ };
46
+ /** LocalWebRTCGuestSDKを生成するオプション */
47
+ type CreateLocalWebRTCGuestSDKOptions = LocalWebRTCGuestSDKImplOptions;
48
+ /**
49
+ * ローカルWebRTCゲスト用SDKを生成する
50
+ * @param options オプション
51
+ * @returns ローカルWebRTCゲスト用SDKのインスタンス
52
+ */
53
+ export declare function createGuestLocalWebRTCSDK(options: CreateLocalWebRTCGuestSDKOptions): GuestLocalWebRTCSDK;
54
+ export {};
@@ -0,0 +1,194 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12
+ if (kind === "m") throw new TypeError("Private method is not writable");
13
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
15
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16
+ };
17
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
18
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
19
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
20
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
21
+ };
22
+ var _GuestLocalWebRTCSDKImpl_instances, _GuestLocalWebRTCSDKImpl_webRTCConnection, _GuestLocalWebRTCSDKImpl_websocketConnection, _GuestLocalWebRTCSDKImpl_frontendLog, _GuestLocalWebRTCSDKImpl_signaling;
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.createGuestLocalWebRTCSDK = createGuestLocalWebRTCSDK;
25
+ const nanoid_1 = require("nanoid");
26
+ const rxjs_1 = require("rxjs");
27
+ const gather_all_ice_candidate_1 = require("../webrtc/gather-all-ice-candidate");
28
+ const get_selected_ice_candidate_summary_1 = require("../webrtc/get-selected-ice-candidate-summary");
29
+ const guest_message_1 = require("../webrtc/guest/guest-message");
30
+ const receive_battle_start_1 = require("../webrtc/guest/receive-battle-start");
31
+ const receive_request_selected_player_1 = require("../webrtc/guest/receive-request-selected-player");
32
+ const wait_until_connected_1 = require("../webrtc/wait-until-connected");
33
+ const join_room_1 = require("../websocket-api/join-room");
34
+ const notify_ice_candidate_recieved_1 = require("../websocket-api/notify-ice-candidate-recieved");
35
+ const send_to_ws_signal_1 = require("../websocket-api/send-to-ws-signal");
36
+ const wait_until_sdp_recieve_1 = require("../websocket-api/wait-until-sdp-recieve");
37
+ const frontend_log_manager_1 = require("./frontend-log-manager");
38
+ const guest_battle_sdk_1 = require("./guest-battle-sdk");
39
+ const guest_webrtc_connection_manager_1 = require("./guest-webrtc-connection-manager");
40
+ const websocket_connection_manager_1 = require("./websocket-connection-manager");
41
+ /** ローカルWebRTCゲスト用SDKの実装 */
42
+ class GuestLocalWebRTCSDKImpl {
43
+ /**
44
+ * コンストラクタ
45
+ * @param options コンストラクタのオプション
46
+ */
47
+ constructor(options) {
48
+ _GuestLocalWebRTCSDKImpl_instances.add(this);
49
+ /** WebRTCコネクションマネージャー */
50
+ _GuestLocalWebRTCSDKImpl_webRTCConnection.set(this, void 0);
51
+ /** WebSocketコネクションマネージャー */
52
+ _GuestLocalWebRTCSDKImpl_websocketConnection.set(this, void 0);
53
+ /** フロントエンドログマネージャー */
54
+ _GuestLocalWebRTCSDKImpl_frontendLog.set(this, void 0);
55
+ __classPrivateFieldSet(this, _GuestLocalWebRTCSDKImpl_webRTCConnection, new guest_webrtc_connection_manager_1.GuestWebRTCConnectionManager(options), "f");
56
+ __classPrivateFieldSet(this, _GuestLocalWebRTCSDKImpl_websocketConnection, new websocket_connection_manager_1.WebSocketConnectionManager(options), "f");
57
+ __classPrivateFieldSet(this, _GuestLocalWebRTCSDKImpl_frontendLog, new frontend_log_manager_1.FrontendLogManager(options), "f");
58
+ }
59
+ /** @override */
60
+ joinRoom(options) {
61
+ return __awaiter(this, void 0, void 0, function* () {
62
+ const spanId = (0, nanoid_1.nanoid)();
63
+ const { roomID, armdozerId, pilotId } = options;
64
+ __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_websocketConnection, "f").gracefulDisconnect();
65
+ __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_webRTCConnection, "f").disconnect();
66
+ // イベントを取り逃がさないように、あらかじめハンドラをセットしておく
67
+ const requestSelectedPlayerPromise = (() => __awaiter(this, void 0, void 0, function* () {
68
+ const dataChannel = yield __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_webRTCConnection, "f").getOrCreateConnection().dataChannelPromise;
69
+ return yield (0, receive_request_selected_player_1.receiveRequestSelectedPlayer)(dataChannel);
70
+ }))();
71
+ const battleStartPromise = (() => __awaiter(this, void 0, void 0, function* () {
72
+ const dataChannel = yield __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_webRTCConnection, "f").getOrCreateConnection().dataChannelPromise;
73
+ return yield (0, receive_battle_start_1.receiveBattleStart)(dataChannel);
74
+ }))();
75
+ const websocket = yield __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_websocketConnection, "f").getOrCreate();
76
+ const joinRoomAccepted = yield (0, join_room_1.joinRoom)({ websocket, roomID });
77
+ if (!joinRoomAccepted) {
78
+ return null;
79
+ }
80
+ const { signalingID } = joinRoomAccepted;
81
+ yield __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_instances, "m", _GuestLocalWebRTCSDKImpl_signaling).call(this, { signalingID, spanId });
82
+ const { flowID } = yield requestSelectedPlayerPromise;
83
+ const dataChannel = yield __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_webRTCConnection, "f").getOrCreateConnection().dataChannelPromise;
84
+ (0, guest_message_1.sendGuestMessage)(dataChannel, {
85
+ type: "send-player",
86
+ flowID,
87
+ armdozerId,
88
+ pilotId,
89
+ });
90
+ const battleStart = yield battleStartPromise;
91
+ return new guest_battle_sdk_1.GuestBattleSDK({
92
+ hostPlayer: battleStart.hostPlayer,
93
+ guestPlayer: battleStart.guestPlayer,
94
+ initialState: battleStart.update,
95
+ initialFlowID: battleStart.flowID,
96
+ webRTCConnection: __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_webRTCConnection, "f"),
97
+ });
98
+ });
99
+ }
100
+ /** @override */
101
+ websocketErrorNotifier() {
102
+ return __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_websocketConnection, "f").errorNotifier();
103
+ }
104
+ /** @override */
105
+ disconnectWebSocket() {
106
+ __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_websocketConnection, "f").gracefulDisconnect();
107
+ }
108
+ /** @override */
109
+ disconnectWebRTC() {
110
+ __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_webRTCConnection, "f").disconnect();
111
+ }
112
+ }
113
+ _GuestLocalWebRTCSDKImpl_webRTCConnection = new WeakMap(), _GuestLocalWebRTCSDKImpl_websocketConnection = new WeakMap(), _GuestLocalWebRTCSDKImpl_frontendLog = new WeakMap(), _GuestLocalWebRTCSDKImpl_instances = new WeakSet(), _GuestLocalWebRTCSDKImpl_signaling = function _GuestLocalWebRTCSDKImpl_signaling(options) {
114
+ return __awaiter(this, void 0, void 0, function* () {
115
+ const { signalingID, spanId } = options;
116
+ let unSubscribers = [];
117
+ try {
118
+ yield __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_frontendLog, "f").log({
119
+ type: "SIGNALING_START",
120
+ spanId,
121
+ });
122
+ const websocket = yield __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_websocketConnection, "f").getOrCreate();
123
+ const { connectionPromise } = __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_webRTCConnection, "f").getOrCreateConnection();
124
+ const connection = yield connectionPromise;
125
+ let isRemoteDescriptionSet = false;
126
+ const pendingIceCandidates = [];
127
+ // イベントを取り逃がさないように、あらかじめハンドラをセットしておく
128
+ unSubscribers = [
129
+ (0, notify_ice_candidate_recieved_1.notifyIceCandidateReceived)(websocket).subscribe((iceCandidate) => {
130
+ if (isRemoteDescriptionSet) {
131
+ connection.addIceCandidate(iceCandidate);
132
+ }
133
+ else {
134
+ pendingIceCandidates.push(iceCandidate);
135
+ }
136
+ }),
137
+ (0, rxjs_1.fromEvent)(connection, "icecandidate").subscribe((event) => {
138
+ if (event.candidate) {
139
+ (0, send_to_ws_signal_1.sendToWSSignal)(websocket, {
140
+ action: "send-ice-candidate",
141
+ signalingID,
142
+ iceCandidate: event.candidate,
143
+ });
144
+ }
145
+ }),
146
+ (0, rxjs_1.fromEvent)(connection, "icecandidateerror").subscribe((event) => {
147
+ __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_frontendLog, "f").log({
148
+ type: "ICE_CANDIDATE_ERROR",
149
+ spanId,
150
+ error: (0, gather_all_ice_candidate_1.createICECandidateErrorMessage)(event),
151
+ });
152
+ }),
153
+ ];
154
+ const remoteSDP = yield (0, wait_until_sdp_recieve_1.waitUntilSDPReceive)(websocket);
155
+ yield connection.setRemoteDescription(remoteSDP);
156
+ isRemoteDescriptionSet = true;
157
+ pendingIceCandidates.forEach((iceCandidate) => {
158
+ connection.addIceCandidate(iceCandidate);
159
+ });
160
+ const sdp = yield connection.createAnswer();
161
+ yield connection.setLocalDescription(sdp);
162
+ (0, send_to_ws_signal_1.sendToWSSignal)(websocket, {
163
+ action: "send-sdp",
164
+ signalingID,
165
+ sdp,
166
+ });
167
+ yield (0, wait_until_connected_1.waitUntilConnected)(connection);
168
+ yield __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_frontendLog, "f").log({
169
+ type: "SIGNALING_END",
170
+ spanId,
171
+ });
172
+ const selectedLocalIceCandidateSummary = yield (0, get_selected_ice_candidate_summary_1.getSelectedIceCandidateSummary)(connection);
173
+ if (selectedLocalIceCandidateSummary !== null) {
174
+ yield __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_frontendLog, "f").log({
175
+ type: "SELECTED_ICE_CANDIDATE_SUMMARY",
176
+ spanId,
177
+ summary: selectedLocalIceCandidateSummary,
178
+ });
179
+ }
180
+ }
181
+ finally {
182
+ __classPrivateFieldGet(this, _GuestLocalWebRTCSDKImpl_websocketConnection, "f").gracefulDisconnect();
183
+ unSubscribers.forEach((unSubscriber) => unSubscriber.unsubscribe());
184
+ }
185
+ });
186
+ };
187
+ /**
188
+ * ローカルWebRTCゲスト用SDKを生成する
189
+ * @param options オプション
190
+ * @returns ローカルWebRTCゲスト用SDKのインスタンス
191
+ */
192
+ function createGuestLocalWebRTCSDK(options) {
193
+ return new GuestLocalWebRTCSDKImpl(options);
194
+ }
@@ -0,0 +1,33 @@
1
+ import { AuthTokenManager } from "./auth-token-manager";
2
+ /** GuestWebRTCConnectionManagerコンストラクタのオプション */
3
+ export type GuestWebRTCConnectionManagerOptions = {
4
+ /** 認証トークンマネージャー */
5
+ authToken: AuthTokenManager;
6
+ /** WebRTCヘルパーAPIのURL */
7
+ webRTCHelperApiURL: string;
8
+ /** coturnサーバーのドメイン名 */
9
+ coturnDomainName: string;
10
+ };
11
+ /** ゲストのWebRTCコネクション管理 */
12
+ export declare class GuestWebRTCConnectionManager {
13
+ #private;
14
+ /** コンストラクタ
15
+ * @param options オプション
16
+ */
17
+ constructor(options: GuestWebRTCConnectionManagerOptions);
18
+ /**
19
+ * コネクションを取得する。
20
+ * コネクションが存在しない場合は新たに作成する。
21
+ * @returns 取得したコネクションとデータチャンネル
22
+ */
23
+ getOrCreateConnection(): {
24
+ /** コネクション */
25
+ connectionPromise: Promise<RTCPeerConnection>;
26
+ /** データチャンネル */
27
+ dataChannelPromise: Promise<RTCDataChannel>;
28
+ };
29
+ /**
30
+ * コネクションを切断する
31
+ */
32
+ disconnect(): void;
33
+ }
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
3
+ if (kind === "m") throw new TypeError("Private method is not writable");
4
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
5
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
6
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
7
+ };
8
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
9
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
10
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
11
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
12
+ };
13
+ var _GuestWebRTCConnectionManager_authToken, _GuestWebRTCConnectionManager_connectionState, _GuestWebRTCConnectionManager_webRTCHelperApiURL, _GuestWebRTCConnectionManager_coturnDomainName;
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ exports.GuestWebRTCConnectionManager = void 0;
16
+ const wait_until_data_channel_1 = require("../webrtc/guest/wait-until-data-channel");
17
+ const create_rtc_peer_connection_1 = require("./create-rtc-peer-connection");
18
+ /** ゲストのWebRTCコネクション管理 */
19
+ class GuestWebRTCConnectionManager {
20
+ /** コンストラクタ
21
+ * @param options オプション
22
+ */
23
+ constructor(options) {
24
+ /** 認証トークンマネージャー */
25
+ _GuestWebRTCConnectionManager_authToken.set(this, void 0);
26
+ /** コネクションの状態 */
27
+ _GuestWebRTCConnectionManager_connectionState.set(this, { type: "disconnected" });
28
+ /** WebRTCヘルパーAPIのURL */
29
+ _GuestWebRTCConnectionManager_webRTCHelperApiURL.set(this, void 0);
30
+ /** coturnサーバーのドメイン名 */
31
+ _GuestWebRTCConnectionManager_coturnDomainName.set(this, void 0);
32
+ __classPrivateFieldSet(this, _GuestWebRTCConnectionManager_authToken, options.authToken, "f");
33
+ __classPrivateFieldSet(this, _GuestWebRTCConnectionManager_webRTCHelperApiURL, options.webRTCHelperApiURL, "f");
34
+ __classPrivateFieldSet(this, _GuestWebRTCConnectionManager_coturnDomainName, options.coturnDomainName, "f");
35
+ }
36
+ /**
37
+ * コネクションを取得する。
38
+ * コネクションが存在しない場合は新たに作成する。
39
+ * @returns 取得したコネクションとデータチャンネル
40
+ */
41
+ getOrCreateConnection() {
42
+ if (__classPrivateFieldGet(this, _GuestWebRTCConnectionManager_connectionState, "f").type === "disconnected") {
43
+ const connectionPromise = __classPrivateFieldGet(this, _GuestWebRTCConnectionManager_authToken, "f")
44
+ .getOrIssueAuthToken()
45
+ .then((authToken) => (0, create_rtc_peer_connection_1.createRTCPeerConnection)({
46
+ webRTCHelperApiURL: __classPrivateFieldGet(this, _GuestWebRTCConnectionManager_webRTCHelperApiURL, "f"),
47
+ coturnDomainName: __classPrivateFieldGet(this, _GuestWebRTCConnectionManager_coturnDomainName, "f"),
48
+ authToken: authToken.token,
49
+ }));
50
+ const dataChannelPromise = connectionPromise.then((connection) => (0, wait_until_data_channel_1.waitUntilDataChannel)(connection));
51
+ __classPrivateFieldSet(this, _GuestWebRTCConnectionManager_connectionState, {
52
+ type: "connected",
53
+ connectionPromise,
54
+ dataChannelPromise,
55
+ }, "f");
56
+ }
57
+ return __classPrivateFieldGet(this, _GuestWebRTCConnectionManager_connectionState, "f");
58
+ }
59
+ /**
60
+ * コネクションを切断する
61
+ */
62
+ disconnect() {
63
+ if (__classPrivateFieldGet(this, _GuestWebRTCConnectionManager_connectionState, "f").type === "connected") {
64
+ __classPrivateFieldGet(this, _GuestWebRTCConnectionManager_connectionState, "f").connectionPromise.then((connection) => connection.close());
65
+ __classPrivateFieldGet(this, _GuestWebRTCConnectionManager_connectionState, "f").dataChannelPromise.then((channel) => channel.close());
66
+ }
67
+ __classPrivateFieldSet(this, _GuestWebRTCConnectionManager_connectionState, { type: "disconnected" }, "f");
68
+ }
69
+ }
70
+ exports.GuestWebRTCConnectionManager = GuestWebRTCConnectionManager;
71
+ _GuestWebRTCConnectionManager_authToken = new WeakMap(), _GuestWebRTCConnectionManager_connectionState = new WeakMap(), _GuestWebRTCConnectionManager_webRTCHelperApiURL = new WeakMap(), _GuestWebRTCConnectionManager_coturnDomainName = new WeakMap();
@@ -0,0 +1,39 @@
1
+ import { ArmdozerId, Command, GameState, PilotId, Player } from "gbraver-burst-core";
2
+ import { Observable } from "rxjs";
3
+ import { BattleSDK } from "./battle-sdk";
4
+ import { HostWebRTCConnectionManager } from "./host-webrtc-connection-manager";
5
+ /** ホスト側バトルSDK */
6
+ export declare class HostBattleSDK implements BattleSDK {
7
+ #private;
8
+ /** プレイヤーの情報 */
9
+ player: Player;
10
+ /** 対戦相手の情報 */
11
+ enemy: Player;
12
+ /** ゲームの初期状態 */
13
+ initialState: GameState[];
14
+ /** 最新のフローID */
15
+ flowID: string;
16
+ /**
17
+ * コンストラクタ
18
+ * @param options オプション
19
+ * @param options.hostArmdozerId ホスト側のアームドーザID
20
+ * @param options.hostPilotId ホスト側のパイロットID
21
+ * @param options.guestArmdozerId ゲスト側のアームドーザID
22
+ * @param options.guestPilotId ゲスト側のパイロットID
23
+ * @param options.webRTCConnection ホスト側のWebRTC接続マネージャー
24
+ */
25
+ constructor(options: {
26
+ hostArmdozerId: ArmdozerId;
27
+ hostPilotId: PilotId;
28
+ guestArmdozerId: ArmdozerId;
29
+ guestPilotId: PilotId;
30
+ webRTCConnection: HostWebRTCConnectionManager;
31
+ });
32
+ /** @override */
33
+ progress(command: Command): Promise<GameState[]>;
34
+ /**
35
+ * バトル強制終了の通知ストリーム
36
+ * @returns 通知ストリーム
37
+ */
38
+ suddenlyBattleEndNotifier(): Observable<unknown>;
39
+ }
@@ -0,0 +1,108 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
12
+ if (kind === "m") throw new TypeError("Private method is not writable");
13
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
14
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
15
+ return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
16
+ };
17
+ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
18
+ if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
19
+ if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
20
+ return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
21
+ };
22
+ var _HostBattleSDK_core, _HostBattleSDK_webRTCConnection, _HostBattleSDK_sendCommandPromise, _HostBattleSDK_sendExceptionSubject;
23
+ Object.defineProperty(exports, "__esModule", { value: true });
24
+ exports.HostBattleSDK = void 0;
25
+ const gbraver_burst_core_1 = require("gbraver-burst-core");
26
+ const nanoid_1 = require("nanoid");
27
+ const rxjs_1 = require("rxjs");
28
+ const host_message_1 = require("../webrtc/host/host-message");
29
+ const receive_send_command_1 = require("../webrtc/host/receive-send-command");
30
+ const notify_connection_failed_1 = require("../webrtc/notify-connection-failed");
31
+ /** ホスト側バトルSDK */
32
+ class HostBattleSDK {
33
+ /**
34
+ * コンストラクタ
35
+ * @param options オプション
36
+ * @param options.hostArmdozerId ホスト側のアームドーザID
37
+ * @param options.hostPilotId ホスト側のパイロットID
38
+ * @param options.guestArmdozerId ゲスト側のアームドーザID
39
+ * @param options.guestPilotId ゲスト側のパイロットID
40
+ * @param options.webRTCConnection ホスト側のWebRTC接続マネージャー
41
+ */
42
+ constructor(options) {
43
+ var _a, _b, _c, _d;
44
+ /** Gブレイバーバーストコア */
45
+ _HostBattleSDK_core.set(this, void 0);
46
+ /** ホスト側のWebRTCコネクションマネージャー */
47
+ _HostBattleSDK_webRTCConnection.set(this, void 0);
48
+ /** ゲストからのコマンド受信プロミス */
49
+ _HostBattleSDK_sendCommandPromise.set(this, void 0);
50
+ /** dataChannel.sendの例外通知ストリーム */
51
+ _HostBattleSDK_sendExceptionSubject.set(this, new rxjs_1.Subject());
52
+ const hostPlayerId = (0, nanoid_1.nanoid)();
53
+ this.player = {
54
+ playerId: hostPlayerId,
55
+ armdozer: (_a = gbraver_burst_core_1.Armdozers.find((a) => a.id === options.hostArmdozerId)) !== null && _a !== void 0 ? _a : gbraver_burst_core_1.Armdozers[0],
56
+ pilot: (_b = gbraver_burst_core_1.Pilots.find((p) => p.id === options.hostPilotId)) !== null && _b !== void 0 ? _b : gbraver_burst_core_1.Pilots[0],
57
+ };
58
+ const guestPlayerId = (0, nanoid_1.nanoid)();
59
+ this.enemy = {
60
+ playerId: guestPlayerId,
61
+ armdozer: (_c = gbraver_burst_core_1.Armdozers.find((a) => a.id === options.guestArmdozerId)) !== null && _c !== void 0 ? _c : gbraver_burst_core_1.Armdozers[0],
62
+ pilot: (_d = gbraver_burst_core_1.Pilots.find((p) => p.id === options.guestPilotId)) !== null && _d !== void 0 ? _d : gbraver_burst_core_1.Pilots[0],
63
+ };
64
+ __classPrivateFieldSet(this, _HostBattleSDK_core, (0, gbraver_burst_core_1.startGBraverBurst)([this.player, this.enemy]), "f");
65
+ this.initialState = __classPrivateFieldGet(this, _HostBattleSDK_core, "f").stateHistory();
66
+ this.flowID = (0, nanoid_1.nanoid)();
67
+ __classPrivateFieldSet(this, _HostBattleSDK_webRTCConnection, options.webRTCConnection, "f");
68
+ __classPrivateFieldSet(this, _HostBattleSDK_sendCommandPromise, __classPrivateFieldGet(this, _HostBattleSDK_webRTCConnection, "f")
69
+ .getOrCreateConnection()
70
+ .then(({ dataChannel }) => (0, receive_send_command_1.receiveSendCommand)(dataChannel, this.flowID)), "f");
71
+ }
72
+ /** @override */
73
+ progress(command) {
74
+ return __awaiter(this, void 0, void 0, function* () {
75
+ const sendCommand = yield __classPrivateFieldGet(this, _HostBattleSDK_sendCommandPromise, "f");
76
+ const hostCommand = { playerId: this.player.playerId, command };
77
+ const guestCommand = {
78
+ playerId: this.enemy.playerId,
79
+ command: sendCommand.command,
80
+ };
81
+ const update = __classPrivateFieldGet(this, _HostBattleSDK_core, "f").progress([hostCommand, guestCommand]);
82
+ this.flowID = (0, nanoid_1.nanoid)();
83
+ const { dataChannel } = yield __classPrivateFieldGet(this, _HostBattleSDK_webRTCConnection, "f").getOrCreateConnection();
84
+ __classPrivateFieldSet(this, _HostBattleSDK_sendCommandPromise, (0, receive_send_command_1.receiveSendCommand)(dataChannel, this.flowID), "f");
85
+ try {
86
+ (0, host_message_1.sendHostMessage)(dataChannel, {
87
+ type: "battle-progressed",
88
+ flowID: this.flowID,
89
+ update,
90
+ });
91
+ }
92
+ catch (error) {
93
+ __classPrivateFieldGet(this, _HostBattleSDK_sendExceptionSubject, "f").next(error);
94
+ throw error;
95
+ }
96
+ return update;
97
+ });
98
+ }
99
+ /**
100
+ * バトル強制終了の通知ストリーム
101
+ * @returns 通知ストリーム
102
+ */
103
+ suddenlyBattleEndNotifier() {
104
+ return (0, rxjs_1.from)(__classPrivateFieldGet(this, _HostBattleSDK_webRTCConnection, "f").getOrCreateConnection().then((v) => v.connection)).pipe((0, rxjs_1.mergeMap)((connection) => (0, notify_connection_failed_1.notifyConnectionFailed)(connection)), (0, rxjs_1.takeUntil)(__classPrivateFieldGet(this, _HostBattleSDK_sendExceptionSubject, "f")), (0, rxjs_1.take)(1));
105
+ }
106
+ }
107
+ exports.HostBattleSDK = HostBattleSDK;
108
+ _HostBattleSDK_core = new WeakMap(), _HostBattleSDK_webRTCConnection = new WeakMap(), _HostBattleSDK_sendCommandPromise = new WeakMap(), _HostBattleSDK_sendExceptionSubject = new WeakMap();
@@ -0,0 +1,50 @@
1
+ import { ArmdozerId, PilotId } from "gbraver-burst-core";
2
+ import { Observable } from "rxjs";
3
+ import { HostWebRTCConnectionManagerOptions } from "./host-webrtc-connection-manager";
4
+ import { LocalWebRTCRoom } from "./local-webrtc-room";
5
+ /** ローカルWebRTCホスト用SDK */
6
+ export type HostLocalWebRTCSDK = {
7
+ /**
8
+ * ルームを生成する
9
+ * 本メソッドでは新しいWebRTCコネクションを生成し、シグナリングも行うため、
10
+ * 既存のWebRTCコネクションやシグナリングは本メソッド内で切断される
11
+ * @param options ルーム生成のオプション
12
+ * @param options.armdozerId ホストが選択したアームドーザのID
13
+ * @param options.pilotId ホストが選択したパイロットのID
14
+ * @returns 生成されたルーム、生成に失敗した場合はnull
15
+ */
16
+ createRoom: (options: {
17
+ armdozerId: ArmdozerId;
18
+ pilotId: PilotId;
19
+ }) => Promise<LocalWebRTCRoom | null>;
20
+ /**
21
+ * WebSocketのエラーを通知する
22
+ * @returns 通知ストリーム
23
+ */
24
+ websocketErrorNotifier(): Observable<unknown>;
25
+ /**
26
+ * WebSocketコネクションを切断する
27
+ * シグナリングの際に自動的に接続・切断されるが、
28
+ * シグナリングをキャンセルする場合に本メソッドを呼び出す
29
+ */
30
+ disconnectWebSocket(): void;
31
+ /**
32
+ * WebRTCコネクションを切断する
33
+ * 利用側で明示的に本メソッドを呼ばない限り、WebRTCコネクションは切断されない
34
+ */
35
+ disconnectWebRTC(): void;
36
+ };
37
+ /** LocalWebRTCHostSDKImplコンストラクタのオプション */
38
+ type LocalWebRTCHostSDKImplOptions = HostWebRTCConnectionManagerOptions & {
39
+ /** WebSocketシグナルサーバーのURL */
40
+ wsSignalUrl: string;
41
+ };
42
+ /** LocalWebRTCHostSDKを生成するオプション */
43
+ type CreateLocalWebRTCHostSDKOptions = LocalWebRTCHostSDKImplOptions;
44
+ /**
45
+ * ローカルWebRTCホスト用SDKを生成する
46
+ * @param options SDK生成のオプション
47
+ * @returns ローカルWebRTCホスト用SDKのインスタンス
48
+ */
49
+ export declare function createHostLocalWebRTCSDK(options: CreateLocalWebRTCHostSDKOptions): HostLocalWebRTCSDK;
50
+ export {};