|
@@ -7,8 +7,10 @@
|
7
|
7
|
export const togglePause = (videoEl, { paused }) => {
|
8
|
8
|
if (paused) {
|
9
|
9
|
videoEl.play();
|
|
10
|
+ document.querySelector("#videoTitle").style.display = 'none';
|
10
|
11
|
} else {
|
11
|
12
|
videoEl.pause();
|
|
13
|
+ document.querySelector("#videoTitle").style.display = '';
|
12
|
14
|
}
|
13
|
15
|
};
|
14
|
16
|
|
|
@@ -40,7 +42,7 @@ export const toggleMute = (videoEl, { volume, muted }) => {
|
40
|
42
|
}
|
41
|
43
|
};
|
42
|
44
|
|
43
|
|
-export const toggleFullscreen = (videoEl, callback) => {debugger;
|
|
45
|
+export const toggleFullscreen = (videoEl, callback) => {
|
44
|
46
|
videoEl.requestFullScreen =
|
45
|
47
|
videoEl.requestFullscreen
|
46
|
48
|
|| videoEl.msRequestFullscreen
|
|
@@ -57,8 +59,12 @@ export const toggleFullscreen = (videoEl, callback) => {debugger;
|
57
|
59
|
|| document.mozFullScreenElement
|
58
|
60
|
|| document.webkitFullscreenElement;
|
59
|
61
|
if (fullscreenElement === videoEl) {
|
|
62
|
+ document.querySelector('video').style.maxHeight = '100%';
|
|
63
|
+ window.fullscreen = false;
|
60
|
64
|
document.exitFullscreen();
|
61
|
65
|
} else {
|
|
66
|
+ document.querySelector('video').style.maxHeight = '100%';
|
|
67
|
+ window.fullscreen = true;
|
62
|
68
|
videoEl.requestFullScreen();
|
63
|
69
|
}
|
64
|
70
|
};
|