diff options
Diffstat (limited to 'app/client/modules/biggan')
| -rw-r--r-- | app/client/modules/biggan/views/biggan.live.js | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/app/client/modules/biggan/views/biggan.live.js b/app/client/modules/biggan/views/biggan.live.js index b6316a8..a1e99a1 100644 --- a/app/client/modules/biggan/views/biggan.live.js +++ b/app/client/modules/biggan/views/biggan.live.js @@ -32,6 +32,12 @@ class BigGANLive extends Component { interrupt(){ this.props.actions.queue.stop_task('gpu') } + play() { + this.props.actions.live.send_command('play', '') + } + pause() { + this.props.actions.live.send_command('pause', '') + } stop() { this.props.actions.live.send_command('stop', '') } @@ -160,7 +166,7 @@ class BigGANLive extends Component { } renderRestartButton(){ // console.log(this.props.runner.gpu) - const { i18n } = this.props + const { i18n, opt } = this.props if (this.props.runner.gpu.status === 'IDLE') { return ( <Button @@ -197,6 +203,10 @@ class BigGANLive extends Component { title={i18n.gpu.busy} onClick={() => this.stop()} >{i18n.gpu.stop}</Button> + <Button + title={opt.paused ? 'Paused' : 'Playing'} + onClick={() => { opt.paused ? this.play() : this.pause()}} + >{opt.paused ? 'Play' : 'Play'}</Button> </div> ) } |
