mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-04-26 03:12:12 +00:00
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>
24 lines
652 B
HTML
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>
|