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 11<!doctype html>
22< 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+
1320</ html >
Original file line number Diff line number Diff line change 11<script lang =" ts" >
22 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" ;
74
85 let client: PulsebeamClient ;
96 let clientStatus: ClientStatus = " new" ;
1411 let localVideoEl: HTMLVideoElement ;
1512 let remoteVideoEl: HTMLVideoElement ;
1613
17- const sfuUrl = " ws ://localhost:8080/sfu " ; // Replace
14+ const sfuUrl = " http ://localhost:3000 " ;
1815 const roomId = " tiny-room" ;
1916 const participantId = ` user-${Math .random ().toString (36 ).slice (2 , 7 )} ` ;
2017
109106 </div >
110107 {/if }
111108
109+ <h1 >{participantId }</h1 >
112110 <div style =" display: flex; gap: 10px;" >
113111 <div >
114112 <p >Local Video</p >
131129 width =" 160"
132130 height =" 120"
133131 style =" border:1px solid #ccc; background:#333;"
134- ></video >
132+ >
133+ <track kind =" captions" />
134+ </video >
135135 </div >
136136 </div >
137137</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