This repository was archived by the owner on Oct 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Expand file tree Collapse file tree 1 file changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -1893,14 +1893,22 @@ var Conference = function (rpcClient, selfRpcId) {
1893
1893
if ( ( room_id === roomId ) && roomController ) {
1894
1894
if ( typeof target . view === 'string' ) {
1895
1895
const view = target . view ;
1896
+ const input = streams [ activeInputStream ] ?
1897
+ activeInputStream : trackOwners [ activeInputStream ] ;
1896
1898
room_config . views . forEach ( ( viewSettings ) => {
1897
1899
if ( viewSettings . label === view && viewSettings . video . keepActiveInputPrimary ) {
1898
- roomController . setPrimary ( activeInputStream , view ) ;
1900
+ if ( streams [ input ] . info . type === "webrtc" ) {
1901
+ const videoTrackIds = streams [ input ] . media . tracks . filter ( t => t . type === 'video' ) . map ( t => t . id ) ;
1902
+ videoTrackIds . forEach ( id => {
1903
+ roomController . setPrimary ( id , view ) ;
1904
+ } ) ;
1905
+ } else {
1906
+ roomController . setPrimary ( activeInputStream , view ) ;
1907
+ }
1908
+
1899
1909
}
1900
1910
} ) ;
1901
1911
1902
- const input = streams [ activeInputStream ] ?
1903
- activeInputStream : trackOwners [ activeInputStream ] ;
1904
1912
const mixedId = roomController . getMixedStream ( view ) ;
1905
1913
if ( streams [ mixedId ] instanceof MixedStream ) {
1906
1914
if ( streams [ mixedId ] . info . activeInput !== input ) {
You can’t perform that action at this time.
0 commit comments