How to get WebRTC logs on Safari Browser
Asked Answered
M

3

23

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

Munsey answered 22/7, 2020 at 14:46 Comment(3)
I have the same question. We can see log of Android and iOS, but cannot in web.Escape
looking for the same logs, let us know I you find out somethingEstrone
Aagman please check my solution below.Enhance
M
3

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

Madge answered 7/4, 2022 at 15:58 Comment(1)
In Safari 16.4, there is no Console tab under Develop, and no settings overall under the Develop menu either.Bridgman
I
3

First, enable Safari > Settings > Advanced > Show Develop menu in menu bar as bellow:

Then, click Safari > Develop > Show JavaScript Console as bellow:

Next, click the Setting icon, select the Console tab, set the WebRTC Logging to Basic, as bellow:

Back to the JavaScript Console, there are WebRTC logs, as bellow:

Test on Safari 16.6

Isabellaisabelle answered 24/10, 2023 at 13:8 Comment(0)
E
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.
Enhance answered 14/12, 2021 at 15:56 Comment(1)
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).Ethel

© 2022 - 2025 — McMap. All rights reserved.