Skip to content

Commit

Permalink
VideoJS: Hotkeys, add focus, remove padding, big play button on pause
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobkossman committed May 18, 2020
1 parent 96a49ca commit cf50daf
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Components/Media/MediaItem/Styles.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const CloseVideo = styled(FontAwesomeIcon)`

export const VideoWrap = styled.article`
position: fixed;
padding: 1rem;
padding: 0;
top: 0;
left: 0;
right: 0;
Expand Down
5 changes: 4 additions & 1 deletion src/Components/Media/MediaItem/Video/Player.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ class Player extends Component {
showAutoItem: true,
},
},

controls: true,
controlBar: {
volumePanel: {
inline: false
}
},
userActions: {
hotkeys: true
},
html5: {
hls: {
enableLowInitialPlaylist: true,
Expand All @@ -73,6 +75,7 @@ class Player extends Component {
videoJsOptions.html5.hls.bandwidth = 1e12;
}
this.player = videojs(this.videoNode, videoJsOptions, function onPlayerReady() {
this.focus();
this.debugOverlay();
this.qualityLevels();
this.httpSourceSelector();
Expand Down
2 changes: 1 addition & 1 deletion src/Styles/_components/_video.scss
Original file line number Diff line number Diff line change
Expand Up @@ -1696,4 +1696,4 @@ video::-webkit-media-text-track-display {
* {
background: transparent !important;
}
}
}

0 comments on commit cf50daf

Please sign in to comment.