* VRFS-2818 - control both master/personal mix for volume/mute controls of media tracks
This commit is contained in:
parent
95ec9ce66e
commit
b2fca8cc0b
|
|
@ -21,7 +21,7 @@ MixerActions = @MixerActions
|
|||
|
||||
muting = $(e.currentTarget).is('.enabled')
|
||||
|
||||
MixerActions.mute([mixer], muting)
|
||||
MixerActions.mute([@props.mixers['master'].mixer, @props.mixers['personal'].mixer], muting)
|
||||
|
||||
render: () ->
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ MixerActions = @MixerActions
|
|||
|
||||
muting = $(e.currentTarget).is('.enabled')
|
||||
|
||||
MixerActions.mute([mixer], muting)
|
||||
MixerActions.mute([@props.mixers['master'].mixer, @props.mixers['personal'].mixer], muting)
|
||||
|
||||
render: () ->
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ MixerActions = @MixerActions
|
|||
|
||||
muting = $(e.currentTarget).is('.enabled')
|
||||
|
||||
MixerActions.mute([this.props.mixers.mixer], muting)
|
||||
MixerActions.mute([this.props.mixers.mixer, this.props.mixers.oppositeMixer], muting)
|
||||
|
||||
render: () ->
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ MixerActions = @MixerActions
|
|||
|
||||
muting = $(e.currentTarget).is('.enabled')
|
||||
|
||||
MixerActions.mute([this.props.mixers.mixer], muting)
|
||||
MixerActions.mute([this.props.mixers.mixer, this.props.mixers.oppositeMixer], muting)
|
||||
|
||||
render: () ->
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
context = window
|
||||
logger = context.JK.logger
|
||||
ChannelGroupIds = context.JK.ChannelGroupIds
|
||||
CategoryGroupIds = context.JK.CategoryGroupIds
|
||||
|
||||
@SessionTrackGain = React.createClass({
|
||||
|
|
@ -19,7 +20,11 @@ CategoryGroupIds = context.JK.CategoryGroupIds
|
|||
groupId = $target.data('groupId')
|
||||
mixers = @state.mixers.mixer
|
||||
|
||||
MixerActions.faderChanged(data, mixers, @props.gainType)
|
||||
# if this is a media track, jam track , or media category, affect volume of both mixer and opposing mixer
|
||||
if @state.mixers.mixer.group_id == ChannelGroupIds.MediaTrackGroup || @state.mixers.mixer.group_id == ChannelGroupIds.JamTrackGroup || ((@state.mixers.mixer.group_id == ChannelGroupIds.MonitorCatGroup || @state.mixers.mixer.group_id == ChannelGroupIds.MasterCatGroup) && @state.mixers.mixer.name == CategoryGroupIds.MediaTrack)
|
||||
MixerActions.faderChanged(data, [@state.mixers.mixer, @state.mixers.oppositeMixer], @props.gainType)
|
||||
else
|
||||
MixerActions.faderChanged(data, mixers, @props.gainType)
|
||||
|
||||
render: () ->
|
||||
# mixer can be a single item or array
|
||||
|
|
|
|||
|
|
@ -34,7 +34,8 @@ ptrCount = 0
|
|||
|
||||
muting = $(e.currentTarget).is('.enabled')
|
||||
|
||||
if @state.mixers.mixer.group_id == ChannelGroupIds.AudioInputMusicGroup || @state.mixers.mixer.group_id == ChannelGroupIds.AudioInputChatGroup
|
||||
# if it's a chat, my input, or media track, or jam track, or media track group, then do both mixers at the same time
|
||||
if @state.mixers.mixer.group_id == ChannelGroupIds.AudioInputMusicGroup || @state.mixers.mixer.group_id == ChannelGroupIds.AudioInputChatGroup || @state.mixers.mixer.group_id == ChannelGroupIds.MediaTrackGroup || @state.mixers.mixer.group_id == ChannelGroupIds.JamTrackGroup || ((@state.mixers.mixer.group_id == ChannelGroupIds.MonitorCatGroup || @state.mixers.mixer.group_id == ChannelGroupIds.MasterCatGroup) && @state.mixers.mixer.name == CategoryGroupIds.MediaTrack)
|
||||
MixerActions.mute([this.state.mixers.mixer, this.state.mixers.oppositeMixer], muting)
|
||||
else
|
||||
MixerActions.mute(this.state.mixers.mixer, muting)
|
||||
|
|
@ -46,7 +47,8 @@ ptrCount = 0
|
|||
|
||||
muting = $(e.target).is(':checked')
|
||||
|
||||
if @state.mixers.mixer.group_id == ChannelGroupIds.AudioInputMusicGroup || @state.mixers.mixer.group_id == ChannelGroupIds.AudioInputChatGroup
|
||||
# if it's a chat, my input, or media track, or jam track, or media track group, then do both mixers at the same time
|
||||
if @state.mixers.mixer.group_id == ChannelGroupIds.AudioInputMusicGroup || @state.mixers.mixer.group_id == ChannelGroupIds.AudioInputChatGroup || @state.mixers.mixer.group_id == ChannelGroupIds.MediaTrackGroup || @state.mixers.mixer.group_id == ChannelGroupIds.JamTrackGroup || ((@state.mixers.mixer.group_id == ChannelGroupIds.MonitorCatGroup || @state.mixers.mixer.group_id == ChannelGroupIds.MasterCatGroup) && @state.mixers.mixer.name == CategoryGroupIds.MediaTrack)
|
||||
MixerActions.mute([this.state.mixers.mixer, this.state.mixers.oppositeMixer], muting)
|
||||
else
|
||||
MixerActions.mute(this.state.mixers.mixer, muting)
|
||||
|
|
|
|||
|
|
@ -912,18 +912,26 @@ MIX_MODES = context.JK.MIX_MODES;
|
|||
|
||||
getGroupMixer: (categoryId, mode) ->
|
||||
groupId = if mode == MIX_MODES.MASTER then ChannelGroupIds.MasterCatGroup else ChannelGroupIds.MonitorCatGroup
|
||||
oppositeGroupId = if !mode == MIX_MODES.MASTER then ChannelGroupIds.MasterCatGroup else ChannelGroupIds.MonitorCatGroup
|
||||
mixers = @mixersForGroupId(groupId, mode)
|
||||
oppositeMixers = @mixersForGroupId(oppositeGroupId, !mode)
|
||||
|
||||
if mixers.length == 0
|
||||
#logger.warn("could not find mixer with group ID: " + groupId + ', mode:' + mode)
|
||||
return null
|
||||
|
||||
found = null
|
||||
oppositeFound = null
|
||||
for mixer in mixers
|
||||
if mixer.name == categoryId
|
||||
found = mixer
|
||||
break
|
||||
|
||||
for mixer in oppositeMixers
|
||||
if mixer.name == categoryId
|
||||
oppositeFound = mixer
|
||||
break
|
||||
|
||||
unless found?
|
||||
logger.warn("could not find mixer with categoryId: " + categoryId)
|
||||
return null
|
||||
|
|
@ -932,7 +940,7 @@ MIX_MODES = context.JK.MIX_MODES;
|
|||
mixer: found,
|
||||
muteMixer : found,
|
||||
vuMixer: found,
|
||||
oppositeMixer: found
|
||||
oppositeMixer: oppositeFound
|
||||
}
|
||||
|
||||
prepareSimulatedMixers: () ->
|
||||
|
|
|
|||
|
|
@ -11,7 +11,11 @@ MIX_MODES = context.JK.MIX_MODES
|
|||
|
||||
mixers: () ->
|
||||
if @props.mode == MIX_MODES.MASTER
|
||||
@props.mixers['master']
|
||||
masterMixers = @props.mixers['master']
|
||||
masterMixers.oppositeMixer = @props.mixers['personal']?.mixer
|
||||
masterMixers
|
||||
else
|
||||
@props.mixers['personal']
|
||||
personalMixers = @props.mixers['personal']
|
||||
personalMixers.oppositeMixer = @props.mixers['master']?.mixer
|
||||
personalMixers
|
||||
}
|
||||
Loading…
Reference in New Issue