Added channel overlay to fullscreen video player
This commit is contained in:
@@ -498,6 +498,23 @@ h4 {
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Fullscreen mode for video container */
|
||||||
|
.video-container:fullscreen {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: #000;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-container:fullscreen #video-player {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.video-container:fullscreen .now-playing-overlay {
|
||||||
|
bottom: 80px;
|
||||||
|
}
|
||||||
|
|
||||||
.channel-nav {
|
.channel-nav {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
|||||||
@@ -6,6 +6,7 @@
|
|||||||
class VideoPlayer {
|
class VideoPlayer {
|
||||||
constructor() {
|
constructor() {
|
||||||
this.video = document.getElementById('video-player');
|
this.video = document.getElementById('video-player');
|
||||||
|
this.container = document.querySelector('.video-container');
|
||||||
this.overlay = document.getElementById('player-overlay');
|
this.overlay = document.getElementById('player-overlay');
|
||||||
this.nowPlaying = document.getElementById('now-playing');
|
this.nowPlaying = document.getElementById('now-playing');
|
||||||
this.hls = null;
|
this.hls = null;
|
||||||
@@ -495,8 +496,8 @@ class VideoPlayer {
|
|||||||
toggleFullscreen() {
|
toggleFullscreen() {
|
||||||
if (document.fullscreenElement) {
|
if (document.fullscreenElement) {
|
||||||
document.exitFullscreen();
|
document.exitFullscreen();
|
||||||
} else {
|
} else if (this.container) {
|
||||||
this.video.requestFullscreen();
|
this.container.requestFullscreen();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user