Fix chromecast button
Next step: Chromecast and Airplay play/pause, scrub, and state management When casting, the correct cast button should be lit up and the video should be replaced with a title image and text
This commit is contained in:
@@ -64,7 +64,6 @@ function Player (state, dispatch) {
|
||||
function renderPlayerControls (state, dispatch) {
|
||||
var positionPercent = 100 * state.video.currentTime / state.video.duration
|
||||
var playbackCursorStyle = { left: 'calc(' + positionPercent + '% - 8px)' }
|
||||
var torrent = state.client.get(state.playing.infoHash)
|
||||
|
||||
var elements = [
|
||||
hx`
|
||||
@@ -88,7 +87,7 @@ function renderPlayerControls (state, dispatch) {
|
||||
if (state.devices.chromecast) {
|
||||
elements.push(hx`
|
||||
<i.icon.chromecast
|
||||
onclick=${() => dispatch('openChromecast', torrent)}>
|
||||
onclick=${() => dispatch('openChromecast')}>
|
||||
cast
|
||||
</i>
|
||||
`)
|
||||
@@ -96,7 +95,7 @@ function renderPlayerControls (state, dispatch) {
|
||||
if (state.devices.airplay) {
|
||||
elements.push(hx`
|
||||
<i.icon.airplay
|
||||
onclick=${() => dispatch('openAirplay', torrent)}>
|
||||
onclick=${() => dispatch('openAirplay')}>
|
||||
airplay
|
||||
</i>
|
||||
`)
|
||||
|
||||
@@ -54,7 +54,7 @@ function TorrentList (state, dispatch) {
|
||||
|
||||
// Show name, download status, % complete
|
||||
function renderTorrentMetadata (torrent, torrentSummary) {
|
||||
var name = torrentSummary.displayName || torrentSummary.name || 'Loading torrent...'
|
||||
var name = torrentSummary.name || 'Loading torrent...'
|
||||
var elements = [hx`
|
||||
<div class='name ellipsis'>${name}</div>
|
||||
`]
|
||||
|
||||
Reference in New Issue
Block a user