Add Coturn TURN server
This commit is contained in:
1 parent
752d0cf3af
commit
c3ca3e1752
13 files changed
+309
-11
No files matched your search
+14
-4
@@ -1,8 +1,18 @@
|
||||
import { defineConfig } from 'vite';
|
||||
import { defineConfig, loadEnv } from 'vite';
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import { iceMiddleware } from './dev/ice-server.js';
|
||||
|
||||
// base './' so the built app can be served from any static path (or opened from a subdirectory)
|
||||
export default defineConfig({
|
||||
base: './',
|
||||
plugins: [vue()],
|
||||
export default defineConfig(({ mode }) => {
|
||||
const env = { ...loadEnv(mode, process.cwd(), ''), ...process.env };
|
||||
return {
|
||||
base: './',
|
||||
server: { host: '127.0.0.1' },
|
||||
plugins: [vue(), {
|
||||
name: 'local-turn-credentials',
|
||||
configureServer(server) {
|
||||
if (env.VITE_ICE_ENDPOINT === '/api/ice-servers') server.middlewares.use(iceMiddleware(env));
|
||||
},
|
||||
}],
|
||||
};
|
||||
});
|
||||
Reference in new issue
Block a user