mirror of
https://github.com/mehotkhan/BandersnatchInteractive.git
synced 2025-07-27 17:23:22 +00:00
add english subtitle
This commit is contained in:
parent
203b6dabd7
commit
4768ffc21a
4 changed files with 15256 additions and 17 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
@ -1,2 +1 @@
|
|||
Black.Mirror.Bandersnatch.2018.720p.WEB-DL.x264.DUAL.mkv
|
||||
Black.Mirror.Bandersnatch.2018.WEBRip.x264-NoGRP.srt
|
||||
Black.Mirror.Bandersnatch.2018.720p.WEB-DL.x264.DUAL.mkv
|
15237
Black.Mirror.Bandersnatch.2018.WEBRip.x264-NoGRP.vtt
Normal file
15237
Black.Mirror.Bandersnatch.2018.WEBRip.x264-NoGRP.vtt
Normal file
File diff suppressed because it is too large
Load diff
|
@ -312,18 +312,16 @@ function togglePlayPause() {
|
|||
|
||||
function onload() {
|
||||
var video_selector = document.getElementById("video");
|
||||
var video_source_selector = document.getElementById("video-source");
|
||||
var file_selector = document.getElementById("file-selector");
|
||||
if (video_selector.getAttribute("src") == '') {
|
||||
if (video_source_selector.getAttribute("src") == '') {
|
||||
console.log('no video')
|
||||
file_selector.style.display = 'table';
|
||||
document.getElementById("wrapper-video").style.display = 'none';
|
||||
}
|
||||
document.getElementById('fileinput').addEventListener('change', function () {
|
||||
var file = this.files[0];
|
||||
// This code is only for demo ...
|
||||
var fileUrl = URL.createObjectURL(file)
|
||||
console.log(file);
|
||||
console.log(fileUrl)
|
||||
video_selector.src = fileUrl;
|
||||
video_selector.play();
|
||||
file_selector.style.display = 'none';
|
||||
|
|
27
index.html
27
index.html
|
@ -3,28 +3,33 @@
|
|||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
|
||||
|
||||
<title>Bandersnatch Interactive</title>
|
||||
<script src="assets/bandersnatch.js"></script>
|
||||
<script src="assets/SegmentMap.js"></script>
|
||||
<script src="assets/scripts.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="assets/styles.css">
|
||||
<link </head> <body onload=onload()>
|
||||
</head>
|
||||
|
||||
<body onload=onload()>
|
||||
<div>
|
||||
<div id="c">
|
||||
<section role="banner">
|
||||
<div id="file-selector">
|
||||
<div class="file-area">
|
||||
<input id="fileinput" type="file">
|
||||
<div class="file-dummy">
|
||||
<span class="default">Select video file </span>
|
||||
<span class="success">Great, your file is selected</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="file-area">
|
||||
<input id="fileinput" type="file">
|
||||
<div class="file-dummy">
|
||||
<span class="default">Select video file </span>
|
||||
<span class="success">Great, your file is selected</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div id="wrapper-video">
|
||||
<video id="video" controls loop src="">
|
||||
<video id="video" controls loop controls preload="metadata">
|
||||
<source id="video-source" src="">
|
||||
<track label="English" kind="subtitles" srclang="en" src="Black.Mirror.Bandersnatch.2018.WEBRip.x264-NoGRP.vtt"
|
||||
default>
|
||||
|
||||
</video>
|
||||
<div class="controls">
|
||||
|
@ -44,6 +49,6 @@
|
|||
|
||||
|
||||
</div>
|
||||
</body>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue