jnotnull 6 years ago
parent
commit
d39a56b16d
3 changed files with 9 additions and 3 deletions
  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 View File

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

+ 7
- 1
src/video/api.js View File

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

+ 1
- 1
src/video/video.js View File

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