call-live-sdk1 0.0.7 → 0.0.8
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/call-live-sdk.es.js +33 -64
- package/dist/call-live-sdk.umd.js +1 -1
- package/dist/sdk/index.d.ts +0 -15
- package/dist/stats-prod.html +1 -1
- package/package.json +1 -1
package/dist/call-live-sdk.es.js
CHANGED
|
@@ -25592,7 +25592,10 @@ const create$c = (createState) => createState ? createImpl(createState) : create
|
|
|
25592
25592
|
var define_import_meta_env_default = {};
|
|
25593
25593
|
const envConfig$1 = {
|
|
25594
25594
|
// 环境名称
|
|
25595
|
-
env:
|
|
25595
|
+
env: "production",
|
|
25596
|
+
// 地图相关配置
|
|
25597
|
+
amapKey: define_import_meta_env_default.VITE_AMAP_KEY || "",
|
|
25598
|
+
amapCode: define_import_meta_env_default.VITE_AMAP_CODE || "",
|
|
25596
25599
|
// SDK 授权配置
|
|
25597
25600
|
queenSdkKey: "hP7in57avgV12eJB7dff0052b8ac0481da28769b23b37bc77",
|
|
25598
25601
|
// API 相关配置
|
|
@@ -25610,25 +25613,24 @@ var GlobalErrorType = /* @__PURE__ */ ((GlobalErrorType2) => {
|
|
|
25610
25613
|
GlobalErrorType2["OTHER_ERROR"] = "other_error";
|
|
25611
25614
|
return GlobalErrorType2;
|
|
25612
25615
|
})(GlobalErrorType || {});
|
|
25613
|
-
const devSign = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlZGl0aW9uX2lkIjo0NywiZXhwIjoxNzY3NTgyODExLCJpYXQiOjE3NjY5NzgwMTEsIm5iZiI6MTc2Njk3ODAxMSwic3ViX3VzZXJpZCI6MCwidXNlcmlkIjoiMzg3MzU5ODkifQ.lB9hFdxAJUGt4eg9WugAlkyIWhPayqcOI15x1DToQFo";
|
|
25614
25616
|
const envConfig = {
|
|
25615
25617
|
callConfig: {
|
|
25616
|
-
el:
|
|
25617
|
-
sign:
|
|
25618
|
-
liveId:
|
|
25619
|
-
title:
|
|
25618
|
+
el: "",
|
|
25619
|
+
sign: "",
|
|
25620
|
+
liveId: null,
|
|
25621
|
+
title: "菲耀直播",
|
|
25620
25622
|
components: {
|
|
25621
25623
|
chat: { enabled: true },
|
|
25622
25624
|
team: { enabled: true },
|
|
25623
25625
|
call: { enabled: true, inviteLink: "" }
|
|
25624
25626
|
},
|
|
25625
|
-
agentId:
|
|
25627
|
+
agentId: null,
|
|
25626
25628
|
apiDomain: envConfig$1.liveProxyUrl
|
|
25627
25629
|
},
|
|
25628
25630
|
guestConfig: {
|
|
25629
25631
|
el: "",
|
|
25630
|
-
liveId:
|
|
25631
|
-
agentId:
|
|
25632
|
+
liveId: null,
|
|
25633
|
+
agentId: null,
|
|
25632
25634
|
apiDomain: envConfig$1.liveProxyUrl
|
|
25633
25635
|
},
|
|
25634
25636
|
styleConfig: {
|
|
@@ -46598,7 +46600,6 @@ const axiosInstance = axios.create({
|
|
|
46598
46600
|
}
|
|
46599
46601
|
});
|
|
46600
46602
|
const setApiDomain = (apiDomain) => {
|
|
46601
|
-
debugger;
|
|
46602
46603
|
if (apiDomain) {
|
|
46603
46604
|
axiosInstance.defaults.baseURL = apiDomain;
|
|
46604
46605
|
}
|
|
@@ -83714,6 +83715,10 @@ const useCallStore = create$c()(
|
|
|
83714
83715
|
return [];
|
|
83715
83716
|
}
|
|
83716
83717
|
if (user.rtc_userid === callConfig.rtc_userid && user.isAudioEnabled) {
|
|
83718
|
+
console.log(
|
|
83719
|
+
"本地麦克风音频",
|
|
83720
|
+
rtc.engine.getLocalStreamTrack(StreamIndex$1.STREAM_INDEX_MAIN, "audio")
|
|
83721
|
+
);
|
|
83717
83722
|
result.push(rtc.engine.getLocalStreamTrack(StreamIndex$1.STREAM_INDEX_MAIN, "audio"));
|
|
83718
83723
|
}
|
|
83719
83724
|
if (user.rtc_userid === callConfig.rtc_userid && user.isScreenEnabled) {
|
|
@@ -292252,6 +292257,7 @@ const RtcJoomRoom = reactExports.memo(({
|
|
|
292252
292257
|
}
|
|
292253
292258
|
await ((_d2 = getter().rtc) == null ? void 0 : _d2.publishStream());
|
|
292254
292259
|
if (callConfig.rule === "main") {
|
|
292260
|
+
console.log("主播 发布 音视频流 ");
|
|
292255
292261
|
callAudioMixing();
|
|
292256
292262
|
eventBus.emit("audioMixing");
|
|
292257
292263
|
}
|
|
@@ -292811,6 +292817,7 @@ const {
|
|
|
292811
292817
|
Title
|
|
292812
292818
|
} = Typography;
|
|
292813
292819
|
const WebLiveLogin = () => {
|
|
292820
|
+
console.log("env", envConfig$1);
|
|
292814
292821
|
const [form] = Form2.useForm();
|
|
292815
292822
|
const {
|
|
292816
292823
|
setStatus,
|
|
@@ -292823,8 +292830,8 @@ const WebLiveLogin = () => {
|
|
|
292823
292830
|
liveId,
|
|
292824
292831
|
agentId
|
|
292825
292832
|
} = useSdkStore((state) => ({
|
|
292826
|
-
liveId: state.
|
|
292827
|
-
agentId: state.
|
|
292833
|
+
liveId: state.guestConfig.liveId,
|
|
292834
|
+
agentId: state.guestConfig.agentId
|
|
292828
292835
|
}));
|
|
292829
292836
|
const {
|
|
292830
292837
|
setMainCanvasId,
|
|
@@ -295583,18 +295590,27 @@ const CanvasCameraForm = reactExports.forwardRef(({
|
|
|
295583
295590
|
};
|
|
295584
295591
|
const initQueenEngine = async () => {
|
|
295585
295592
|
const queenEngineCanvas = document.getElementById("queenEngineCanvas");
|
|
295593
|
+
if (!queenEngineCanvas) {
|
|
295594
|
+
console.error("QueenEngine 画布不存在");
|
|
295595
|
+
return;
|
|
295596
|
+
}
|
|
295586
295597
|
const queenEngine = new d$3();
|
|
295587
295598
|
queenEngineRef.current = queenEngine;
|
|
295588
|
-
queenEngine.init(envConfig$1.queenSdkKey, function() {
|
|
295589
|
-
console.log("初始化完成",
|
|
295599
|
+
queenEngine.init(envConfig$1.queenSdkKey, function(result) {
|
|
295600
|
+
console.log("QueenEngine 初始化完成", result);
|
|
295590
295601
|
timer.current = setInterval(() => {
|
|
295591
295602
|
queenRender();
|
|
295592
295603
|
}, 30);
|
|
295593
295604
|
queenEngine.setQueenBeautyType(e$3.SkinBuffing, true);
|
|
295594
295605
|
queenEngine.setQueenBeautyType(e$3.SkinWhiting, true);
|
|
295595
295606
|
}, function(progress) {
|
|
295596
|
-
console.log(progress);
|
|
295597
|
-
}, queenEngineCanvas)
|
|
295607
|
+
console.log("QueenEngine 初始化进度:", progress);
|
|
295608
|
+
}, queenEngineCanvas, function(error2) {
|
|
295609
|
+
console.error("QueenEngine 初始化失败:", error2);
|
|
295610
|
+
if ((error2 == null ? void 0 : error2.code) === "QUEEN_LICENSE_AUTH_FAILED") {
|
|
295611
|
+
console.error("Queen SDK 授权失败,请检查授权密钥是否正确");
|
|
295612
|
+
}
|
|
295613
|
+
});
|
|
295598
295614
|
};
|
|
295599
295615
|
const previewCamera = async (deviceId) => {
|
|
295600
295616
|
try {
|
|
@@ -306018,53 +306034,6 @@ class CallLiveSdk {
|
|
|
306018
306034
|
this.root = null;
|
|
306019
306035
|
}
|
|
306020
306036
|
}
|
|
306021
|
-
/**
|
|
306022
|
-
* 测试 API 错误(用于调试和验证错误处理机制)
|
|
306023
|
-
* @param errorCode 错误代码
|
|
306024
|
-
* @param errorMessage 错误信息
|
|
306025
|
-
*/
|
|
306026
|
-
testApiError(errorCode = 500, errorMessage = "测试 API 错误") {
|
|
306027
|
-
console.log(`测试触发 API 错误: ${errorCode} - ${errorMessage}`);
|
|
306028
|
-
window.dispatchEvent(new CustomEvent("apiError", {
|
|
306029
|
-
detail: {
|
|
306030
|
-
code: errorCode,
|
|
306031
|
-
message: errorMessage,
|
|
306032
|
-
details: {
|
|
306033
|
-
url: "/test/api/error",
|
|
306034
|
-
method: "GET",
|
|
306035
|
-
test: true
|
|
306036
|
-
}
|
|
306037
|
-
}
|
|
306038
|
-
}));
|
|
306039
|
-
}
|
|
306040
|
-
/**
|
|
306041
|
-
* 测试 Token 过期错误(用于调试和验证错误处理机制)
|
|
306042
|
-
*/
|
|
306043
|
-
testTokenExpired() {
|
|
306044
|
-
console.log("测试触发 Token 过期错误");
|
|
306045
|
-
window.dispatchEvent(new CustomEvent("tokenExpired", {
|
|
306046
|
-
detail: {
|
|
306047
|
-
reason: "测试 Token 过期"
|
|
306048
|
-
}
|
|
306049
|
-
}));
|
|
306050
|
-
}
|
|
306051
|
-
/**
|
|
306052
|
-
* 测试参数验证错误(用于调试和验证错误处理机制)
|
|
306053
|
-
* @param errorMessage 错误信息
|
|
306054
|
-
*/
|
|
306055
|
-
testParamValidationError(errorMessage = "测试参数验证错误") {
|
|
306056
|
-
console.log(`测试触发参数验证错误: ${errorMessage}`);
|
|
306057
|
-
window.dispatchEvent(new CustomEvent("paramValidationError", {
|
|
306058
|
-
detail: {
|
|
306059
|
-
message: errorMessage,
|
|
306060
|
-
details: {
|
|
306061
|
-
param: "test_param",
|
|
306062
|
-
value: "invalid_value",
|
|
306063
|
-
test: true
|
|
306064
|
-
}
|
|
306065
|
-
}
|
|
306066
|
-
}));
|
|
306067
|
-
}
|
|
306068
306037
|
}
|
|
306069
306038
|
class GuestCallSdk {
|
|
306070
306039
|
constructor(config2) {
|
|
@@ -306076,7 +306045,7 @@ class GuestCallSdk {
|
|
|
306076
306045
|
});
|
|
306077
306046
|
this.config = config2;
|
|
306078
306047
|
useSdkStore.setState({
|
|
306079
|
-
guestConfig:
|
|
306048
|
+
guestConfig: config2
|
|
306080
306049
|
});
|
|
306081
306050
|
if (config2.apiDomain) {
|
|
306082
306051
|
setApiDomain(config2.apiDomain);
|