Файловый менеджер - Редактировать - /home/easybachat/downloaderdaddy.com/js/videoconverter.js
Ðазад
async function convertVideos() { const videoInput = document.getElementById('videoInput'); const outputFormat = document.getElementById('outputFormat').value; const outputTable = document.getElementById('result-table'); const outputTableBody = document.getElementById('outputTableBody'); if (videoInput.files.length === 0) { alert('Please choose one or more video files.'); return; } outputTableBody.innerHTML = ''; // Clear existing rows const videoFiles = Array.from(videoInput.files); for (const inputVideo of videoFiles) { try { // Simulate video conversion (replace this with your actual conversion logic) const videoInfo = await convertVideoInfo(inputVideo, outputFormat); // Display video information in the table const row = outputTableBody.insertRow(); row.innerHTML = ` <td>${videoInfo.name}</td> <td>${videoInfo.size}</td> <td>${videoInfo.format}</td> <td><a href="${videoInfo.url}" class="btn btn-success" download="${videoInfo.downloadName}">Download</a></td> `; } catch (error) { console.error('Error converting video:', error); alert(`Error converting video "${inputVideo.name}". Please try again.`); } } outputTable.style.display = 'table'; } function convertVideoInfo(inputVideo, outputFormat) { return new Promise((resolve, reject) => { const reader = new FileReader(); reader.onload = function (event) { // Simulated conversion: Just create video information (replace this with your actual conversion logic) const videoInfo = { name: inputVideo.name, size: (inputVideo.size / (1024 * 1024)).toFixed(2) + ' MB', format: outputFormat.toUpperCase(), url: URL.createObjectURL(inputVideo), downloadName: `converted_${inputVideo.name.replace(/\.[^/.]+$/, `.${outputFormat}`)}` }; resolve(videoInfo); }; reader.onerror = function (event) { reject(event.error); }; reader.readAsArrayBuffer(inputVideo); }); }
| ver. 1.4 |
Github
|
.
| PHP 8.2.29 | Ð“ÐµÐ½ÐµÑ€Ð°Ñ†Ð¸Ñ Ñтраницы: 0.09 |
proxy
|
phpinfo
|
ÐаÑтройка