forked from bittorrenttorque/onehash.com
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
204 lines (189 loc) · 9.81 KB
/
index.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>oneHash</title>
<!-- collection of general dependencies -->
<script type="text/javascript" src="javascripts/lib/jquery.js"></script>
<script type="text/javascript" src="javascripts/lib/json2.js"></script>
<script type="text/javascript" src="javascripts/lib/underscore.js"></script>
<script type="text/javascript" src="javascripts/lib/backbone.js"></script>
<script type="text/javascript" src="javascripts/lib/humane.js"></script>
<!-- bittorrenttorque/backbrace submodule -->
<script type="text/javascript" src="javascripts/backbrace/backbrace.js"></script>
<!-- bittorrenttorque/jStorage submodule -->
<script type="text/javascript" src="javascripts/jStorage/jstorage.min.js"></script>
<!-- bittorrenttorque/btapp submodule -->
<script type="text/javascript" src="javascripts/btapp/plugin.btapp.js"></script>
<script type="text/javascript" src="javascripts/btapp/pairing.btapp.js"></script>
<script type="text/javascript" src="javascripts/btapp/client.btapp.js"></script>
<script type="text/javascript" src="javascripts/btapp/btapp.js"></script>
<!-- lipka/piecon submodule -->
<script type="text/javascript" src="javascripts/piecon/piecon.min.js"></script>
<!-- audio support -->
<link rel="stylesheet" href="audio-js/audio-js.css" type="text/css" media="all" title="Audio JS" charset="utf-8">
<link rel="stylesheet" href="audio-js/skins/hu.css" type="text/css" media="all" title="Audio JS" charset="utf-8">
<link rel="stylesheet" href="audio-js/skins/tube.css" type="text/css" media="all" title="Audio JS" charset="utf-8">
<link rel="stylesheet" href="audio-js/skins/vim.css" type="text/css" media="all" title="Audio JS" charset="utf-8">
<script src="audio-js/audio.js" type="text/javascript" charset="utf-8"></script>
<!-- video support -->
<link href="video-js/video-js.css" rel="stylesheet">
<script src="video-js/video.js"></script>
<script type="text/javascript" src="javascripts/application.js"></script>
<link rel="stylesheet" type="text/css" href="stylesheets/bootstrap.min.css" />
<link rel="stylesheet" type="text/css" href="stylesheets/application.css" />
<link rel="stylesheet" type="text/css" href="stylesheets/font-awesome.css" />
<link rel="stylesheet" type="text/css" href="stylesheets/fredericka.css" />
<link rel="icon"
type="image/png"
href="images/favicon.png">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-33355465-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<!-- templates -->
<script type="text/template", id="status_template">
<span><%= product %> ( <%= status %> ) </span>
</script>
<script type="text/template" id="torrent_download_template">
<h3>
.torrent info
<a href="" class="icon-folder-open"></a>
<a href="" class="icon-remove"></a>
</h3>
<h6><%= hash %></h6>
<div class="torrent prog"><%= progress %></div>
<div>
<i class="icon-arrow-down"></i> <span class="download_speed"><%= download_speed %></span>
<i class="icon-arrow-up"></i> <span class="upload_speed"><%= upload_speed %></span>
</div>
<div class="swarm">Swarm: <%= peers %> Peers / <%= seeds %> Seeds</div>
<div class="eta"><%= eta %></div>
<div class="ratio">UL/DL Ratio: <%= ratio %></div>
<div class="files">
<% for(var i = 0; i < files.length; i++) { %>
<div class="file progress">
<div class="bar" style="width: <%= files[i].progress %>%;"></div>
<div class="text"><%= files[i].downloaded %> / <%= files[i].size %></div>
</div>
<% } %>
</div>
</script>
<script type="text/template" id="torrent_template">
<div class="torrent_container">
<h2 class="torrent_name"><%= name %></h2>
<!-- AddThis Button BEGIN -->
<div class="addthis_toolbox addthis_default_style addthis_32x32_style">
<a class="addthis_button_facebook"></a>
<a class="addthis_button_twitter"></a>
<a class="addthis_button_google_plusone_share"></a>
<a class="addthis_button_wordpress"></a>
<a class="addthis_button_stumbleupon"></a>
<a class="addthis_button_gmail"></a>
</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=ra-500c6a7e7218f282"></script>
<!-- AddThis Button END -->
</div>
</script>
<script type="text/template" id="error_template">
<div class="error_container">
<p>Bummer: <%= error %> ... Streaming while the torrent downloads is still a work in progress. Waiting for the contents to complete downloading, then refreshing the page may allow you to play the file successfully.</p>
<p class="file_info"><%= name %></p>
</div>
</script>
<script type="text/template" id="video_template">
<div class="video_container">
<video id="<%= id %>" class="video-js vjs-default-skin" controls
preload="auto" width="auto" height="500"
data-setup="{}">
</video>
<p class="file_info"><%= name %></p>
</div>
</script>
<script type="text/template" id="audio_template">
<div class="audio-js-box vim-css">
<audio class="audio-js" controls preload>
<source src="<%= url %>">
</audio>
<p class="file_info"><%= name %></p>
</div>
</script>
<script type="text/template" id="input_template">
<form class="form-inline">
<span class="logo">- 1# -</span><br>
<input type="text" class="input-xlarge" placeholder="torrent url /magnet link / info hash">
<button type="submit" class="btn">Stream</button>
<!--
<span>/</span>
<button class="btn" id="create">Create Torrent</button>
-->
</form>
<div id="content">
<p>or check out our featured oneHash pages.</p>
# <a href="#http://featuredcontent.utorrent.com/torrents/CountingCrows-BitTorrent.torrent">Counting Crows</a>
# <a href="#http://vodo.net/assets/torrents/The.Yes.Men.Fix.The.World.P2P.Edition.2010.Xvid-VODO.torrent">The Yes Men</a>
# <a href="#http://archive.org/download/johnmayer2008-08-02.DPA4023.flac16/johnmayer2008-08-02.DPA4023.flac16_archive.torrent">John Mayer Live</a>
# <a href="#http://archive.org/download/jj2008-06-14.mk4/jj2008-06-14.mk4_archive.torrent">Jack Johnson Live</a>
# <a href="#http://vodo.net/media/torrents/An.Honest.Man.720p.x264-VODO.torrent">An Honest Man</a>
# <a href="#http://vo.do/media/torrents/Pioneer.One.SEASON1.720p.x264-VODO.torrent">Pioneer Season 1</a>
# <a href="#http://apps.bittorrent.com/torrents/PrettyLights-Bittorrent.torrent">Pretty Lights</a>
</div>
</script>
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a href="" class="onehash">oneHash</a>
<span class="toolbox"></span>
</div>
</div>
</div>
<script type="text/template" id="input_container_template">
</script>
<script type="text/template" id="media_container_template">
<div class="media container_background collapsed">
<span href="" class="icon"></span>
<div class="shadow"></div>
<div class="media container">
<div class="media_header"></div>
<div class="media"></div>
</div>
</div>
<div class="stats container_background collapsed">
<a href="" class="icon"></a>
<div class="shadow"></div>
<div class="stats container">
<div class="wrapper">
</div>
</div>
</div>
<div class="code container_background collapsed">
<a class="fork" href="https://github.com/bittorrenttorque/onehash.com"><img style="position: absolute; top: 0; right: 0; border: 0;" src="images/fork.png" alt="Fork me on GitHub"></a>
<a href="" class="icon"></a>
<div class="shadow"></div>
<div class="code container">
<div class="wrapper">
var btapp = new Btapp;<br>
btapp.connect();<br>
<br>
btapp.live('torrent * file * properties streaming_url', function(url, file_props, file) {<br>
//create an html5 video/audio tag and play!<br>
});<br>
<br>
//lets add some content that will get detected by the code above.<br>
btapp.on('add', function(add) {<br>
add.torrent('http://apps.bittorrent.com/torrents/PrettyLights-Bittorrent.torrent');<br>
});<br>
</div>
</div>
</div>
</script>
</body>
</html>