Commit 7e4b277f authored by 李维's avatar 李维

fix: 恢复测试代码

parent 36ddbc2c
......@@ -29,29 +29,7 @@ export class NetworkHelper {
room: any;
client: any;
// 等待 Play SDK 加载完成
private async waitForPlaySDK(): Promise<void> {
return new Promise((resolve) => {
const checkPlaySDK = () => {
if (globalThis.Play && globalThis.Play.Client) {
resolve();
} else {
// 每100ms检查一次,最多等待10秒
setTimeout(checkPlaySDK, 100);
}
};
checkPlaySDK();
});
}
async initRoom() {
console.log("========== initRoom ==========");
console.log("globalThis");
console.log(globalThis);
// 等待 Play SDK 加载完成
await this.waitForPlaySDK();
console.log(globalThis.Play);
const client = new globalThis.Play.Client({
appId: "JCKc6bU8FywdjIPupjNH8Jwx-gzGzoHsz",
appKey: "WUrRDpb46z2qFLsUNbhknYcP",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment