This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#uploadVideoProgressBar').width(percentLoaded + "%"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="uploadVideoProgressBar" style="height: 5px; width: 1%; background: #2781e9; margin-top: -5px;"></div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function UploadVideo(file) { | |
var loaded = 0; | |
var chunkSize = 500000; | |
var total = file.size; | |
var reader = new FileReader(); | |
var slice = file.slice(0, chunkSize); | |
// Reading a chunk to invoke the 'onload' event | |
reader.readAsBinaryString(slice); | |
console.log('Started uploading file "' + file.name + '"'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function UploadVideo(file) { | |
var loaded = 0; | |
var chunkSize = 500000; | |
var total = file.size; | |
var reader = new FileReader(); | |
var slice = file.slice(0, chunkSize); | |
// Reading a chunk to invoke the 'onload' event | |
reader.readAsBinaryString(slice); | |
console.log('Started uploading file "' + file.name + '"'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#uploadVideoFile').on('change', | |
function() { | |
var fileInput = document.getElementById("uploadVideoFile"); | |
console.log('Trying to upload the video file: %O', fileInput); | |
if ('files' in fileInput) { | |
if (fileInput.files.length === 0) { | |
alert("Select a file to upload"); | |
} else { | |
var $source = $('#videoSource'); | |
$source[0].src = URL.createObjectURL(this.files[0]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
div id="videoSourceWrapper"> | |
<video style="width: 100%;" controls> | |
<source id="videoSource"/> | |
</video> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var fileInput = document.getElementById("uploadVideoFile"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<input type="file" id="uploadVideoFile" accept="video/*" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#save-popup-icon-img{ | |
animation-name: expand; | |
animation-duration: 1s; | |
} | |
@keyframes expand{ | |
0% {transform: scale(0);} | |
100% {transform: scale(1);} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.getElementById("save-popup-icon").innerHTML = | |
"<img id='save-popup-icon-img' width=120 | |
src='https://ludu-assets.s3.amazonaws.com/lesson-icons/yWfNH8VAg7yf2SKSaRdu'/>"; | |
document.getElementById("save-popup-title").innerHTML = "Success!"; |