Letterbox video. Hide toolbar in fullscreen

Cleaner-looking Chromecast and Airplay icons

Hide top bar in full screen mode
This commit is contained in:
DC
2016-03-05 05:12:39 -08:00
parent 1b630b5025
commit 59b3bd04a9
6 changed files with 31 additions and 13 deletions

View File

@@ -17,9 +17,11 @@ function App (state, dispatch) {
}
}
var header = state.view.isFullScreen ? null : Header(state, dispatch)
return hx`
<div class="app">
${Header(state, dispatch)}
${header}
<div class="content">${getView()}</div>
</div>
`

View File

@@ -5,10 +5,13 @@ var hyperx = require('hyperx')
var hx = hyperx(h)
function Header (state, dispatch) {
var navLeftStyle = process.platform === 'darwin'
? {marginLeft: '78px'} /* OSX needs room on the left for min/max/close buttons */
: null /* On Windows and Linux, the header is separate & underneath the title bar */
return hx`
<div class="header">
${getTitle()}
<div class="nav left">
<div class="nav left" style=${navLeftStyle}>
<i class="icon back" onclick=${onBack}>chevron_left</i>
<i class="icon forward" onclick=${onForward}>chevron_right</i>
</div>

View File

@@ -27,11 +27,13 @@ function Player (state, dispatch) {
// Show the video as large as will fit in the window, play immediately
return hx`
<div class="player">
<video
src="${state.server.localURL}"
onloadedmetadata="${onLoadedMetadata}"
autoplay="true">
</video>
<div class="letterbox">
<video
src="${state.server.localURL}"
onloadedmetadata="${onLoadedMetadata}"
autoplay="true">
</video>
</div>
${renderPlayerControls(state, dispatch)}
</div>
`