Skip to content

Commit

Permalink
alias を設定するようにする
Browse files Browse the repository at this point in the history
  • Loading branch information
voluntas committed Oct 15, 2024
1 parent 75a186d commit 7963f15
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/recvonly/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<body>
<div class="container">
<h1>Recvonly test</h1>
<h3 id="sdk-version"></h3>
<button id="connect">connect</button>
<button id="disconnect">disconnect</button>
<button id="get-stats">getStats</button><br />
Expand Down
6 changes: 6 additions & 0 deletions examples/recvonly/main.mts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@ document.addEventListener('DOMContentLoaded', () => {
ACCESS_TOKEN,
)

// SDK バージョンの表示
const sdkVersionElement = document.querySelector('#sdk-version')
if (sdkVersionElement) {
sdkVersionElement.textContent = `${Sora.version()}`
}

document.querySelector('#connect')?.addEventListener('click', async () => {
await client.connect()
})
Expand Down
5 changes: 5 additions & 0 deletions vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ import { defineConfig } from 'vite'

export default defineConfig({
root: resolve(__dirname, 'examples'),
resolve: {
alias: {
'sora-js-sdk': resolve(__dirname, 'dist/sora.mjs'),
},
},
build: {
rollupOptions: {
input: {
Expand Down

0 comments on commit 7963f15

Please sign in to comment.