mirror of
				https://github.com/vector-im/element-web.git
				synced 2025-10-31 00:01:23 +01:00 
			
		
		
		
	Derive mute state from props
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
		
							parent
							
								
									0c55a6c5bf
								
							
						
					
					
						commit
						ed148de567
					
				| @ -73,6 +73,13 @@ export default class VideoFeed extends React.Component<IProps, IState> { | |||||||
|         this.updateFeed(prevProps.feed, this.props.feed); |         this.updateFeed(prevProps.feed, this.props.feed); | ||||||
|     } |     } | ||||||
| 
 | 
 | ||||||
|  |     static getDerivedStateFromProps(props: IProps) { | ||||||
|  |         return { | ||||||
|  |             audioMuted: props.feed.isAudioMuted(), | ||||||
|  |             videoMuted: props.feed.isVideoMuted(), | ||||||
|  |         }; | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|     private updateFeed(oldFeed: CallFeed, newFeed: CallFeed) { |     private updateFeed(oldFeed: CallFeed, newFeed: CallFeed) { | ||||||
|         if (oldFeed === newFeed) return; |         if (oldFeed === newFeed) return; | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user