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
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,2 +1 @@
|
||||||
Black.Mirror.Bandersnatch.2018.720p.WEB-DL.x264.DUAL.mkv
|
Black.Mirror.Bandersnatch.2018.720p.WEB-DL.x264.DUAL.mkv
|
||||||
Black.Mirror.Bandersnatch.2018.WEBRip.x264-NoGRP.srt
|
|
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() {
|
function onload() {
|
||||||
var video_selector = document.getElementById("video");
|
var video_selector = document.getElementById("video");
|
||||||
|
var video_source_selector = document.getElementById("video-source");
|
||||||
var file_selector = document.getElementById("file-selector");
|
var file_selector = document.getElementById("file-selector");
|
||||||
if (video_selector.getAttribute("src") == '') {
|
if (video_source_selector.getAttribute("src") == '') {
|
||||||
console.log('no video')
|
console.log('no video')
|
||||||
file_selector.style.display = 'table';
|
file_selector.style.display = 'table';
|
||||||
document.getElementById("wrapper-video").style.display = 'none';
|
document.getElementById("wrapper-video").style.display = 'none';
|
||||||
}
|
}
|
||||||
document.getElementById('fileinput').addEventListener('change', function () {
|
document.getElementById('fileinput').addEventListener('change', function () {
|
||||||
var file = this.files[0];
|
var file = this.files[0];
|
||||||
// This code is only for demo ...
|
|
||||||
var fileUrl = URL.createObjectURL(file)
|
var fileUrl = URL.createObjectURL(file)
|
||||||
console.log(file);
|
|
||||||
console.log(fileUrl)
|
|
||||||
video_selector.src = fileUrl;
|
video_selector.src = fileUrl;
|
||||||
video_selector.play();
|
video_selector.play();
|
||||||
file_selector.style.display = 'none';
|
file_selector.style.display = 'none';
|
||||||
|
|
|
@ -9,7 +9,9 @@
|
||||||
<script src="assets/SegmentMap.js"></script>
|
<script src="assets/SegmentMap.js"></script>
|
||||||
<script src="assets/scripts.js"></script>
|
<script src="assets/scripts.js"></script>
|
||||||
<link rel="stylesheet" type="text/css" href="assets/styles.css">
|
<link rel="stylesheet" type="text/css" href="assets/styles.css">
|
||||||
<link </head> <body onload=onload()>
|
</head>
|
||||||
|
|
||||||
|
<body onload=onload()>
|
||||||
<div>
|
<div>
|
||||||
<div id="c">
|
<div id="c">
|
||||||
<section role="banner">
|
<section role="banner">
|
||||||
|
@ -24,7 +26,10 @@
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div id="wrapper-video">
|
<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>
|
</video>
|
||||||
<div class="controls">
|
<div class="controls">
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue