context = window MixerActions = @MixerActions @SessionOtherTrack = React.createClass({ handleMute: (e) -> e.preventDefault() unless this.props.hasMixer logger.debug("ignoring mute; no mixer") return muting = $(e.currentTarget).is('.enabled') mixers = if this.props.tracks.length > 0 then this.props.tracks[0].mixers else {} MixerActions.mute([mixers.mixer], muting) render: () -> # today, all mixers are the same for a remote participant; so just grab the 1st mixers = if this.props.tracks.length > 0 then this.props.tracks[0].mixers else {} muteMixer = mixers.muteMixer vuMixer = mixers.vuMixer muteMixerId = muteMixer?.id classes = classNames({ 'track-icon-mute': true 'enabled' : !muteMixer?.mute 'muted' : muteMixer?.mute }) componentClasses = classNames({ "session-track" : true "my-track" : true "has-mixer" : this.props.hasMixer "no-mixer" : !this.props.hasMixer "has-audio" : this.props.noAudio != true "no-audio" : this.props.noAudio == true }) pan = if mixers.mixer? then mixers.mixer?.pan else 0 panStyle = { transform: "rotate(#{pan}deg)" WebkitTransform: "rotate(#{pan}deg)" } `