-
Notifications
You must be signed in to change notification settings - Fork 0
/
player.html
83 lines (76 loc) · 2.9 KB
/
player.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<!DOCTYPE html>
<html>
<header>
<title>Webtor.io</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</header>
<head>
<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-N8JTXSKSBH"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'G-N8JTXSKSBH');
</script>
<meta name="google-site-verification" content="pgncQflxmc43gBy6rV6jj8lzBQtKYkZUFqAHAgSUvnI" />
</head>
<body>
<style>
.dimScreen
{
position:fixed;
padding:0;
margin:0;
top:0;
left:0;
width: 100%;
height: 100%;
background:rgba(255,255,255,0.5);
}
</style>
<div id="player" class="webtor dimScreen"></div>
<script>
const params = new URLSearchParams(window.location.search)
window.webtor = window.webtor || [];
window.webtor.push({
id: 'player',
magnet: params.get('magnet') != null ? params.get('magnet') : 'magnet:?xt=urn:btih:08ada5a7a6183aae1e09d831df6748d566095a10&dn=Sintel&tr=udp%3A%2F%2Fexplodie.org%3A6969&tr=udp%3A%2F%2Ftracker.coppersurfer.tk%3A6969&tr=udp%3A%2F%2Ftracker.empire-js.us%3A1337&tr=udp%3A%2F%2Ftracker.leechers-paradise.org%3A6969&tr=udp%3A%2F%2Ftracker.opentrackr.org%3A1337&tr=wss%3A%2F%2Ftracker.btorrent.xyz&tr=wss%3A%2F%2Ftracker.fastcast.nz&tr=wss%3A%2F%2Ftracker.openwebtorrent.com&ws=https%3A%2F%2Fwebtorrent.io%2Ftorrents%2F',
on: function(e) {
if (e.name == window.webtor.TORRENT_FETCHED) {
console.log('Torrent fetched!', e.data);
}
if (e.name == window.webtor.TORRENT_ERROR) {
console.log('Torrent error!');
}
},
// poster: 'https://via.placeholder.com/150/0000FF/808080',
width:"100%",
height:"100%",
// subtitles: [
// {
// srclang: 'en',
// label: 'test',
// src: 'https://raw.githubusercontent.com/andreyvit/subtitle-tools/master/sample.srt',
// default: true,
// }
// ],
lang: 'en',
i18n: {
en: {
common: {
"prepare to play": "Preparing Video Stream... Please Wait...",
},
stat: {
"seeding": "Seeding",
"waiting": "Client initialization",
"waiting for peers": "Waiting for peers",
"from": "from",
},
},
},
});
</script>
<script src="https://cdn.jsdelivr.net/npm/@webtor/embed-sdk-js/dist/index.min.js" charset="utf-8" async></script>
</body>
</html>