How to get WebRTC logs on Safari Browser

Viewed 3106

I have been trying to get the webrtc logs for my web application running over safari browser, similar to what we get in firefox by going to the page about:webrtc and on chrome by using chrome://webrtc-internals.

Alternatively, Is there any js API for webrtc to get the logs on the console itself, similar to what we use in Native Android and iOS applications using the RTCLogger.

Thanks in Advance

2 Answers

Solution

If you open the Safari and also open the console application, you can filter WebRTC logs with these filters:

  • category:WebRTC
  • process:safari (optional)

just copy-paste them one by one to the search bar in the console application. Actually, the second one is optional (process:safari).

I'm not sure about the others but at least you can see:

  • SDP offers and answers
  • ICE candidates
  • WebRTC statistics
  • incoming and outgoing video frame counters

Fun Fact

Based on the official documentation of WebRTC you can't see logs on Safari :)

Useful Infos

  • Do you know there is a WebRTC menu in the Safari. Check the Develop > WebRTC sub-menu
  • Check the Safari Technology Preview app for more options and flags
  • If you’re not logged in as an administrator, you need to enter an administrator name and password to search for and view log messages.

On Safari Version 15.4 (17613.1.17.1.13), useful information can be retrieved this way:

  • In Preferences... -> Advanced, ensure Show Develop menu in menu bar is enabled.
  • In the Develop menu Settings, select the Console tab, then ensure WebRTC Logging is not Off (and so choose either Basic or Verbose).

At that point the Console will show WebRTC events and data structures.

e.g.:

enter image description here

Related