diff --git a/web/app/assets/javascripts/react-components/MediaControls.js.jsx.coffee b/web/app/assets/javascripts/react-components/MediaControls.js.jsx.coffee index 5a2106c81..34899a6cf 100644 --- a/web/app/assets/javascripts/react-components/MediaControls.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/MediaControls.js.jsx.coffee @@ -8,7 +8,11 @@ mixins = [] # this check ensures we attempt to listen if this component is created in a popup reactContext = if window.opener? then window.opener else window # make sure this is actually us opening the window, not someone else (by checking for MixerStore) -reactContext = window unless 'MixerStore' in reactContext +if window.opener? + try + m = window.opener.MixerStore + catch e + reactContext = window MixerStore = reactContext.MixerStore MixerActions = reactContext.MixerActions diff --git a/web/app/assets/javascripts/react-components/PopupMediaControls.js.jsx.coffee b/web/app/assets/javascripts/react-components/PopupMediaControls.js.jsx.coffee index cada895b8..37673bf87 100644 --- a/web/app/assets/javascripts/react-components/PopupMediaControls.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/PopupMediaControls.js.jsx.coffee @@ -6,7 +6,15 @@ mixins = [] # make sure this is actually us opening the window, not someone else (by checking for MixerStore) -if window.opener? && ('MixerStore' in window.opener) +accessOpener = false +if window.opener? + try + m = window.opener.MixerStore + accessOpener = true + catch e + + +if accessOpener SessionActions = window.opener.SessionActions MediaPlaybackStore = window.opener.MediaPlaybackStore MixerActions = window.opener.MixerActions diff --git a/web/app/assets/javascripts/react-components/PopupRecordingStartStop.js.jsx.coffee b/web/app/assets/javascripts/react-components/PopupRecordingStartStop.js.jsx.coffee index a57836e76..d13f69dc6 100644 --- a/web/app/assets/javascripts/react-components/PopupRecordingStartStop.js.jsx.coffee +++ b/web/app/assets/javascripts/react-components/PopupRecordingStartStop.js.jsx.coffee @@ -3,7 +3,16 @@ context = window mixins = [] # make sure this is actually us opening the window, not someone else (by checking for MixerStore) -if window.opener && ('MixerStore' in window.opener) + +accessOpener = false +if window.opener? + try + m = window.opener.MixerStore + accessOpener = true + catch e + + +if accessOpener mixins.push(Reflux.listenTo(window.opener.RecordingStore,"onRecordingStateChanged")) @PopupRecordingStartStop = React.createClass({