jam-cloud/web/app/assets/javascripts/react-components/stores/ExternalVideoStore.js.coffee

22 lines
472 B
CoffeeScript

context = window
@ExternalVideoStore = Reflux.createStore(
{
listenables: ExternalVideoActions
state : null
init: () ->
this.listenTo(context.AppStore, this.onAppInit)
this.state = {
videoEnabled: false
}
onAppInit: (@app) ->
# on app init
onSetVideoEnabled: (enable) ->
console.log('ExternalVideoStore.onSetVideoEnabled', enable)
@state.videoEnabled = enable
this.trigger(this.state)
}
)