-
-
Notifications
You must be signed in to change notification settings - Fork 628
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add WebRTC peer connection transport stats * save all peer connections in tracker-client and make stats available when seeding * make offer ID keys into readable strings * handle unsupported Peer Conn stats on WASM
- Loading branch information
1 parent
5fe6c49
commit d112dd8
Showing
5 changed files
with
103 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
//go:build !js | ||
// +build !js | ||
|
||
package webtorrent | ||
|
||
import ( | ||
"github.com/pion/webrtc/v3" | ||
) | ||
|
||
func GetPeerConnStats(pc *wrappedPeerConnection) (stats webrtc.StatsReport) { | ||
if pc != nil { | ||
stats = pc.GetStats() | ||
} | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//go:build js && wasm | ||
// +build js,wasm | ||
|
||
package webtorrent | ||
|
||
import ( | ||
"github.com/pion/webrtc/v3" | ||
) | ||
|
||
// webrtc.PeerConnection.GetStats() is not currently supported for WASM. Return empty stats. | ||
func GetPeerConnStats(pc *wrappedPeerConnection) (stats webrtc.StatsReport) { | ||
return | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters