22

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

Aagman
  • 684
  • 6
  • 18

2 Answers2

2

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.
MGY
  • 7,245
  • 5
  • 41
  • 74
  • Is there some other Safari option that needs to be enabled in order for these to work? Following instructions, I'm not seeing any WebRTC logs (ex ICE candidates, etc). – logidelic Feb 15 '22 at 14:42
2

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

giavac
  • 988
  • 7
  • 22
  • In Safari 16.4, there is no `Console` tab under `Develop`, and no settings overall under the `Develop` menu either. – user93114 May 03 '23 at 07:19