Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Add logging to diagnose no-video bug (#7721)
Browse files Browse the repository at this point in the history
Log in/outbound RTP stats so we can see ifn we're sending & receiving
video, and log when we successfully play the video element.
  • Loading branch information
dbkr authored Feb 4, 2022
1 parent ddb15cb commit 3f789d3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/CallHandler.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,16 @@ export default class CallHandler extends EventEmitter {
`bytes received: ${pair.bytesReceived}, bytes sent: ${pair.bytesSent}, `,
);
}

logger.debug("Outbound RTP:");
for (const s of stats.filter(item => item.type === 'outbound-rtp')) {
logger.debug(s);
}

logger.debug("Inbound RTP:");
for (const s of stats.filter(item => item.type === 'inbound-rtp')) {
logger.debug(s);
}
}

private setCallState(call: MatrixCall, status: CallState): void {
Expand Down
1 change: 1 addition & 0 deletions src/components/views/voip/VideoFeed.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ export default class VideoFeed extends React.PureComponent<IProps, IState> {
// them with another load() which will cancel the pending one, but since we don't call
// load() explicitly, it shouldn't be a problem. - Dave
await element.play();
logger.debug((this.props.feed.isLocal ? "Local" : "Remote") + " video feed play() completed");
} catch (e) {
logger.info("Failed to play media element with feed", this.props.feed, e);
}
Expand Down

0 comments on commit 3f789d3

Please sign in to comment.