jnotnull před 6 roky
rodič
revize
d39a56b16d
3 změnil soubory, kde provedl 9 přidání a 3 odebrání
  1. 1
    1
      src/DefaultPlayer/Speed/Speed.css
  2. 7
    1
      src/video/api.js
  3. 1
    1
      src/video/video.js

+ 1
- 1
src/DefaultPlayer/Speed/Speed.css Zobrazit soubor

@@ -29,7 +29,7 @@
29 29
 
30 30
 .speedList {
31 31
     position: absolute;
32
-    right: 0;
32
+    right: -9px;
33 33
     bottom: 100%;
34 34
     display: none;
35 35
     background-color: rgba(0,0,0,0.7);

+ 7
- 1
src/video/api.js Zobrazit soubor

@@ -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
 };

+ 1
- 1
src/video/video.js Zobrazit soubor

@@ -120,7 +120,7 @@ export default (
120 120
                 this.props
121 121
             );
122 122
             return (
123
-                <div ref={this.setRef.bind(this)}>
123
+                <div ref={this.setRef.bind(this)} style={{height: '100%'}}>
124 124
                     <BaseComponent
125 125
                         {...mergeProps(
126 126
                             stateProps,