This repository was archived by the owner on Oct 25, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -77,20 +77,20 @@ export class ConferencePeerConnectionChannel extends EventDispatcher {
7777
7878 publish ( stream , options ) {
7979 if ( options === undefined ) {
80- options = { audio : ! ! stream . mediaStream . getAudioTracks ( ) , video : ! ! stream
81- . mediaStream . getVideoTracks ( ) } ;
80+ options = { audio : ! ! stream . mediaStream . getAudioTracks ( ) . length , video : ! ! stream
81+ . mediaStream . getVideoTracks ( ) . length } ;
8282 }
8383 if ( typeof options !== 'object' ) {
8484 return Promise . reject ( new TypeError ( 'Options should be an object.' ) ) ;
8585 }
8686 if ( options . audio === undefined ) {
87- options . audio = ! ! stream . mediaStream . getAudioTracks ( ) ;
87+ options . audio = ! ! stream . mediaStream . getAudioTracks ( ) . length ;
8888 }
8989 if ( options . video === undefined ) {
90- options . video = ! ! stream . mediaStream . getVideoTracks ( ) ;
90+ options . video = ! ! stream . mediaStream . getVideoTracks ( ) . length ;
9191 }
92- if ( ! ! options . audio === ! stream . mediaStream . getAudioTracks ( ) . length || ! !
93- options . video === ! stream . mediaStream . getVideoTracks ( ) . length ) {
92+ if ( ( ! ! options . audio && ! stream . mediaStream . getAudioTracks ( ) . length ) ||
93+ ( ! ! options . video && ! stream . mediaStream . getVideoTracks ( ) . length ) ) {
9494 return Promise . reject ( new ConferenceError (
9595 'options.audio/video is inconsistent with tracks presented in the ' +
9696 'MediaStream.'
You can’t perform that action at this time.
0 commit comments