Doug A f5e644da8f
feat(webrtc): add WebRTC for WASM environments
This PR implements `Transport` for WebRTC for browsers by using web-sys. Only the `webrtc-direct` spec is implemented. The `webrtc` spec for connecting two browsers with each other is left to a future PR.

Related: https://github.com/libp2p/specs/issues/475.
Related #2617.
Supersedes: #4229.

Pull-Request: #4248.

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2023-09-17 19:13:11 +00:00

24 lines
652 B
HTML

<html>
<head>
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<link
rel="icon"
href="https://docs.libp2p.io/logos/libp2p_color_symbol.svg"
sizes="any"
/>
</head>
<body>
<div id="wrapper">
<h1>Rust Libp2p Demo!</h1>
</div>
<script type="module" defer>
import init, { run } from "./browser_webrtc_example.js"
await init();
run("__LIBP2P_ENDPOINT__"); // This placeholder will be replaced by the server at runtime with the actual listening address.
</script>
</body>
</html>