High-performance WebTorrent tracker.
WebTorrent tracker is a required component of WebTorrent and P2P Media Loader (peer-to-peer networks for web browsers) to do WebRTC signaling - exchanging connection data (i.e. SDP) between peers - joining them into swarms.
- wss://us-tracker1.peerhub.net
- wss://ca-tracker1.peerhub.net
- wss://uk-tracker1.peerhub.net
- wss://ge-tracker1.peerhub.net
<!DOCTYPE html>
<html lang="en">
<head>
<title>Clappr/Hls.js with P2P Media Loader</title>
<meta charset="utf-8">
<script src="https://cdn.jsdelivr.net/npm/p2p-media-loader-core@latest/build/p2p-media-loader-core.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/p2p-media-loader-hlsjs@latest/build/p2p-media-loader-hlsjs.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/clappr@latest"></script>
</head>
<body>
<div id="player"></div>
<script>
const config = {
loader: {
trackerAnnounce: ['wss://us-tracker1.peerhub.net'], // here config the tracker url
}
};
if (p2pml.hlsjs.Engine.isSupported()) {
var engine = new p2pml.hlsjs.Engine(config);
var player = new Clappr.Player({
parentId: "#player",
source: "https://hlsjs-test-streams-wistia.s3.amazonaws.com/start-delimiter.m3u8",
mute: true,
autoPlay: true,
playback: {
hlsjsConfig: {
liveSyncDurationCount: 7,
loader: engine.createLoaderClass({
})
}
}
});
p2pml.hlsjs.initClapprPlayer(player);
} else {
document.write("Not supported :(");
}
</script>
</body>
</html>