File tree Expand file tree Collapse file tree 4 files changed +622
-772
lines changed Expand file tree Collapse file tree 4 files changed +622
-772
lines changed Original file line number Diff line number Diff line change 1
1
<!doctype html>
2
2
< html lang ="en ">
3
- < head >
4
- < meta charset ="UTF-8 " />
5
- < link rel ="icon " type ="image/svg+xml " href ="/vite.svg " />
6
- < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
7
- < title > Vite + Svelte + TS</ title >
8
- </ head >
9
- < body >
10
- < div id ="app "> </ div >
11
- < script type ="module " src ="/src/main.ts "> </ script >
12
- </ body >
3
+
4
+ < head >
5
+ < meta charset ="UTF-8 " />
6
+ < link rel ="icon " type ="image/svg+xml " href ="/vite.svg " />
7
+ < meta name ="viewport " content ="width=device-width, initial-scale=1.0 " />
8
+ < link href ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/cdn/beer.min.css "
rel ="
stylesheet "
>
9
+ < script type ="
module "
src ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/cdn/beer.min.js "
> </ script >
10
+ < script type ="module "
11
+ src ="
https://cdn.jsdelivr.net/npm/[email protected] /dist/cdn/material-dynamic-colors.min.js "
> </ script >
12
+ < title > Vite + Svelte + TS</ title >
13
+ </ head >
14
+
15
+ < body >
16
+ < div id ="app "> </ div >
17
+ < script type ="module " src ="/src/main.ts "> </ script >
18
+ </ body >
19
+
13
20
</ html >
Original file line number Diff line number Diff line change 1
1
<script lang =" ts" >
2
2
import { onMount , onDestroy } from " svelte" ;
3
- import {
4
- PulsebeamClient ,
5
- type ClientStatus , // Only import what's strictly needed for this minimal UI
6
- } from " ./lib/lib" ;
3
+ import { PulsebeamClient , type ClientStatus } from " ./lib" ;
7
4
8
5
let client: PulsebeamClient ;
9
6
let clientStatus: ClientStatus = " new" ;
14
11
let localVideoEl: HTMLVideoElement ;
15
12
let remoteVideoEl: HTMLVideoElement ;
16
13
17
- const sfuUrl = " ws ://localhost:8080/sfu " ; // Replace
14
+ const sfuUrl = " http ://localhost:3000 " ;
18
15
const roomId = " tiny-room" ;
19
16
const participantId = ` user-${Math .random ().toString (36 ).slice (2 , 7 )} ` ;
20
17
109
106
</div >
110
107
{/if }
111
108
109
+ <h1 >{participantId }</h1 >
112
110
<div style =" display: flex; gap: 10px;" >
113
111
<div >
114
112
<p >Local Video</p >
131
129
width =" 160"
132
130
height =" 120"
133
131
style =" border:1px solid #ccc; background:#333;"
134
- ></video >
132
+ >
133
+ <track kind =" captions" />
134
+ </video >
135
135
</div >
136
136
</div >
137
137
</main >
138
-
139
- <style >
140
- main {
141
- font-family : Arial , sans-serif ;
142
- padding : 15px ;
143
- max-width : 500px ;
144
- margin : auto ;
145
- }
146
- button {
147
- margin-right : 5px ;
148
- padding : 5px 10px ;
149
- }
150
- p {
151
- margin-top : 0 ;
152
- margin-bottom : 5px ;
153
- }
154
- </style >
You can’t perform that action at this time.
0 commit comments