File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -175,6 +175,10 @@ dis.register(function(payload) {
175175 }
176176 calls [ payload . room_id ] . answer ( ) ;
177177 _setCallState ( calls [ payload . room_id ] , payload . room_id , "connected" ) ;
178+ dis . dispatch ( {
179+ action : "view_room" ,
180+ room_id : payload . room_id
181+ } ) ;
178182 break ;
179183 }
180184} ) ;
Original file line number Diff line number Diff line change @@ -30,7 +30,6 @@ var KeyCode = {
3030
3131module . exports = {
3232 componentWillMount : function ( ) {
33- this . dispatcherRef = dis . register ( this . onAction ) ;
3433 this . tabStruct = {
3534 completing : false ,
3635 original : null ,
@@ -126,6 +125,7 @@ module.exports = {
126125 } ,
127126
128127 componentDidMount : function ( ) {
128+ this . dispatcherRef = dis . register ( this . onAction ) ;
129129 this . sentHistory . init (
130130 this . refs . textarea . getDOMNode ( ) ,
131131 this . props . room . roomId
Original file line number Diff line number Diff line change @@ -30,9 +30,9 @@ module.exports = {
3030
3131 componentDidMount : function ( ) {
3232 this . dispatcherRef = dis . register ( this . onAction ) ;
33- this . setState ( {
34- call : null
35- } ) ;
33+ if ( this . props . room ) {
34+ this . showCall ( this . props . room . roomId ) ;
35+ }
3636 } ,
3737
3838 componentWillUnmount : function ( ) {
@@ -48,8 +48,12 @@ module.exports = {
4848 if ( payload . action !== 'call_state' ) {
4949 return ;
5050 }
51- var call = CallHandler . getCall ( payload . room_id ) ;
52- if ( call && call . type === "video" ) {
51+ this . showCall ( payload . room_id ) ;
52+ } ,
53+
54+ showCall : function ( roomId ) {
55+ var call = CallHandler . getCall ( roomId ) ;
56+ if ( call && call . type === "video" && call . state !== 'ended' ) {
5357 this . getVideoView ( ) . getLocalVideoElement ( ) . style . display = "initial" ;
5458 this . getVideoView ( ) . getRemoteVideoElement ( ) . style . display = "initial" ;
5559 call . setLocalVideoElement ( this . getVideoView ( ) . getLocalVideoElement ( ) ) ;
You can’t perform that action at this time.
0 commit comments