Commit aaa4ad49 by pangchong

Merge branch 'master' of 122.112.146.86:qlintonger/standalone-anyremote

parents 99ff4d00 b482b5fb
......@@ -180,10 +180,15 @@ export class Agora {
}
async preload() {
return new Promise((resolve) => {
const v = setInterval(() => {
if (window.AgoraRTC) {
clearInterval(v);
return new Promise((resolve, reject) => {
console.trace()
import("./AgoraRTC_N-4.19.1.js?url")
.then((url) => {
console.log('the url here', url)
const s = document.createElement('script');
s.src = url.default;
s.onerror = reject;
s.onload = () => {
if (this.notUploadLog) {
AgoraRTC.disableLogUpload();
}
......@@ -267,6 +272,7 @@ export class Agora {
})
resolve();
}
document.body.append(s);
})
})
}
......
......@@ -9,6 +9,5 @@
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
<script defer async src="./AgoraRTC_N-4.19.1.js"></script>
</body>
</html>
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -33,7 +33,8 @@ export default defineConfig({
AutoImport({
imports: ['vue', 'vue-router'],
dts: 'src/auto-import.d.ts',
resolvers: [ArcoResolver()]
resolvers: [ArcoResolver()],
exclude: ['anyremote/agora/AgoraRTC_N-4.19.1.js']
}),
Components({
// 自动导入的组件位置,默认是src/components
......@@ -71,6 +72,6 @@ export default defineConfig({
cors: true // 跨域
},
optimizeDeps: {
exclude: ['AnyR/agora/AgoraRTC_N-4.19.1.js']
exclude: ['anyremote/agora/AgoraRTC_N-4.19.1.js']
}
})
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