mirror of
https://github.com/seigler/HLS-over-IPFS-video-player
synced 2025-07-27 01:36:14 +00:00
first version
This commit is contained in:
commit
f5e7c9abbf
17 changed files with 169594 additions and 0 deletions
70
index.html
Normal file
70
index.html
Normal file
|
@ -0,0 +1,70 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
|
||||
<title>HLS over IPFS video player</title>
|
||||
<link rel="icon" href="favicon.ico">
|
||||
<style>
|
||||
* { box-sizing: border-box; }
|
||||
html, body {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
body {
|
||||
height: 100vh;
|
||||
font-family: sans-serif;
|
||||
color: white;
|
||||
background-color: black;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
code {
|
||||
white-space: nowrap;
|
||||
}
|
||||
#status {
|
||||
font-size: 2em;
|
||||
text-align: center;
|
||||
transition: transform 0.3s 1s ease;
|
||||
position: fixed;
|
||||
bottom: 100%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 3ex;
|
||||
margin-bottom: -3ex;
|
||||
}
|
||||
.is-hiding {
|
||||
transform: translateY(-3ex)
|
||||
}
|
||||
#video {
|
||||
display: none;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
#help {
|
||||
max-width: 80ch;
|
||||
padding: 5em;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script type="module" defer="" src="./src/index.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<video id="video" controls="" autoplay=""></video>
|
||||
<div id="status"></div>
|
||||
<section id="help">
|
||||
<h1>HLS over IPFS video player</h1>
|
||||
<p>This is a tool for viewing videos encoded as <a href="https://github.com/ipfs-examples/js-ipfs-examples/tree/master/examples/browser-video-streaming">HLS</a>. The folder containing this playlist and all its files is uploaded to IPFS, and the hash is provided in the URL as a parameter.</p>
|
||||
<pre>?hash=QmYzdc44xBkVgp8aWJW57KprjDs5j2hmN8g7eDqm5pvY8L</pre>
|
||||
<p>It also accepts parameters for <code>source</code> filename (default is <code>master.m3u8</code>) and <code>title</code>.
|
||||
</p>
|
||||
<p>Given at least a valid hash, it should play a video in the browser using <a href="https://github.com/ipfs/js-ipfs">JS-IPFS</a> to connect directly to the IPFS network.</p>
|
||||
<noscript>
|
||||
<p><strong>Since your browser is not executing JavaScript, none of this will work.</strong></p>
|
||||
</noscript>
|
||||
</section>
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue