-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathimport_user_video.html
42 lines (37 loc) · 1.26 KB
/
import_user_video.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
<!-- <!DOCTYPE html>
<html>
<body>
<h2>Upload File</h2>
<form action="dist/javascript/upload.js" method="post" enctype="multipart/form-data">
<input type="file" id="myFile" name="filename">
<input type="submit">
</form>
</body>
</html> -->
<!DOCTYPE html>
<html>
<head>
<link rel="icon" type="image/x-icon" href="./dist/images/favicon.ico">
</head>
<body>
<h1>Convert videos to '.ply' TIMECUBEs<br>(if you want to, of course)</h1>
<button id="uploadButton" >Upload Video</button>
<script>
let isElectron = false;
try {
isElectron = !!window.navigator.userAgent.toLowerCase().includes('electron');
} catch(e) {
console.log('Not running in Electron; error: ', e);
}
if (isElectron) {
console.log("Running inside Electron!");
document.getElementById('uploadButton').disabled = false;
window.uploadNewVideoFile('uploadButton');
} else {
console.log("Not running inside Electron.");
document.getElementById('uploadButton').textContent = 'Sorry, importing videos is not yet available on your computer.\nStay tuned for future compatibility updates!'
document.getElementById('uploadButton').disabled = true;
}
</script>
</body>
</html>