fix #17 - autoresize window on play

function references in hyperx need to look like:

```
onloadedmetadata=${onLoadedMetadata}
```

and not:

```
onloadedmetadata="${onLoadedMetadata}"
```

also removed some unnecessary `torrent.ready` checks in the player.
This commit is contained in:
Nate Goldman
2016-03-05 09:24:29 -08:00
parent e4f2716d06
commit 82732aae11

View File

@@ -30,7 +30,7 @@ function Player (state, dispatch) {
<div class="letterbox"> <div class="letterbox">
<video <video
src="${state.server.localURL}" src="${state.server.localURL}"
onloadedmetadata="${onLoadedMetadata}" onloadedmetadata=${onLoadedMetadata}
autoplay="true"> autoplay="true">
</video> </video>
</div> </div>
@@ -79,7 +79,6 @@ function renderPlayerControls (state, dispatch) {
if (state.view.devices.chromecast) { if (state.view.devices.chromecast) {
elements.push(hx` elements.push(hx`
<i.icon.chromecast <i.icon.chromecast
class="${!torrent.ready ? 'disabled' : ''}"
onclick=${() => dispatch('openChromecast', torrent)}> onclick=${() => dispatch('openChromecast', torrent)}>
cast cast
</i> </i>
@@ -88,7 +87,6 @@ function renderPlayerControls (state, dispatch) {
if (state.view.devices.airplay) { if (state.view.devices.airplay) {
elements.push(hx` elements.push(hx`
<i.icon.airplay <i.icon.airplay
class="${!torrent.ready ? 'disabled' : ''}"
onclick=${() => dispatch('openAirplay', torrent)}> onclick=${() => dispatch('openAirplay', torrent)}>
airplay airplay
</i> </i>
@@ -96,7 +94,7 @@ function renderPlayerControls (state, dispatch) {
} }
// On OSX, the back button is in the title bar of the window; see app.js // On OSX, the back button is in the title bar of the window; see app.js
// On other platforms, we render one over the video on mouseover // On other platforms, we render one over the video on mouseover
if(process.platform !== 'darwin') { if (process.platform !== 'darwin') {
elements.push(hx` elements.push(hx`
<i.icon.back <i.icon.back
onclick=${() => dispatch('back')}> onclick=${() => dispatch('back')}>