alpha1ct commited on
Commit
9f4d1a2
·
verified ·
1 Parent(s): c4b472c

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +45 -21
index.html CHANGED
@@ -1,27 +1,51 @@
1
- import gradio as gr
2
- import os
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
 
4
- # Function to read the content of index.html
5
- def get_index_html():
6
- file_path = os.path.join(os.path.dirname(__file__), "index.html")
7
- with open(file_path, "r") as f:
8
- return f.read()
 
9
 
10
- # Embed the HTML content directly in the Gradio app
11
- def embed_html():
12
- html_content = get_index_html()
13
- return f"<div style='height: 600px;'>{html_content}</div>"
 
 
 
 
14
 
15
- # Create the Gradio interface with tabs
16
- with gr.Blocks() as app:
17
- with gr.Tab("Index HTML Tab"):
18
- gr.HTML(embed_html()) # Use gr.HTML to display the HTML content
 
 
19
 
20
- with gr.Tab("Second Tab"):
21
- gr.Textbox(value="Content for the second tab", label="Second Tab Content")
22
 
23
- with gr.Tab("Third Tab"):
24
- gr.Textbox(value="Content for the third tab", label="Third Tab Content")
 
 
25
 
26
- # Launch the Gradio app
27
- app.launch()
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8" />
5
+ <title>Daily Call Example</title>
6
+ <link href="style.css" rel="stylesheet" />
7
+ </head>
8
+ <body>
9
+ <div>
10
+ <label for="room-url">Room URL:</label>
11
+ <input
12
+ type="text"
13
+ id="room-url"
14
+ size="50"
15
+ placeholder="https://yourcompany.daily.co/hello"
16
+ />
17
+ </div>
18
+ <div>
19
+ <input type="text" id="join-token" size="50" placeholder="Optional" />
20
+ </div>
21
 
22
+ <div class="controls">
23
+ <button id="join-btn">Join Room</button>
24
+ <button id="leave-btn" disabled>Leave</button>
25
+ <button id="toggle-camera" disabled="true">Toggle Camera</button>
26
+ <button id="toggle-mic" disabled="true">Toggle Microphone</button>
27
+ </div>
28
 
29
+ <div class="controls">
30
+ <select id="camera-selector">
31
+ <option value="" disabled selected>Select a camera</option>
32
+ </select>
33
+ <select id="mic-selector">
34
+ <option value="" disabled selected>Select a microphone</option>
35
+ </select>
36
+ </div>
37
 
38
+ <div id="status">
39
+ <div id="camera-state">Camera: Off</div>
40
+ <div id="mic-state">Mic: Off</div>
41
+ <div id="participant-count">Participants: 0</div>
42
+ <div id="active-speaker">Active Speaker: None</div>
43
+ </div>
44
 
45
+ <div id="videos"></div>
 
46
 
47
+ <script src="https://unpkg.com/@daily-co/daily-js"></script>
48
+ <script src="index.js"></script>
49
+ </body>
50
+ </html>
51