ChandimaPrabath commited on
Commit
9977f83
·
1 Parent(s): 4d0458f

player version 0.0.4 Alpha

Browse files
frontend/src/app/layout.js CHANGED
@@ -11,36 +11,41 @@ config.autoAddCss = false;
11
  const inter = Inter({ subsets: ["latin"] });
12
 
13
  export const metadata = {
14
- generator: 'Next.js',
15
- applicationName: 'Nexora',
16
- referrer: 'origin-when-cross-origin',
17
  keywords: [
18
- 'Nexora',
19
- 'Movies',
20
- 'TV Shows',
21
- 'Streaming Service',
22
- 'Online Streaming',
23
- 'Watch Movies',
24
- 'Watch TV Shows',
25
- 'Movie Streaming',
26
- 'TV Show Streaming',
27
- 'HD Movies',
28
- 'HD TV Shows'
29
  ],
30
- authors: [{ name: 'Prince Hans' }],
31
- creator: 'Prince Hans',
32
- publisher: 'Prince Hans',
33
- description: 'Nexora is your go-to platform for streaming the latest movies and TV shows. Enjoy a seamless experience with a vast library of HD content.',
34
- charset: 'UTF-8',
35
- robots: 'index, follow',
36
- }
 
37
 
38
  export default function RootLayout({ children }) {
39
  return (
40
  <html lang="en">
41
  <head>
42
  <link rel="manifest" href="/webmanifest.json" />
43
- <meta name="google-site-verification" content="I0Ek30weBtiN05x5O5wID0tPEPuo7ZCippWfbOWc4yo"/>
 
 
 
 
44
  </head>
45
  <body className={inter.className}>
46
  <Providers>
 
11
  const inter = Inter({ subsets: ["latin"] });
12
 
13
  export const metadata = {
14
+ generator: "Next.js",
15
+ applicationName: "Nexora",
16
+ referrer: "origin-when-cross-origin",
17
  keywords: [
18
+ "Nexora",
19
+ "Movies",
20
+ "TV Shows",
21
+ "Streaming Service",
22
+ "Online Streaming",
23
+ "Watch Movies",
24
+ "Watch TV Shows",
25
+ "Movie Streaming",
26
+ "TV Show Streaming",
27
+ "HD Movies",
28
+ "HD TV Shows",
29
  ],
30
+ authors: [{ name: "Prince Hans" }],
31
+ creator: "Prince Hans",
32
+ publisher: "Prince Hans",
33
+ description:
34
+ "Nexora is your go-to platform for streaming the latest movies and TV shows. Enjoy a seamless experience with a vast library of HD content.",
35
+ charset: "UTF-8",
36
+ robots: "index, follow",
37
+ };
38
 
39
  export default function RootLayout({ children }) {
40
  return (
41
  <html lang="en">
42
  <head>
43
  <link rel="manifest" href="/webmanifest.json" />
44
+ <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@40,400,0,-25" />
45
+ <meta
46
+ name="google-site-verification"
47
+ content="I0Ek30weBtiN05x5O5wID0tPEPuo7ZCippWfbOWc4yo"
48
+ />
49
  </head>
50
  <body className={inter.className}>
51
  <Providers>
frontend/src/components/Player/Player.css CHANGED
@@ -14,15 +14,21 @@
14
  .video-title {
15
  color: #d5d6d7;
16
  display: flex;
 
 
 
17
  align-items: center;
18
  text-align: left;
19
- padding-bottom: 50px;
20
- padding: 20px;
21
  font-size: 1.5em;
22
  font-weight: bold;
23
  background-image: linear-gradient(#0e0f19cb 50%, transparent 100%);
24
  }
25
 
 
 
 
 
26
  .video-element {
27
  width: 100%;
28
  height: auto;
@@ -93,19 +99,30 @@
93
  min-width: 10%;
94
  }
95
 
 
 
 
 
 
 
 
 
 
 
 
96
  .rewind-label-left {
97
  font-size: 1.2rem;
98
- font-weight: 600;
99
  position: absolute;
100
- transform: translate(1.2rem, 1.1rem);
101
  color: white;
102
  }
103
 
104
  .rewind-label-right {
105
  font-size: 1.2rem;
106
- font-weight: 600;
107
  position: absolute;
108
- transform: translate(-2.8rem, 1.1rem);
109
  color: white;
110
  }
111
 
@@ -151,7 +168,8 @@
151
  color: var(--player-primary);
152
  border-radius: 10px;
153
  border: none;
154
- padding: 10px;
 
155
  cursor: pointer;
156
  font-size: 1em;
157
  transition: background-color 0.3s;
@@ -172,6 +190,10 @@
172
  margin: 0 5px;
173
  }
174
 
 
 
 
 
175
  .progress-bar {
176
  width: 85%;
177
  cursor: pointer;
@@ -210,7 +232,7 @@
210
  border-radius: 10px;
211
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
212
  z-index: 1000;
213
- padding: 10px;
214
  }
215
 
216
  .context-menu ul {
@@ -220,9 +242,10 @@
220
  }
221
 
222
  .context-menu li {
223
- padding: 5px 10px;
224
  cursor: pointer;
225
  border-radius: 5px;
 
226
  }
227
 
228
  /********** Range Input Styles **********/
@@ -244,17 +267,17 @@ input[type="range"]:focus {
244
  input[type="range"]::-webkit-slider-runnable-track {
245
  background-color: #403f4f;
246
  border-radius: 0.5rem;
247
- height: 0.5rem;
248
  }
249
 
250
  /* slider thumb */
251
  input[type="range"]::-webkit-slider-thumb {
252
  -webkit-appearance: none; /* Override default look */
253
  appearance: none;
254
- margin-top: -6px; /* Centers thumb on the track */
255
  /*custom styles*/
256
  background-color: var(--player-primary);
257
- height: 1.2rem;
258
  width: 0.8rem;
259
  border-radius: 10px;
260
  }
@@ -282,4 +305,4 @@ input[type="range"]::-moz-range-thumb {
282
  background-color: rgba(0, 0, 0, 0.7);
283
  font-size: 1.3em;
284
  line-height: 1.2; /* Adjust line height for spacing */
285
- }
 
14
  .video-title {
15
  color: #d5d6d7;
16
  display: flex;
17
+ overflow: hidden;
18
+ white-space: nowrap;
19
+ text-overflow: ellipsis;
20
  align-items: center;
21
  text-align: left;
22
+ padding: 15px;
 
23
  font-size: 1.5em;
24
  font-weight: bold;
25
  background-image: linear-gradient(#0e0f19cb 50%, transparent 100%);
26
  }
27
 
28
+ .player-exit{
29
+ padding-bottom: 0 !important;
30
+ }
31
+
32
  .video-element {
33
  width: 100%;
34
  height: auto;
 
99
  min-width: 10%;
100
  }
101
 
102
+ .material-symbols-outlined.large {
103
+ font-size: 65px;
104
+ }
105
+
106
+ .material-symbols-outlined.medium {
107
+ font-size: 40px;
108
+ }
109
+ .material-symbols-outlined.small {
110
+ font-size: 25px;
111
+ }
112
+
113
  .rewind-label-left {
114
  font-size: 1.2rem;
115
+ font-weight: 400;
116
  position: absolute;
117
+ transform: translate(1.5rem, 1.3rem);
118
  color: white;
119
  }
120
 
121
  .rewind-label-right {
122
  font-size: 1.2rem;
123
+ font-weight: 400;
124
  position: absolute;
125
+ transform: translate(-2.8rem, 1.3rem);
126
  color: white;
127
  }
128
 
 
168
  color: var(--player-primary);
169
  border-radius: 10px;
170
  border: none;
171
+ padding: 5px;
172
+ padding-bottom: 0;
173
  cursor: pointer;
174
  font-size: 1em;
175
  transition: background-color 0.3s;
 
190
  margin: 0 5px;
191
  }
192
 
193
+ .volumn-btn{
194
+ padding-bottom: 0;
195
+ }
196
+
197
  .progress-bar {
198
  width: 85%;
199
  cursor: pointer;
 
232
  border-radius: 10px;
233
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
234
  z-index: 1000;
235
+ padding: 5px;
236
  }
237
 
238
  .context-menu ul {
 
242
  }
243
 
244
  .context-menu li {
245
+ padding: 5px;
246
  cursor: pointer;
247
  border-radius: 5px;
248
+ color: rgb(184, 184, 189);
249
  }
250
 
251
  /********** Range Input Styles **********/
 
267
  input[type="range"]::-webkit-slider-runnable-track {
268
  background-color: #403f4f;
269
  border-radius: 0.5rem;
270
+ height: 0.3rem;
271
  }
272
 
273
  /* slider thumb */
274
  input[type="range"]::-webkit-slider-thumb {
275
  -webkit-appearance: none; /* Override default look */
276
  appearance: none;
277
+ margin-top: -5px; /* Centers thumb on the track */
278
  /*custom styles*/
279
  background-color: var(--player-primary);
280
+ height: 1rem;
281
  width: 0.8rem;
282
  border-radius: 10px;
283
  }
 
305
  background-color: rgba(0, 0, 0, 0.7);
306
  font-size: 1.3em;
307
  line-height: 1.2; /* Adjust line height for spacing */
308
+ }
frontend/src/components/Player/Player.js CHANGED
@@ -48,7 +48,7 @@ export default function Player({ videoUrl, title, type, episode = null }) {
48
  x: 0,
49
  y: 0,
50
  });
51
- const playerVersion = "0.0.3 Alpha";
52
  const seekTime = 5;
53
 
54
  useEffect(() => {
@@ -258,9 +258,19 @@ export default function Player({ videoUrl, title, type, episode = null }) {
258
  };
259
 
260
  const handleVolumeChange = (event) => {
261
- const volumeValue = event.target.value;
 
 
 
 
 
 
 
 
262
  setVolume(volumeValue);
263
- videoRef.current.volume = volumeValue;
 
 
264
  setIsMuted(volumeValue === 0);
265
  };
266
 
@@ -333,24 +343,31 @@ export default function Player({ videoUrl, title, type, episode = null }) {
333
  <div className={`player-overlay ${showControls ? "show" : "hide"}`}>
334
  <h2 className="video-title">
335
  <div className="control-btn player-exit" onClick={handleExitClick}>
336
- <FontAwesomeIcon icon={faArrowLeft} size="lg" />
 
 
337
  </div>
 
338
  {episode ? getFileNameWithoutExtension(episode) : title}
339
  </h2>
340
  <div className="player-controls-center">
341
  <button onClick={handleRewind} className="control-btn">
342
  <label className="rewind-label-left">{seekTime}s</label>
343
- <FontAwesomeIcon icon={faArrowRotateLeft} size="xl" />
344
  </button>
345
  <button onClick={togglePlayPause} className="play-pause-btn">
346
  {isPlaying ? (
347
- <FontAwesomeIcon icon={faPause} size="xl" />
348
  ) : (
349
- <FontAwesomeIcon icon={faPlay} size="xl" />
 
 
350
  )}
351
  </button>
352
  <button onClick={handleFastForward} className="control-btn">
353
- <FontAwesomeIcon icon={faArrowRotateRight} size="xl" />
 
 
354
  <label className="rewind-label-right">{seekTime}s</label>
355
  </button>
356
  </div>
@@ -370,11 +387,16 @@ export default function Player({ videoUrl, title, type, episode = null }) {
370
  </div>
371
  <div className="player-controls-down">
372
  <div className="player-controls-left">
373
- <button onClick={toggleMute} className="control-btn">
374
- <FontAwesomeIcon
375
- icon={isMuted ? faVolumeMute : faVolumeUp}
376
- size="xl"
377
- />
 
 
 
 
 
378
  </button>
379
  <input
380
  type="range"
@@ -389,40 +411,57 @@ export default function Player({ videoUrl, title, type, episode = null }) {
389
  onClick={handleRewind}
390
  className="previous-btn control-btn"
391
  >
392
- <FontAwesomeIcon icon={faBackwardStep} size="xl" />
 
 
393
  </button>
394
 
395
  <button
396
  onClick={handleFastForward}
397
  className="next-btn control-btn"
398
  >
399
- <FontAwesomeIcon icon={faForwardStep} size="xl" />
 
 
400
  </button>
401
  {isPlaying ? (
402
  <button className="playlist-btn control-btn">
403
- <FontAwesomeIcon icon={playlistOn} size="xl" />
 
 
404
  </button>
405
  ) : (
406
  <button className="playlist-btn control-btn" disabled={true}>
407
- <FontAwesomeIcon icon={playlistOff} size="xl" />
 
 
408
  </button>
409
  )}
410
  </div>
411
  <div className="player-controls-right">
412
  {isPlaying ? (
413
  <button className="cc-btn control-btn">
414
- <FontAwesomeIcon icon={ccOn} size="xl" />
 
 
415
  </button>
416
  ) : (
417
  <button className="cc-btn control-btn" disabled={true}>
418
- <FontAwesomeIcon icon={ccOff} size="xl" />
 
 
419
  </button>
420
  )}
421
  <button onClick={toggleFullscreen} className="control-btn">
422
- <FontAwesomeIcon
423
- icon={isFullscreen ? faCompress : faExpand}
424
- size="xl"
425
- />
 
 
 
 
 
426
  </button>
427
  {/* {videoUrl && (
428
  <a href={videoUrl} download className="control-btn">
 
48
  x: 0,
49
  y: 0,
50
  });
51
+ const playerVersion = "0.0.4 Alpha";
52
  const seekTime = 5;
53
 
54
  useEffect(() => {
 
258
  };
259
 
260
  const handleVolumeChange = (event) => {
261
+ let volumeValue = parseFloat(event.target.value);
262
+
263
+ // Ensure the volume is a finite number between 0 and 1
264
+ if (!isFinite(volumeValue) || volumeValue < 0) {
265
+ volumeValue = 0;
266
+ } else if (volumeValue > 1) {
267
+ volumeValue = 1;
268
+ }
269
+
270
  setVolume(volumeValue);
271
+ if (videoRef.current) {
272
+ videoRef.current.volume = volumeValue;
273
+ }
274
  setIsMuted(volumeValue === 0);
275
  };
276
 
 
343
  <div className={`player-overlay ${showControls ? "show" : "hide"}`}>
344
  <h2 className="video-title">
345
  <div className="control-btn player-exit" onClick={handleExitClick}>
346
+ <span className="material-symbols-outlined medium">
347
+ keyboard_tab_rtl
348
+ </span>
349
  </div>
350
+
351
  {episode ? getFileNameWithoutExtension(episode) : title}
352
  </h2>
353
  <div className="player-controls-center">
354
  <button onClick={handleRewind} className="control-btn">
355
  <label className="rewind-label-left">{seekTime}s</label>
356
+ <span className="material-symbols-outlined large">rotate_left</span>
357
  </button>
358
  <button onClick={togglePlayPause} className="play-pause-btn">
359
  {isPlaying ? (
360
+ <span className="material-symbols-outlined large">pause</span>
361
  ) : (
362
+ <span className="material-symbols-outlined large">
363
+ play_arrow
364
+ </span>
365
  )}
366
  </button>
367
  <button onClick={handleFastForward} className="control-btn">
368
+ <span className="material-symbols-outlined large">
369
+ rotate_right
370
+ </span>
371
  <label className="rewind-label-right">{seekTime}s</label>
372
  </button>
373
  </div>
 
387
  </div>
388
  <div className="player-controls-down">
389
  <div className="player-controls-left">
390
+ <button onClick={toggleMute} className="control-btn volumn-btn">
391
+ {isMuted ? (
392
+ <span className="material-symbols-outlined small">
393
+ volume_off
394
+ </span>
395
+ ) : (
396
+ <span className="material-symbols-outlined small">
397
+ volume_up
398
+ </span>
399
+ )}
400
  </button>
401
  <input
402
  type="range"
 
411
  onClick={handleRewind}
412
  className="previous-btn control-btn"
413
  >
414
+ <span className="material-symbols-outlined small">
415
+ skip_previous
416
+ </span>
417
  </button>
418
 
419
  <button
420
  onClick={handleFastForward}
421
  className="next-btn control-btn"
422
  >
423
+ <span className="material-symbols-outlined small">
424
+ skip_next
425
+ </span>
426
  </button>
427
  {isPlaying ? (
428
  <button className="playlist-btn control-btn">
429
+ <span className="material-symbols-outlined small">
430
+ featured_play_list
431
+ </span>
432
  </button>
433
  ) : (
434
  <button className="playlist-btn control-btn" disabled={true}>
435
+ <span className="material-symbols-outlined small">
436
+ featured_play_list
437
+ </span>
438
  </button>
439
  )}
440
  </div>
441
  <div className="player-controls-right">
442
  {isPlaying ? (
443
  <button className="cc-btn control-btn">
444
+ <span className="material-symbols-outlined small">
445
+ closed_caption
446
+ </span>
447
  </button>
448
  ) : (
449
  <button className="cc-btn control-btn" disabled={true}>
450
+ <span className="material-symbols-outlined small">
451
+ closed_caption_disabled
452
+ </span>
453
  </button>
454
  )}
455
  <button onClick={toggleFullscreen} className="control-btn">
456
+ {isFullscreen ? (
457
+ <span className="material-symbols-outlined small">
458
+ fullscreen_exit
459
+ </span>
460
+ ) : (
461
+ <span className="material-symbols-outlined small">
462
+ fullscreen
463
+ </span>
464
+ )}
465
  </button>
466
  {/* {videoUrl && (
467
  <a href={videoUrl} download className="control-btn">
frontend/src/components/shared/ProgressBar/SeekableProgressBar.css CHANGED
@@ -3,10 +3,14 @@
3
  }
4
 
5
  .MuiLinearProgress-bar2Buffer{
6
- background-color: #7970dc !important;
7
  }
8
 
9
  .MuiLinearProgress-dashedColorPrimary{
10
- background-image: radial-gradient(#282469 0%, #6b68a7 16%, transparent 42%) !important;
11
  margin-top: 2px !important;
 
 
 
 
 
12
  }
 
3
  }
4
 
5
  .MuiLinearProgress-bar2Buffer{
6
+ background-color: #82818c !important;
7
  }
8
 
9
  .MuiLinearProgress-dashedColorPrimary{
 
10
  margin-top: 2px !important;
11
+ animation: none !important;
12
+ -webkit-animation: none !important;
13
+ background-color: #424242 !important;
14
+ background-image: none !important;
15
+ top: -2px;
16
  }
frontend/src/components/shared/ProgressBar/SeekableProgressBar.js CHANGED
@@ -7,7 +7,7 @@ const SeekableProgressBar = ({
7
  buffer,
8
  onSeek,
9
  width = '100%',
10
- height = '10px',
11
  margin = '10px',
12
  borderRadios = '10px'
13
  }) => {
 
7
  buffer,
8
  onSeek,
9
  width = '100%',
10
+ height = '6px',
11
  margin = '10px',
12
  borderRadios = '10px'
13
  }) => {