privateuserh commited on
Commit
d94e742
·
verified ·
1 Parent(s): 38ece8b

Add 3 files

Browse files
Files changed (3) hide show
  1. README.md +7 -5
  2. index.html +1301 -19
  3. prompts.txt +1 -0
README.md CHANGED
@@ -1,10 +1,12 @@
1
  ---
2
- title: Privaistrm Vbeta1 02
3
- emoji: 🏆
4
- colorFrom: indigo
5
- colorTo: indigo
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: privaistrm-vbeta1-02
3
+ emoji: 🐳
4
+ colorFrom: pink
5
+ colorTo: purple
6
  sdk: static
7
  pinned: false
8
+ tags:
9
+ - deepsite
10
  ---
11
 
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
index.html CHANGED
@@ -1,19 +1,1301 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>StreamAI - Personalized Streaming Recommendations</title>
7
+ <script src="https://cdn.tailwindcss.com"></script>
8
+ <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
9
+ <style>
10
+ @keyframes float {
11
+ 0% { transform: translateY(0px); }
12
+ 50% { transform: translateY(-10px); }
13
+ 100% { transform: translateY(0px); }
14
+ }
15
+ .floating {
16
+ animation: float 6s ease-in-out infinite;
17
+ }
18
+ .gradient-bg {
19
+ background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
20
+ }
21
+ .chat-bubble {
22
+ border-radius: 20px;
23
+ position: relative;
24
+ max-width: 80%;
25
+ }
26
+ .user-bubble {
27
+ background-color: #4f46e5;
28
+ color: white;
29
+ margin-left: auto;
30
+ border-bottom-right-radius: 5px;
31
+ }
32
+ .ai-bubble {
33
+ background-color: #f3f4f6;
34
+ color: #1f2937;
35
+ margin-right: auto;
36
+ border-bottom-left-radius: 5px;
37
+ }
38
+ .typing-indicator span {
39
+ display: inline-block;
40
+ width: 8px;
41
+ height: 8px;
42
+ border-radius: 50%;
43
+ background-color: #9ca3af;
44
+ margin: 0 2px;
45
+ }
46
+ .typing-indicator span:nth-child(1) {
47
+ animation: bounce 1s infinite;
48
+ }
49
+ .typing-indicator span:nth-child(2) {
50
+ animation: bounce 1s infinite 0.2s;
51
+ }
52
+ .typing-indicator span:nth-child(3) {
53
+ animation: bounce 1s infinite 0.4s;
54
+ }
55
+ @keyframes bounce {
56
+ 0%, 100% { transform: translateY(0); }
57
+ 50% { transform: translateY(-5px); }
58
+ }
59
+ .stream-card:hover {
60
+ transform: translateY(-5px);
61
+ box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
62
+ }
63
+ .fade-in {
64
+ animation: fadeIn 0.5s ease-in;
65
+ }
66
+ @keyframes fadeIn {
67
+ from { opacity: 0; }
68
+ to { opacity: 1; }
69
+ }
70
+ .notification {
71
+ position: fixed;
72
+ bottom: 20px;
73
+ right: 20px;
74
+ background: #4f46e5;
75
+ color: white;
76
+ padding: 15px 25px;
77
+ border-radius: 8px;
78
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
79
+ transform: translateX(120%);
80
+ transition: transform 0.3s ease-out;
81
+ z-index: 1000;
82
+ }
83
+ .notification.show {
84
+ transform: translateX(0);
85
+ }
86
+ .production-button {
87
+ position: fixed;
88
+ bottom: 30px;
89
+ right: 30px;
90
+ width: 60px;
91
+ height: 60px;
92
+ border-radius: 50%;
93
+ background: linear-gradient(135deg, #ff5e62 0%, #ff9966 100%);
94
+ color: white;
95
+ display: flex;
96
+ align-items: center;
97
+ justify-content: center;
98
+ box-shadow: 0 10px 25px rgba(255, 94, 98, 0.3);
99
+ cursor: pointer;
100
+ z-index: 999;
101
+ transition: all 0.3s ease;
102
+ }
103
+ .production-button:hover {
104
+ transform: scale(1.1);
105
+ box-shadow: 0 15px 30px rgba(255, 94, 98, 0.4);
106
+ }
107
+ .production-panel {
108
+ position: fixed;
109
+ bottom: 110px;
110
+ right: 30px;
111
+ width: 350px;
112
+ background: white;
113
+ border-radius: 12px;
114
+ box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
115
+ padding: 20px;
116
+ z-index: 998;
117
+ transform: translateY(20px);
118
+ opacity: 0;
119
+ pointer-events: none;
120
+ transition: all 0.3s ease;
121
+ }
122
+ .production-panel.open {
123
+ transform: translateY(0);
124
+ opacity: 1;
125
+ pointer-events: all;
126
+ }
127
+ .recording-indicator {
128
+ position: absolute;
129
+ top: -10px;
130
+ right: -10px;
131
+ width: 20px;
132
+ height: 20px;
133
+ border-radius: 50%;
134
+ background: #ff5e62;
135
+ animation: pulse 1.5s infinite;
136
+ }
137
+ @keyframes pulse {
138
+ 0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 94, 98, 0.7); }
139
+ 70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(255, 94, 98, 0); }
140
+ 100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(255, 94, 98, 0); }
141
+ }
142
+ .clip-item {
143
+ display: flex;
144
+ align-items: center;
145
+ padding: 8px 0;
146
+ border-bottom: 1px solid #eee;
147
+ cursor: pointer;
148
+ }
149
+ .clip-item:hover {
150
+ background-color: #f9fafb;
151
+ }
152
+ .clip-item:last-child {
153
+ border-bottom: none;
154
+ }
155
+ .clip-preview {
156
+ width: 100%;
157
+ height: 180px;
158
+ background-color: #f3f4f6;
159
+ border-radius: 8px;
160
+ display: flex;
161
+ align-items: center;
162
+ justify-content: center;
163
+ margin-bottom: 15px;
164
+ position: relative;
165
+ overflow: hidden;
166
+ }
167
+ .clip-preview video {
168
+ width: 100%;
169
+ height: 100%;
170
+ object-fit: cover;
171
+ }
172
+ .clip-preview-placeholder {
173
+ text-align: center;
174
+ color: #6b7280;
175
+ }
176
+ .clip-preview-placeholder i {
177
+ font-size: 40px;
178
+ margin-bottom: 10px;
179
+ display: block;
180
+ }
181
+ .progress-bar {
182
+ height: 4px;
183
+ background-color: #e5e7eb;
184
+ border-radius: 2px;
185
+ overflow: hidden;
186
+ margin-top: 10px;
187
+ }
188
+ .progress-fill {
189
+ height: 100%;
190
+ background-color: #4f46e5;
191
+ width: 0%;
192
+ transition: width 0.3s ease;
193
+ }
194
+ .tab {
195
+ padding: 8px 16px;
196
+ border-radius: 20px;
197
+ font-size: 14px;
198
+ cursor: pointer;
199
+ margin-right: 8px;
200
+ }
201
+ .tab.active {
202
+ background-color: #4f46e5;
203
+ color: white;
204
+ }
205
+ .tab.inactive {
206
+ background-color: #f3f4f6;
207
+ color: #6b7280;
208
+ }
209
+ </style>
210
+ </head>
211
+ <body class="bg-gray-100 font-sans">
212
+ <!-- Notification -->
213
+ <div id="notification" class="notification hidden">
214
+ <div class="flex items-center">
215
+ <i class="fas fa-bell text-yellow-300 mr-3"></i>
216
+ <div>
217
+ <p class="font-semibold" id="notification-title">Reminder Set!</p>
218
+ <p class="text-sm" id="notification-message">We'll notify you when this show is about to broadcast.</p>
219
+ </div>
220
+ </div>
221
+ </div>
222
+
223
+ <!-- Production Button & Panel -->
224
+ <div class="production-button" id="production-button">
225
+ <i class="fas fa-video"></i>
226
+ <div class="recording-indicator hidden" id="recording-indicator"></div>
227
+ </div>
228
+
229
+ <div class="production-panel" id="production-panel">
230
+ <div class="flex mb-4">
231
+ <div class="tab active" id="record-tab">Record</div>
232
+ <div class="tab inactive" id="edit-tab">Edit</div>
233
+ </div>
234
+
235
+ <div id="record-section">
236
+ <h3 class="font-bold text-lg mb-4">Create Video Clips</h3>
237
+ <p class="text-sm text-gray-600 mb-4">Record your screen and audio to create short clips for your production. Perfect for capturing highlights or creating content snippets.</p>
238
+
239
+ <div class="clip-preview" id="clip-preview">
240
+ <div class="clip-preview-placeholder">
241
+ <i class="fas fa-video"></i>
242
+ <p>Preview will appear here</p>
243
+ </div>
244
+ </div>
245
+
246
+ <div class="mb-4">
247
+ <button id="start-recording" class="bg-red-500 hover:bg-red-600 text-white px-4 py-2 rounded-full text-sm font-medium transition">
248
+ <i class="fas fa-circle mr-1"></i> Start Recording (5s clips)
249
+ </button>
250
+ <button id="stop-recording" class="bg-gray-500 hover:bg-gray-600 text-white px-4 py-2 rounded-full text-sm font-medium transition ml-2 hidden">
251
+ <i class="fas fa-stop mr-1"></i> Stop
252
+ </button>
253
+ </div>
254
+
255
+ <div class="progress-bar">
256
+ <div class="progress-fill" id="progress-fill"></div>
257
+ </div>
258
+
259
+ <div id="clips-container" class="mb-4 max-h-40 overflow-y-auto">
260
+ <p class="text-gray-500 text-sm">Clips will appear here when recorded...</p>
261
+ </div>
262
+ </div>
263
+
264
+ <div id="edit-section" class="hidden">
265
+ <h3 class="font-bold text-lg mb-4">Edit Your Production</h3>
266
+ <p class="text-sm text-gray-600 mb-4">Combine your clips, add transitions, and create a polished final video.</p>
267
+
268
+ <div class="mb-4">
269
+ <label class="block text-sm font-medium text-gray-700 mb-1">Video Title</label>
270
+ <input type="text" id="video-title" class="w-full border border-gray-300 rounded-md px-3 py-2 text-sm" placeholder="My Awesome Video">
271
+ </div>
272
+
273
+ <div class="mb-4">
274
+ <label class="block text-sm font-medium text-gray-700 mb-1">Select Transition</label>
275
+ <select id="video-transition" class="w-full border border-gray-300 rounded-md px-3 py-2 text-sm">
276
+ <option value="none">No Transition</option>
277
+ <option value="fade">Fade</option>
278
+ <option value="slide">Slide</option>
279
+ <option value="zoom">Zoom</option>
280
+ </select>
281
+ </div>
282
+ </div>
283
+
284
+ <div class="flex space-x-2">
285
+ <button id="generate-video" class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-full text-sm font-medium transition flex-1">
286
+ <i class="fas fa-magic mr-1"></i> Generate Video
287
+ </button>
288
+ <button id="clear-clips" class="bg-gray-200 hover:bg-gray-300 text-gray-700 px-4 py-2 rounded-full text-sm font-medium transition">
289
+ <i class="fas fa-trash mr-1"></i>
290
+ </button>
291
+ </div>
292
+ </div>
293
+
294
+ <!-- Header -->
295
+ <header class="gradient-bg text-white shadow-lg">
296
+ <div class="container mx-auto px-4 py-6">
297
+ <div class="flex justify-between items-center">
298
+ <div class="flex items-center space-x-3">
299
+ <i class="fas fa-stream text-3xl"></i>
300
+ <h1 class="text-2xl font-bold">StreamAI</h1>
301
+ </div>
302
+ <nav class="hidden md:flex space-x-6">
303
+ <a href="#" class="hover:text-indigo-200 transition">Home</a>
304
+ <a href="#" class="hover:text-indigo-200 transition">Features</a>
305
+ <a href="#" class="hover:text-indigo-200 transition">About</a>
306
+ <a href="#" class="hover:text-indigo-200 transition">Contact</a>
307
+ </nav>
308
+ <button class="md:hidden text-xl">
309
+ <i class="fas fa-bars"></i>
310
+ </button>
311
+ </div>
312
+ </div>
313
+ </header>
314
+
315
+ <!-- Hero Section -->
316
+ <section class="gradient-bg text-white py-16">
317
+ <div class="container mx-auto px-4 flex flex-col md:flex-row items-center">
318
+ <div class="md:w-1/2 mb-10 md:mb-0">
319
+ <h2 class="text-4xl md:text-5xl font-bold mb-4">AI-Powered Streaming Recommendations</h2>
320
+ <p class="text-xl mb-8 text-indigo-100">Get personalized streaming suggestions powered by Cloudflare Workers AI.</p>
321
+ <div class="flex space-x-4">
322
+ <button class="bg-white text-indigo-600 px-6 py-3 rounded-full font-semibold hover:bg-indigo-100 transition">
323
+ Try It Now
324
+ </button>
325
+ <button class="border-2 border-white text-white px-6 py-3 rounded-full font-semibold hover:bg-white hover:text-indigo-600 transition">
326
+ How It Works
327
+ </button>
328
+ </div>
329
+ </div>
330
+ <div class="md:w-1/2 flex justify-center">
331
+ <div class="relative w-64 h-64 md:w-80 md:h-80">
332
+ <div class="absolute inset-0 bg-indigo-500 rounded-full opacity-20 floating"></div>
333
+ <div class="absolute inset-4 bg-indigo-400 rounded-full opacity-30 floating" style="animation-delay: 0.5s;"></div>
334
+ <div class="absolute inset-8 bg-indigo-300 rounded-full opacity-40 floating" style="animation-delay: 1s;"></div>
335
+ <div class="absolute inset-12 bg-white rounded-full flex items-center justify-center">
336
+ <i class="fas fa-robot text-6xl text-indigo-600"></i>
337
+ </div>
338
+ </div>
339
+ </div>
340
+ </div>
341
+ </section>
342
+
343
+ <!-- AI Chat Interface -->
344
+ <section class="py-12 bg-white">
345
+ <div class="container mx-auto px-4">
346
+ <h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Your Personal Streaming Assistant</h2>
347
+
348
+ <div class="max-w-4xl mx-auto bg-gray-50 rounded-xl shadow-lg overflow-hidden">
349
+ <!-- Chat header -->
350
+ <div class="bg-indigo-600 text-white p-4 flex items-center">
351
+ <div class="w-10 h-10 rounded-full bg-indigo-400 flex items-center justify-center mr-3">
352
+ <i class="fas fa-robot"></i>
353
+ </div>
354
+ <div>
355
+ <h3 class="font-semibold">StreamAI Assistant</h3>
356
+ <p class="text-xs text-indigo-200">Powered by Cloudflare Workers AI</p>
357
+ </div>
358
+ <div class="ml-auto flex space-x-2">
359
+ <button class="w-8 h-8 rounded-full bg-indigo-500 hover:bg-indigo-400 flex items-center justify-center">
360
+ <i class="fas fa-ellipsis-h text-sm"></i>
361
+ </button>
362
+ </div>
363
+ </div>
364
+
365
+ <!-- Chat messages -->
366
+ <div class="h-96 overflow-y-auto p-4 space-y-4" id="chat-messages">
367
+ <div class="chat-bubble ai-bubble p-4 w-3/4">
368
+ <p>Hi there! 👋 I'm your StreamAI assistant powered by Cloudflare Workers AI. I can recommend movies, TV shows, and other streaming content based on your preferences. What are you in the mood for today?</p>
369
+ </div>
370
+ </div>
371
+
372
+ <!-- User input -->
373
+ <div class="border-t border-gray-200 p-4 bg-white">
374
+ <div class="flex items-center">
375
+ <input type="text" id="user-input" placeholder="Type your message..." class="flex-1 border border-gray-300 rounded-full py-3 px-4 focus:outline-none focus:ring-2 focus:ring-indigo-500">
376
+ <button id="send-btn" class="ml-3 w-12 h-12 rounded-full bg-indigo-600 text-white hover:bg-indigo-700 flex items-center justify-center transition">
377
+ <i class="fas fa-paper-plane"></i>
378
+ </button>
379
+ </div>
380
+ <div class="mt-2 flex space-x-2">
381
+ <button class="text-xs bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full transition" onclick="quickPrompt('Recommend a comedy movie')">
382
+ Comedy
383
+ </button>
384
+ <button class="text-xs bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full transition" onclick="quickPrompt('What should I watch if I feel nostalgic?')">
385
+ Nostalgic
386
+ </button>
387
+ <button class="text-xs bg-gray-100 hover:bg-gray-200 px-3 py-1 rounded-full transition" onclick="quickPrompt('Suggest a thriller series')">
388
+ Thriller
389
+ </button>
390
+ </div>
391
+ </div>
392
+ </div>
393
+ </div>
394
+ </section>
395
+
396
+ <!-- Recommended Streams Section -->
397
+ <section class="py-12 bg-gray-50">
398
+ <div class="container mx-auto px-4">
399
+ <h2 class="text-3xl font-bold text-center mb-6 text-gray-800">Recommended For You</h2>
400
+
401
+ <!-- RSS Feed Integration -->
402
+ <div class="max-w-4xl mx-auto mb-8 bg-white p-4 rounded-lg shadow">
403
+ <div class="flex items-center mb-2">
404
+ <i class="fas fa-rss-square text-orange-500 mr-2"></i>
405
+ <h3 class="font-semibold">Personalized RSS Feed</h3>
406
+ </div>
407
+ <div class="flex items-center space-x-2 overflow-x-auto pb-2">
408
+ <button class="rss-filter-btn px-3 py-1 bg-indigo-100 text-indigo-700 rounded-full text-sm whitespace-nowrap" data-filter="all">
409
+ All Content
410
+ </button>
411
+ <button class="rss-filter-btn px-3 py-1 bg-gray-100 text-gray-700 rounded-full text-sm whitespace-nowrap" data-filter="news">
412
+ News Updates
413
+ </button>
414
+ <button class="rss-filter-btn px-3 py-1 bg-gray-100 text-gray-700 rounded-full text-sm whitespace-nowrap" data-filter="trending">
415
+ Trending Now
416
+ </button>
417
+ <button class="rss-filter-btn px-3 py-1 bg-gray-100 text-gray-700 rounded-full text-sm whitespace-nowrap" data-filter="personalized">
418
+ For You
419
+ </button>
420
+ </div>
421
+ <div id="rss-feed" class="mt-4 space-y-3">
422
+ <!-- RSS items will be loaded here -->
423
+ </div>
424
+ </div>
425
+
426
+ <div class="grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4" id="recommendations-container">
427
+ <!-- Recommendations will be dynamically inserted here -->
428
+ </div>
429
+ </div>
430
+ </section>
431
+
432
+ <!-- How It Works Section -->
433
+ <section class="py-12 bg-white">
434
+ <div class="container mx-auto px-4">
435
+ <h2 class="text-3xl font-bold text-center mb-12 text-gray-800">How StreamAI Works</h2>
436
+
437
+ <div class="grid md:grid-cols-3 gap-8">
438
+ <div class="text-center p-6 rounded-xl bg-gray-50 hover:shadow-lg transition">
439
+ <div class="w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mx-auto mb-4">
440
+ <i class="fas fa-comment-alt text-indigo-600 text-xl"></i>
441
+ </div>
442
+ <h3 class="text-xl font-semibold mb-2">1. Chat with AI</h3>
443
+ <p class="text-gray-600">Tell our AI assistant what you're in the mood for or ask for recommendations based on your preferences.</p>
444
+ </div>
445
+ <div class="text-center p-6 rounded-xl bg-gray-50 hover:shadow-lg transition">
446
+ <div class="w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mx-auto mb-4">
447
+ <i class="fas fa-brain text-indigo-600 text-xl"></i>
448
+ </div>
449
+ <h3 class="text-xl font-semibold mb-2">2. AI Processing</h3>
450
+ <p class="text-gray-600">Our Cloudflare Workers AI analyzes your request using advanced natural language processing.</p>
451
+ </div>
452
+ <div class="text-center p-6 rounded-xl bg-gray-50 hover:shadow-lg transition">
453
+ <div class="w-16 h-16 bg-indigo-100 rounded-full flex items-center justify-center mx-auto mb-4">
454
+ <i class="fas fa-film text-indigo-600 text-xl"></i>
455
+ </div>
456
+ <h3 class="text-xl font-semibold mb-2">3. Get Recommendations</h3>
457
+ <p class="text-gray-600">Receive personalized streaming suggestions with direct links to watch on your favorite platforms.</p>
458
+ </div>
459
+ </div>
460
+ </div>
461
+ </section>
462
+
463
+ <!-- Video Production Section -->
464
+ <section class="py-12 bg-gray-50">
465
+ <div class="container mx-auto px-4">
466
+ <h2 class="text-3xl font-bold text-center mb-12 text-gray-800">Create Your Own Content</h2>
467
+
468
+ <div class="max-w-4xl mx-auto bg-white rounded-xl shadow-lg overflow-hidden">
469
+ <div class="p-8">
470
+ <div class="flex items-center mb-6">
471
+ <div class="w-14 h-14 rounded-full bg-gradient-to-r from-red-500 to-orange-500 flex items-center justify-center text-white mr-4">
472
+ <i class="fas fa-video text-2xl"></i>
473
+ </div>
474
+ <div>
475
+ <h3 class="text-2xl font-bold">Video Production Tools</h3>
476
+ <p class="text-gray-600">Record, edit, and share your own streaming content</p>
477
+ </div>
478
+ </div>
479
+
480
+ <div class="grid md:grid-cols-2 gap-8">
481
+ <div>
482
+ <h4 class="font-semibold text-lg mb-3">Record Live Clips</h4>
483
+ <p class="text-gray-600 mb-4">Easily capture 5-second clips of your screen and audio to create highlight reels or content snippets.</p>
484
+ <ul class="space-y-2 text-sm text-gray-600">
485
+ <li class="flex items-start">
486
+ <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
487
+ <span>Automatically segmented into manageable clips</span>
488
+ </li>
489
+ <li class="flex items-start">
490
+ <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
491
+ <span>Screen and audio recording with one click</span>
492
+ </li>
493
+ <li class="flex items-start">
494
+ <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
495
+ <span>Preview clips before adding to your production</span>
496
+ </li>
497
+ </ul>
498
+ </div>
499
+ <div>
500
+ <h4 class="font-semibold text-lg mb-3">Edit & Combine</h4>
501
+ <p class="text-gray-600 mb-4">Combine your clips with smooth transitions to create professional-looking videos.</p>
502
+ <ul class="space-y-2 text-sm text-gray-600">
503
+ <li class="flex items-start">
504
+ <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
505
+ <span>Multiple transition effects available</span>
506
+ </li>
507
+ <li class="flex items-start">
508
+ <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
509
+ <span>Add titles and descriptions to your videos</span>
510
+ </li>
511
+ <li class="flex items-start">
512
+ <i class="fas fa-check-circle text-green-500 mt-1 mr-2"></i>
513
+ <span>Export in multiple formats for sharing</span>
514
+ </li>
515
+ </ul>
516
+ </div>
517
+ </div>
518
+
519
+ <div class="mt-8 pt-6 border-t border-gray-200">
520
+ <h4 class="font-semibold text-lg mb-4">Try It Now</h4>
521
+ <p class="text-gray-600 mb-4">Click the video production button in the bottom right corner to start creating your own content.</p>
522
+ <div class="flex items-center text-sm text-indigo-600">
523
+ <i class="fas fa-info-circle mr-2"></i>
524
+ <span>You'll need to grant screen recording permissions when prompted</span>
525
+ </div>
526
+ </div>
527
+ </div>
528
+ </div>
529
+ </div>
530
+ </section>
531
+
532
+ <!-- Footer -->
533
+ <footer class="bg-gray-800 text-white py-12">
534
+ <div class="container mx-auto px-4">
535
+ <div class="grid md:grid-cols-4 gap-8">
536
+ <div>
537
+ <h3 class="text-xl font-bold mb-4 flex items-center">
538
+ <i class="fas fa-stream mr-2"></i> StreamAI
539
+ </h3>
540
+ <p class="text-gray-400">Your personal streaming assistant powered by Cloudflare Workers AI technology.</p>
541
+ </div>
542
+ <div>
543
+ <h4 class="font-semibold mb-4">Quick Links</h4>
544
+ <ul class="space-y-2">
545
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Home</a></li>
546
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Features</a></li>
547
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Pricing</a></li>
548
+ <li><a href="#" class="text-gray-400 hover:text-white transition">FAQ</a></li>
549
+ </ul>
550
+ </div>
551
+ <div>
552
+ <h4 class="font-semibold mb-4">Streaming Platforms</h4>
553
+ <ul class="space-y-2">
554
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Netflix</a></li>
555
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Amazon Prime</a></li>
556
+ <li><a href="#" class="text-gray-400 hover:text-white transition">Disney+</a></li>
557
+ <li><a href="#" class="text-gray-400 hover:text-white transition">HBO Max</a></li>
558
+ <li><a href="https://smplus.vhx.tv" target="_blank" class="text-gray-400 hover:text-white transition">SMPlus VHX</a></li>
559
+ </ul>
560
+ </div>
561
+ <div>
562
+ <h4 class="font-semibold mb-4">Connect With Us</h4>
563
+ <div class="flex space-x-4">
564
+ <a href="#" class="w-10 h-10 rounded-full bg-gray-700 hover:bg-indigo-600 flex items-center justify-center transition">
565
+ <i class="fab fa-twitter"></i>
566
+ </a>
567
+ <a href="#" class="w-10 h-10 rounded-full bg-gray-700 hover:bg-indigo-600 flex items-center justify-center transition">
568
+ <i class="fab fa-facebook-f"></i>
569
+ </a>
570
+ <a href="#" class="w-10 h-10 rounded-full bg-gray-700 hover:bg-indigo-600 flex items-center justify-center transition">
571
+ <i class="fab fa-instagram"></i>
572
+ </a>
573
+ <a href="#" class="w-10 h-10 rounded-full bg-gray-700 hover:bg-indigo-600 flex items-center justify-center transition">
574
+ <i class="fab fa-discord"></i>
575
+ </a>
576
+ </div>
577
+ </div>
578
+ </div>
579
+ <div class="border-t border-gray-700 mt-8 pt-8 text-center text-gray-400">
580
+ <p>&copy; 2023 StreamAI. All rights reserved.</p>
581
+ </div>
582
+ </div>
583
+ </footer>
584
+
585
+ <script>
586
+ // Configuration for Cloudflare Workers AI
587
+ const AI_CONFIG = {
588
+ accountId: 'oFD0IMs0aV8eKMMMdTEF2zRQmtzvKMH43LX5ZWUJ',
589
+ gatewayId: 'streamai_gateway',
590
+ apiToken: 'masked_for_security', // In a real app, this would be handled server-side
591
+ model: '@cf/meta/llama-2-7b-chat-int8'
592
+ };
593
+
594
+ // Sample streaming data with SMPlus VHX added to the top
595
+ const streamingData = [
596
+ {
597
+ title: "SMPlus Exclusive Series",
598
+ type: "TV Series",
599
+ genre: "Drama, Action",
600
+ platform: "SMPlus VHX",
601
+ rating: "4.9",
602
+ year: "2023",
603
+ description: "An exclusive action-packed drama series only available on SMPlus VHX.",
604
+ broadcastTime: "2023-12-15T20:00:00"
605
+ },
606
+ {
607
+ title: "The Grand Adventure",
608
+ type: "Movie",
609
+ genre: "Adventure, Comedy",
610
+ platform: "Netflix",
611
+ rating: "4.8",
612
+ year: "2022",
613
+ description: "A hilarious journey across continents with unexpected twists.",
614
+ broadcastTime: "2023-12-10T19:30:00"
615
+ },
616
+ {
617
+ title: "Dark Secrets",
618
+ type: "TV Series",
619
+ genre: "Drama, Thriller",
620
+ platform: "HBO Max",
621
+ rating: "4.7",
622
+ year: "2021",
623
+ description: "A small town's dark past resurfaces with shocking revelations.",
624
+ broadcastTime: "2023-12-12T21:00:00"
625
+ },
626
+ {
627
+ title: "Space Explorers",
628
+ type: "Documentary",
629
+ genre: "Science, Space",
630
+ platform: "Disney+",
631
+ rating: "4.9",
632
+ year: "2023",
633
+ description: "The latest discoveries from the frontiers of space exploration.",
634
+ broadcastTime: "2023-12-14T18:00:00"
635
+ },
636
+ {
637
+ title: "Romantic Getaway",
638
+ type: "Movie",
639
+ genre: "Romance, Comedy",
640
+ platform: "Amazon Prime",
641
+ rating: "4.5",
642
+ year: "2021",
643
+ description: "Two strangers find love during an unexpected vacation.",
644
+ broadcastTime: "2023-12-16T20:30:00"
645
+ },
646
+ {
647
+ title: "Tech Today",
648
+ type: "News Show",
649
+ genre: "Technology, News",
650
+ platform: "SMPlus VHX",
651
+ rating: "4.6",
652
+ year: "2023",
653
+ description: "Daily tech news and gadget reviews from around the world.",
654
+ broadcastTime: "2023-12-17T09:00:00"
655
+ },
656
+ {
657
+ title: "Cooking Masters",
658
+ type: "Reality Show",
659
+ genre: "Food, Competition",
660
+ platform: "Netflix",
661
+ rating: "4.7",
662
+ year: "2023",
663
+ description: "Top chefs compete in intense culinary challenges.",
664
+ broadcastTime: "2023-12-18T20:00:00"
665
+ },
666
+ {
667
+ title: "History Unearthed",
668
+ type: "Documentary",
669
+ genre: "History, Education",
670
+ platform: "HBO Max",
671
+ rating: "4.8",
672
+ year: "2023",
673
+ description: "Fascinating historical discoveries and their modern implications.",
674
+ broadcastTime: "2023-12-19T21:00:00"
675
+ }
676
+ ];
677
+
678
+ // Sample RSS feed data
679
+ const rssFeedData = {
680
+ all: [
681
+ {
682
+ title: "New Episode: SMPlus Exclusive Series",
683
+ source: "SMPlus VHX",
684
+ time: "2 hours ago",
685
+ excerpt: "The latest episode of our exclusive series is now streaming with intense action scenes.",
686
+ category: "personalized"
687
+ },
688
+ {
689
+ title: "Trending: The Grand Adventure hits #1",
690
+ source: "Netflix",
691
+ time: "5 hours ago",
692
+ excerpt: "The comedy adventure movie is now the most-watched title on Netflix this week.",
693
+ category: "trending"
694
+ },
695
+ {
696
+ title: "Breaking: New streaming partnership announced",
697
+ source: "Streaming News",
698
+ time: "1 day ago",
699
+ excerpt: "Major platforms announce new content sharing agreement starting next month.",
700
+ category: "news"
701
+ },
702
+ {
703
+ title: "Recommended for you: Space Explorers",
704
+ source: "Disney+",
705
+ time: "1 day ago",
706
+ excerpt: "Based on your interest in science documentaries, we recommend this new series.",
707
+ category: "personalized"
708
+ },
709
+ {
710
+ title: "Upcoming: Romantic Getaway special event",
711
+ source: "Amazon Prime",
712
+ time: "2 days ago",
713
+ excerpt: "Join the cast for a live Q&A before the movie premiere this weekend.",
714
+ category: "trending"
715
+ }
716
+ ],
717
+ news: [
718
+ {
719
+ title: "Breaking: New streaming partnership announced",
720
+ source: "Streaming News",
721
+ time: "1 day ago",
722
+ excerpt: "Major platforms announce new content sharing agreement starting next month.",
723
+ category: "news"
724
+ },
725
+ {
726
+ title: "Streaming industry report Q4 2023",
727
+ source: "Tech Insights",
728
+ time: "3 days ago",
729
+ excerpt: "Latest statistics show continued growth in streaming subscriptions worldwide.",
730
+ category: "news"
731
+ }
732
+ ],
733
+ trending: [
734
+ {
735
+ title: "Trending: The Grand Adventure hits #1",
736
+ source: "Netflix",
737
+ time: "5 hours ago",
738
+ excerpt: "The comedy adventure movie is now the most-watched title on Netflix this week.",
739
+ category: "trending"
740
+ },
741
+ {
742
+ title: "Upcoming: Romantic Getaway special event",
743
+ source: "Amazon Prime",
744
+ time: "2 days ago",
745
+ excerpt: "Join the cast for a live Q&A before the movie premiere this weekend.",
746
+ category: "trending"
747
+ }
748
+ ],
749
+ personalized: [
750
+ {
751
+ title: "New Episode: SMPlus Exclusive Series",
752
+ source: "SMPlus VHX",
753
+ time: "2 hours ago",
754
+ excerpt: "The latest episode of our exclusive series is now streaming with intense action scenes.",
755
+ category: "personalized"
756
+ },
757
+ {
758
+ title: "Recommended for you: Space Explorers",
759
+ source: "Disney+",
760
+ time: "1 day ago",
761
+ excerpt: "Based on your interest in science documentaries, we recommend this new series.",
762
+ category: "personalized"
763
+ }
764
+ ]
765
+ };
766
+
767
+ // Video production variables
768
+ let isRecording = false;
769
+ let recordingInterval;
770
+ let recordedClips = [];
771
+ let mediaRecorder;
772
+ let audioContext;
773
+ let audioStream;
774
+ let videoStream;
775
+ let currentClipTime = 0;
776
+ let currentClipInterval;
777
+
778
+ // Initialize chat
779
+ document.addEventListener('DOMContentLoaded', function() {
780
+ const sendBtn = document.getElementById('send-btn');
781
+ const userInput = document.getElementById('user-input');
782
+ const chatMessages = document.getElementById('chat-messages');
783
+ const productionButton = document.getElementById('production-button');
784
+ const productionPanel = document.getElementById('production-panel');
785
+ const startRecordingBtn = document.getElementById('start-recording');
786
+ const stopRecordingBtn = document.getElementById('stop-recording');
787
+ const generateVideoBtn = document.getElementById('generate-video');
788
+ const clearClipsBtn = document.getElementById('clear-clips');
789
+ const rssFilterBtns = document.querySelectorAll('.rss-filter-btn');
790
+ const recordTab = document.getElementById('record-tab');
791
+ const editTab = document.getElementById('edit-tab');
792
+ const recordSection = document.getElementById('record-section');
793
+ const editSection = document.getElementById('edit-section');
794
+
795
+ // Load sample recommendations
796
+ loadRecommendations();
797
+
798
+ // Load RSS feed
799
+ loadRSSFeed('all');
800
+
801
+ // Send message on button click
802
+ sendBtn.addEventListener('click', sendMessage);
803
+
804
+ // Send message on Enter key
805
+ userInput.addEventListener('keypress', function(e) {
806
+ if (e.key === 'Enter') {
807
+ sendMessage();
808
+ }
809
+ });
810
+
811
+ // Toggle production panel
812
+ productionButton.addEventListener('click', function() {
813
+ productionPanel.classList.toggle('open');
814
+ });
815
+
816
+ // Start recording
817
+ startRecordingBtn.addEventListener('click', startRecording);
818
+
819
+ // Stop recording
820
+ stopRecordingBtn.addEventListener('click', stopRecording);
821
+
822
+ // Generate video
823
+ generateVideoBtn.addEventListener('click', generateShortVideo);
824
+
825
+ // Clear clips
826
+ clearClipsBtn.addEventListener('click', clearClips);
827
+
828
+ // Filter RSS feed
829
+ rssFilterBtns.forEach(btn => {
830
+ btn.addEventListener('click', function() {
831
+ // Update active button
832
+ rssFilterBtns.forEach(b => b.classList.remove('bg-indigo-100', 'text-indigo-700'));
833
+ rssFilterBtns.forEach(b => b.classList.add('bg-gray-100', 'text-gray-700'));
834
+ this.classList.remove('bg-gray-100', 'text-gray-700');
835
+ this.classList.add('bg-indigo-100', 'text-indigo-700');
836
+
837
+ // Load filtered feed
838
+ loadRSSFeed(this.dataset.filter);
839
+ });
840
+ });
841
+
842
+ // Switch between record and edit tabs
843
+ recordTab.addEventListener('click', function() {
844
+ recordTab.classList.remove('inactive');
845
+ recordTab.classList.add('active');
846
+ editTab.classList.remove('active');
847
+ editTab.classList.add('inactive');
848
+ recordSection.classList.remove('hidden');
849
+ editSection.classList.add('hidden');
850
+ });
851
+
852
+ editTab.addEventListener('click', function() {
853
+ if (recordedClips.length === 0) {
854
+ showNotification("No Clips", "Record some clips first to edit them");
855
+ return;
856
+ }
857
+
858
+ editTab.classList.remove('inactive');
859
+ editTab.classList.add('active');
860
+ recordTab.classList.remove('active');
861
+ recordTab.classList.add('inactive');
862
+ recordSection.classList.add('hidden');
863
+ editSection.classList.remove('hidden');
864
+ });
865
+ });
866
+
867
+ // Show notification
868
+ function showNotification(title, message) {
869
+ const notification = document.getElementById('notification');
870
+ const titleElement = document.getElementById('notification-title');
871
+ const messageElement = document.getElementById('notification-message');
872
+
873
+ titleElement.textContent = title;
874
+ messageElement.textContent = message;
875
+
876
+ notification.classList.remove('hidden');
877
+ notification.classList.add('show');
878
+
879
+ setTimeout(() => {
880
+ notification.classList.remove('show');
881
+ setTimeout(() => notification.classList.add('hidden'), 300);
882
+ }, 3000);
883
+ }
884
+
885
+ // Quick prompt buttons
886
+ function quickPrompt(prompt) {
887
+ document.getElementById('user-input').value = prompt;
888
+ sendMessage();
889
+ }
890
+
891
+ // Send message to AI
892
+ async function sendMessage() {
893
+ const userInput = document.getElementById('user-input');
894
+ const chatMessages = document.getElementById('chat-messages');
895
+
896
+ if (userInput.value.trim() === '') return;
897
+
898
+ // Add user message to chat
899
+ const userMessage = document.createElement('div');
900
+ userMessage.className = 'chat-bubble user-bubble p-4 w-3/4 ml-auto mb-4 fade-in';
901
+ userMessage.innerHTML = `<p>${userInput.value}</p>`;
902
+ chatMessages.appendChild(userMessage);
903
+
904
+ // Show typing indicator
905
+ const typingIndicator = document.createElement('div');
906
+ typingIndicator.className = 'chat-bubble ai-bubble p-4 w-1/2 mb-4';
907
+ typingIndicator.innerHTML = '<div class="typing-indicator"><span></span><span></span><span></span></div>';
908
+ chatMessages.appendChild(typingIndicator);
909
+
910
+ // Scroll to bottom
911
+ chatMessages.scrollTop = chatMessages.scrollHeight;
912
+
913
+ // Save user message
914
+ const userMessageText = userInput.value;
915
+ userInput.value = '';
916
+
917
+ try {
918
+ // Call Cloudflare Workers AI
919
+ const aiResponse = await queryCloudflareAI(userMessageText);
920
+
921
+ // Remove typing indicator
922
+ chatMessages.removeChild(typingIndicator);
923
+
924
+ // Add AI response to chat
925
+ const aiMessage = document.createElement('div');
926
+ aiMessage.className = 'chat-bubble ai-bubble p-4 w-3/4 fade-in';
927
+ aiMessage.innerHTML = `<p>${aiResponse}</p>`;
928
+ chatMessages.appendChild(aiMessage);
929
+
930
+ // Update recommendations based on AI response
931
+ updateRecommendationsFromAI(aiResponse);
932
+
933
+ } catch (error) {
934
+ // Remove typing indicator
935
+ chatMessages.removeChild(typingIndicator);
936
+
937
+ // Show error message
938
+ const errorMessage = document.createElement('div');
939
+ errorMessage.className = 'chat-bubble ai-bubble p-4 w-3/4 fade-in';
940
+ errorMessage.innerHTML = `<p class="text-red-500">Sorry, I'm having trouble connecting to the AI service. Please try again later.</p>`;
941
+ chatMessages.appendChild(errorMessage);
942
+ }
943
+
944
+ // Scroll to bottom
945
+ chatMessages.scrollTop = chatMessages.scrollHeight;
946
+ }
947
+
948
+ // Query Cloudflare Workers AI
949
+ async function queryCloudflareAI(prompt) {
950
+ // In a production environment, this would be handled by a backend service
951
+ // to keep the API token secure. For this demo, we'll simulate the response.
952
+
953
+ console.log(`[DEBUG] Would call Cloudflare AI with prompt: "${prompt}"`);
954
+
955
+ // Simulate API call delay
956
+ await new Promise(resolve => setTimeout(resolve, 1500));
957
+
958
+ // Simulate different responses based on prompt
959
+ const lowerPrompt = prompt.toLowerCase();
960
+
961
+ if (lowerPrompt.includes('comedy') || lowerPrompt.includes('funny')) {
962
+ return "I'd recommend these comedy options that should give you a good laugh:\n\n1. 'The Grand Adventure' (Netflix) - A hilarious journey with unexpected twists\n2. 'Office Shenanigans' (Hulu) - Workplace comedy at its finest\n\nComedy can really lift your mood! Would you like more suggestions?";
963
+ }
964
+ else if (lowerPrompt.includes('thriller') || lowerPrompt.includes('suspense')) {
965
+ return "For thrilling content that will keep you on the edge of your seat, consider:\n\n1. 'Dark Secrets' (HBO Max) - A town's dark past resurfaces\n2. 'Midnight Caller' (Amazon Prime) - A psychological thriller about a mysterious phone call\n\nThese should provide plenty of suspense!";
966
+ }
967
+ else if (lowerPrompt.includes('romance') || lowerPrompt.includes('love')) {
968
+ return "Romantic stories can be so heartwarming! Here are my top picks:\n\n1. 'Romantic Getaway' (Amazon Prime) - Two strangers find love on vacation\n2. 'Love in Paris' (Netflix) - A classic romantic tale set in the City of Love\n\nLet me know if you'd like something more specific!";
969
+ }
970
+ else if (lowerPrompt.includes('recommend') || lowerPrompt.includes('suggest')) {
971
+ return "Based on your request, I'd recommend these excellent streaming options:\n\n1. 'SMPlus Exclusive Series' (SMPlus VHX) - Action-packed drama series\n2. 'Space Explorers' (Disney+) - Fascinating documentary about space\n\nI've updated the recommendations section with more options for you!";
972
+ }
973
+ else {
974
+ return "I'm here to help you find the perfect streaming content! Could you tell me more about what you're looking for? For example, you could say 'recommend a sci-fi movie' or 'what should I watch if I feel like laughing?'";
975
+ }
976
+ }
977
+
978
+ // Update recommendations based on AI response
979
+ function updateRecommendationsFromAI(aiResponse) {
980
+ let filter = 'all';
981
+
982
+ if (aiResponse.includes('comedy')) {
983
+ filter = 'comedy';
984
+ } else if (aiResponse.includes('thriller') || aiResponse.includes('suspense')) {
985
+ filter = 'thriller';
986
+ } else if (aiResponse.includes('romance') || aiResponse.includes('love')) {
987
+ filter = 'romance';
988
+ }
989
+
990
+ loadRecommendations(filter);
991
+ }
992
+
993
+ // Save show and set broadcast reminder
994
+ function saveShow(title, broadcastTime) {
995
+ // In a real app, this would save to a database
996
+ console.log(`Saved show: ${title}`);
997
+
998
+ // Show notification
999
+ showNotification("Reminder Set!", `We'll notify you when "${title}" is about to broadcast.`);
1000
+
1001
+ // In a real app, you would schedule a notification for the broadcast time
1002
+ if (broadcastTime) {
1003
+ const broadcastDate = new Date(broadcastTime);
1004
+ const now = new Date();
1005
+
1006
+ // Only schedule if broadcast is in the future
1007
+ if (broadcastDate > now) {
1008
+ const timeUntilBroadcast = broadcastDate - now;
1009
+
1010
+ // Schedule notification 30 minutes before broadcast
1011
+ setTimeout(() => {
1012
+ showNotification("Starting Soon!", `"${title}" will begin broadcasting in 30 minutes!`);
1013
+ }, timeUntilBroadcast - (30 * 60 * 1000));
1014
+ }
1015
+ }
1016
+ }
1017
+
1018
+ // Load recommendations
1019
+ function loadRecommendations(filter = 'all') {
1020
+ const container = document.getElementById('recommendations-container');
1021
+ container.innerHTML = '';
1022
+
1023
+ let filteredData = streamingData;
1024
+
1025
+ if (filter === 'comedy') {
1026
+ filteredData = streamingData.filter(item => item.genre.toLowerCase().includes('comedy'));
1027
+ } else if (filter === 'thriller') {
1028
+ filteredData = streamingData.filter(item => item.genre.toLowerCase().includes('thriller'));
1029
+ } else if (filter === 'romance') {
1030
+ filteredData = streamingData.filter(item => item.genre.toLowerCase().includes('romance'));
1031
+ }
1032
+
1033
+ filteredData.forEach(item => {
1034
+ const card = document.createElement('div');
1035
+ card.className = 'stream-card bg-white rounded-lg overflow-hidden shadow-md hover:shadow-xl transition duration-300 fade-in p-4';
1036
+ card.innerHTML = `
1037
+ <div class="mb-3">
1038
+ <div class="flex justify-between items-start">
1039
+ <h3 class="font-bold text-base">${item.title}</h3>
1040
+ <span class="bg-yellow-100 text-yellow-800 text-xs px-2 py-1 rounded-full flex items-center">
1041
+ <i class="fas fa-star text-yellow-500 mr-1 text-xs"></i> ${item.rating}
1042
+ </span>
1043
+ </div>
1044
+ <p class="text-gray-600 text-xs mb-1">${item.type} • ${item.genre} • ${item.year}</p>
1045
+ <div class="text-xs text-indigo-600 mb-2">${item.platform}</div>
1046
+ </div>
1047
+ <p class="text-gray-700 text-sm mb-4">${item.description}</p>
1048
+ <div class="flex justify-between items-center">
1049
+ <button class="text-indigo-600 hover:text-indigo-800 text-xs font-medium" onclick="saveShow('${item.title}', '${item.broadcastTime}')">
1050
+ <i class="far fa-bookmark mr-1"></i> Save
1051
+ </button>
1052
+ <a href="${item.platform === 'SMPlus VHX' ? 'https://smplus.vhx.tv' : '#'}" target="_blank" class="bg-indigo-600 hover:bg-indigo-700 text-white px-3 py-1 rounded-full text-xs font-medium transition">
1053
+ <i class="fas fa-play mr-1"></i> Watch
1054
+ </a>
1055
+ </div>
1056
+ `;
1057
+ container.appendChild(card);
1058
+ });
1059
+ }
1060
+
1061
+ // Load RSS feed
1062
+ function loadRSSFeed(filter) {
1063
+ const container = document.getElementById('rss-feed');
1064
+ container.innerHTML = '';
1065
+
1066
+ const feedItems = rssFeedData[filter] || rssFeedData.all;
1067
+
1068
+ feedItems.forEach(item => {
1069
+ const feedItem = document.createElement('div');
1070
+ feedItem.className = 'rss-item bg-gray-50 p-3 rounded-lg';
1071
+ feedItem.innerHTML = `
1072
+ <h4 class="font-medium text-sm mb-1">${item.title}</h4>
1073
+ <div class="flex items-center text-xs text-gray-500 mb-2">
1074
+ <span>${item.source}</span>
1075
+ <span class="mx-2">•</span>
1076
+ <span>${item.time}</span>
1077
+ </div>
1078
+ <p class="text-xs text-gray-700">${item.excerpt}</p>
1079
+ `;
1080
+ container.appendChild(feedItem);
1081
+ });
1082
+ }
1083
+
1084
+ // Start recording video and audio
1085
+ async function startRecording() {
1086
+ try {
1087
+ // Get user media
1088
+ videoStream = await navigator.mediaDevices.getDisplayMedia({
1089
+ video: true,
1090
+ audio: true
1091
+ });
1092
+
1093
+ audioStream = await navigator.mediaDevices.getUserMedia({
1094
+ audio: true
1095
+ });
1096
+
1097
+ // Create audio context
1098
+ audioContext = new AudioContext();
1099
+ const source = audioContext.createMediaStreamSource(audioStream);
1100
+ const destination = audioContext.createMediaStreamDestination();
1101
+ source.connect(destination);
1102
+
1103
+ // Combine video and audio streams
1104
+ const combinedStream = new MediaStream([
1105
+ ...videoStream.getVideoTracks(),
1106
+ ...destination.stream.getAudioTracks()
1107
+ ]);
1108
+
1109
+ // Create media recorder
1110
+ mediaRecorder = new MediaRecorder(combinedStream, {
1111
+ mimeType: 'video/webm'
1112
+ });
1113
+
1114
+ // Update preview with live recording
1115
+ const preview = document.getElementById('clip-preview');
1116
+ preview.innerHTML = '<video autoplay muted></video>';
1117
+ const previewVideo = preview.querySelector('video');
1118
+ previewVideo.srcObject = combinedStream;
1119
+
1120
+ // Set recording state
1121
+ isRecording = true;
1122
+ document.getElementById('recording-indicator').classList.remove('hidden');
1123
+ document.getElementById('start-recording').classList.add('hidden');
1124
+ document.getElementById('stop-recording').classList.remove('hidden');
1125
+
1126
+ // Start progress bar animation
1127
+ currentClipTime = 0;
1128
+ const progressFill = document.getElementById('progress-fill');
1129
+ progressFill.style.width = '0%';
1130
+
1131
+ currentClipInterval = setInterval(() => {
1132
+ currentClipTime += 100;
1133
+ const progressPercent = (currentClipTime / 5000) * 100;
1134
+ progressFill.style.width = `${progressPercent}%`;
1135
+ }, 100);
1136
+
1137
+ // Start recording in 5-second clips
1138
+ let clipCount = 0;
1139
+ recordingInterval = setInterval(() => {
1140
+ if (clipCount > 0) {
1141
+ // Stop current recording
1142
+ mediaRecorder.stop();
1143
+ }
1144
+
1145
+ // Start new recording
1146
+ mediaRecorder.start();
1147
+ clipCount++;
1148
+
1149
+ // Reset progress bar
1150
+ currentClipTime = 0;
1151
+ progressFill.style.width = '0%';
1152
+
1153
+ // Store clip data when available
1154
+ mediaRecorder.ondataavailable = (e) => {
1155
+ const clip = {
1156
+ blob: e.data,
1157
+ timestamp: new Date().toLocaleTimeString(),
1158
+ url: URL.createObjectURL(e.data)
1159
+ };
1160
+ recordedClips.push(clip);
1161
+ updateClipsList();
1162
+ };
1163
+ }, 5000);
1164
+
1165
+ showNotification("Recording Started", "Recording 5-second clips of your screen and audio");
1166
+
1167
+ } catch (error) {
1168
+ console.error("Error starting recording:", error);
1169
+ showNotification("Recording Error", "Could not start recording. Please check permissions.");
1170
+ stopRecording();
1171
+ }
1172
+ }
1173
+
1174
+ // Stop recording
1175
+ function stopRecording() {
1176
+ if (mediaRecorder && mediaRecorder.state !== 'inactive') {
1177
+ mediaRecorder.stop();
1178
+ }
1179
+
1180
+ clearInterval(recordingInterval);
1181
+ clearInterval(currentClipInterval);
1182
+ isRecording = false;
1183
+
1184
+ // Stop all tracks
1185
+ if (videoStream) {
1186
+ videoStream.getTracks().forEach(track => track.stop());
1187
+ }
1188
+ if (audioStream) {
1189
+ audioStream.getTracks().forEach(track => track.stop());
1190
+ }
1191
+
1192
+ // Close audio context
1193
+ if (audioContext && audioContext.state !== 'closed') {
1194
+ audioContext.close();
1195
+ }
1196
+
1197
+ // Reset preview
1198
+ const preview = document.getElementById('clip-preview');
1199
+ preview.innerHTML = `
1200
+ <div class="clip-preview-placeholder">
1201
+ <i class="fas fa-video"></i>
1202
+ <p>Preview will appear here</p>
1203
+ </div>
1204
+ `;
1205
+
1206
+ // Reset progress bar
1207
+ document.getElementById('progress-fill').style.width = '0%';
1208
+
1209
+ // Update UI
1210
+ document.getElementById('recording-indicator').classList.add('hidden');
1211
+ document.getElementById('start-recording').classList.remove('hidden');
1212
+ document.getElementById('stop-recording').classList.add('hidden');
1213
+
1214
+ showNotification("Recording Stopped", `Captured ${recordedClips.length} clips ready for production`);
1215
+ }
1216
+
1217
+ // Update clips list
1218
+ function updateClipsList() {
1219
+ const container = document.getElementById('clips-container');
1220
+ container.innerHTML = '';
1221
+
1222
+ if (recordedClips.length === 0) {
1223
+ container.innerHTML = '<p class="text-gray-500 text-sm">Clips will appear here...</p>';
1224
+ return;
1225
+ }
1226
+
1227
+ recordedClips.forEach((clip, index) => {
1228
+ const clipItem = document.createElement('div');
1229
+ clipItem.className = 'clip-item';
1230
+ clipItem.innerHTML = `
1231
+ <i class="fas fa-video text-gray-500 mr-2"></i>
1232
+ <span class="text-sm flex-1">Clip ${index + 1}</span>
1233
+ <span class="text-xs text-gray-500">${clip.timestamp}</span>
1234
+ `;
1235
+
1236
+ // Add click handler to preview clip
1237
+ clipItem.addEventListener('click', () => {
1238
+ const preview = document.getElementById('clip-preview');
1239
+ preview.innerHTML = '<video controls></video>';
1240
+ const previewVideo = preview.querySelector('video');
1241
+ previewVideo.src = clip.url;
1242
+ });
1243
+
1244
+ container.appendChild(clipItem);
1245
+ });
1246
+ }
1247
+
1248
+ // Clear all clips
1249
+ function clearClips() {
1250
+ if (recordedClips.length === 0) return;
1251
+
1252
+ // In a real app, we would properly revoke the object URLs
1253
+ recordedClips.forEach(clip => {
1254
+ if (clip.url) {
1255
+ URL.revokeObjectURL(clip.url);
1256
+ }
1257
+ });
1258
+
1259
+ recordedClips = [];
1260
+ updateClipsList();
1261
+
1262
+ // Reset preview
1263
+ const preview = document.getElementById('clip-preview');
1264
+ preview.innerHTML = `
1265
+ <div class="clip-preview-placeholder">
1266
+ <i class="fas fa-video"></i>
1267
+ <p>Preview will appear here</p>
1268
+ </div>
1269
+ `;
1270
+
1271
+ showNotification("Clips Cleared", "All recorded clips have been removed");
1272
+ }
1273
+
1274
+ // Generate short video from clips
1275
+ function generateShortVideo() {
1276
+ if (recordedClips.length === 0) {
1277
+ showNotification("No Clips", "Please record some clips first");
1278
+ return;
1279
+ }
1280
+
1281
+ // In a real app, this would use a video editing library to combine clips
1282
+ // and sync with audio. For this demo, we'll simulate the process.
1283
+
1284
+ showNotification("Video Generation", "Processing your clips into a short video...");
1285
+
1286
+ setTimeout(() => {
1287
+ // Simulate processing time
1288
+ const videoUrl = URL.createObjectURL(new Blob(["Simulated video content"], { type: 'video/mp4' }));
1289
+
1290
+ // Create download link
1291
+ const a = document.createElement('a');
1292
+ a.href = videoUrl;
1293
+ a.download = 'streamai-short.mp4';
1294
+ a.click();
1295
+
1296
+ showNotification("Video Ready", "Your short video has been generated and downloaded");
1297
+ }, 3000);
1298
+ }
1299
+ </script>
1300
+ <p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - 🧬 <a href="https://enzostvs-deepsite.hf.space?remix=privateuserh/privaistrm-vbeta1-02" style="color: #fff;text-decoration: underline;" target="_blank" >Remix</a></p></body>
1301
+ </html>
prompts.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ Ensure the Video Production are explains the user can record there live video and spin up clips for production