From 35462d690f79b61a24a66e1baf73203dd8172597 Mon Sep 17 00:00:00 2001 From: James Barnsley Date: Mon, 5 Feb 2018 17:04:31 +1300 Subject: [PATCH 1/3] Stream controls --- src/js/components/PlaybackControls.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/src/js/components/PlaybackControls.js b/src/js/components/PlaybackControls.js index c497a014..e9ac7f28 100755 --- a/src/js/components/PlaybackControls.js +++ b/src/js/components/PlaybackControls.js @@ -13,6 +13,7 @@ import Thumbnail from './Thumbnail' import Icon from './Icon' import * as uiActions from '../services/ui/actions' +import * as coreActions from '../services/core/actions' import * as mopidyActions from '../services/mopidy/actions' class PlaybackControls extends React.Component{ @@ -57,6 +58,18 @@ class PlaybackControls extends React.Component{ return button; } + renderStreamingButton(){ + var button = null; + if (this.props.http_streaming_enabled){ + if (this.props.http_streaming_active){ + button = this.props.coreActions.set({http_streaming_active: false})}>HTTP Streaming + } else { + button = this.props.coreActions.set({http_streaming_active: true})}>HTTP Streaming; + } + } + return button; + } + handleThumbnailClick(e){ e.preventDefault(); this.props.uiActions.openModal('kiosk_mode'); @@ -71,7 +84,7 @@ class PlaybackControls extends React.Component{ return (
- {this.props.http_streaming_enabled && this.props.play_state == 'playing' ?