 ###
 getOrderedVideoParticipants = (state) ->
 
-  actives = state.videoParticipants
-
-  # connectedParticipants has already have the active participant ids.
-  # that's why we are diff'ing to get actives b
-  connecteds = _.difference state.connectedParticipants, state.videoParticipants
-
-  # all the diffing and other stuff is for showing video active
-  # participants first and not publishing but connected people after those.
-  filterList = actives.concat connecteds
-
-
+  participants = state.videoParticipants
+  { PARTICIPANT_STATUS_PUBLISHING } = videoConstants
+
+  # _.partition returns 2 arrays from 1. First array will be result of given
+  # predicate function, 2nd array will be the remaining elements of original
+  # array.
+  [publishings, nonpublishings] = _.partition participants, (p) ->
+    p.status is PARTICIPANT_STATUS_PUBLISHING
+
+  filterList = publishings.concat nonpublishings
+
+

_                        = require 'lodash'
ChannelParticipantsModel = require './channelparticipants'

module.exports = class CollaborationChannelParticipantsModel extends ChannelParticipantsModel

  defaultState:
    videoActive           : no
    selectedParticipant   : null
    talkingParticipants   : []
    videoParticipants     : []
    connectedParticipants : []

  constructor: (options = {}, data) ->




###*
 * Orders given state's video participants in a way that publishing users
 * come first.
 *
 * @param {object} state
