pick Primary Content
fun pickPrimaryContent(local: ResolvedContent?, remotes: List<ResolvedContent>, remoteContentOrder: List<String>, independentContentEnabled: Boolean): ResolvedContent?
Pick the primary content owner among local + multiple simultaneous remote sharers.
INDEPENDENT mode (
independentContentEnabled == true): design "Multiple Sharers" — the most-recently-received active REMOTE content is primary; local content is primary only when no remote content is active. This is an explicitly local heuristic — there is no server-stamped ordering.FLAG-OFF / LEGACY mode: preserve the legacy CallScreen order, which chose LOCAL content FIRST (
hasLocalContentbeforeremoteContentCid), then the remote content. The most-recently-active remote-first heuristic is an independent-mode feature and must NOT change the byte-identical legacy layout in multi-party calls where local is sharing and a remotecontent_stateis also active.