Bug 244970 - Remote candidate address is not present in getStats output when the candidate type is host
Summary: Remote candidate address is not present in getStats output when the candidate...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 15
Hardware: Mac (Intel) macOS 12
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 244969 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-09-09 06:23 PDT by vinayak.kulkarni
Modified: 2022-09-16 06:24 PDT (History)
2 users (show)

See Also:


Attachments
Here the candidate type is "host" and address field is not seen (76.70 KB, image/png)
2022-09-09 06:24 PDT, vinayak.kulkarni
no flags Details
Here the candidate type is "relay" and address of the candidate is seen correctly. (78.80 KB, image/png)
2022-09-09 06:25 PDT, vinayak.kulkarni
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description vinayak.kulkarni 2022-09-09 06:23:28 PDT
Not seeing the address field in remote-candidate when the candidate type is "host". The same is working fine when the candidate type is "relay"

Below is the code snippet used to fetch the stats

var stats = await pc.getStats();
var selectedPair;
stats.forEach(function(stat) {
    if(stat.type === "transport") {
        selectedPair = stats.get(stat.selectedCandidatePairId);
    }
});
var localCandidate = stats.get(selectedPair.localCandidateId);
var remoteCandidate = stats.get(selectedPair.remoteCandidateId);

Please see the screenshot below
Comment 1 vinayak.kulkarni 2022-09-09 06:24:42 PDT
Created attachment 462227 [details]
Here the candidate type is "host" and address field is not seen
Comment 2 vinayak.kulkarni 2022-09-09 06:25:47 PDT
Created attachment 462228 [details]
Here the candidate type is "relay" and address of the candidate is seen correctly.
Comment 3 youenn fablet 2022-09-09 06:51:00 PDT
Yes, we are filtering all host local candidates since they might not always be known from the web page (in case IP addresses are replaced by mDNS).
With our mDNS libwebrtc integration, we might be able to expose this field if stats appropriately use the mDNS names when needed in stats.
Comment 4 vinayak.kulkarni 2022-09-09 10:36:55 PDT
Hi youenn,
Thanks for the info
Is there any work around that you would suggest to get this working for now?

Thanks,
Vinayak
Comment 5 Alexey Proskuryakov 2022-09-09 19:14:27 PDT
*** Bug 244969 has been marked as a duplicate of this bug. ***
Comment 6 Radar WebKit Bug Importer 2022-09-16 06:24:17 PDT
<rdar://problem/100024334>