mirror of
https://github.com/A-Star100/simpliplay-desktop.git
synced 2025-09-18 14:42:16 +00:00
Compare commits
No commits in common. "a26e1448abe394f87d20d6227bfd3d00e8baf642" and "ef5e34331ef78f21a768deb131aaacdc5b9c7533" have entirely different histories.
a26e1448ab
...
ef5e34331e
@ -97,11 +97,17 @@ window.addEventListener('drop', e => {
|
|||||||
const fileURL = URL.createObjectURL(file);
|
const fileURL = URL.createObjectURL(file);
|
||||||
mediaElement.src = fileURL;
|
mediaElement.src = fileURL;
|
||||||
|
|
||||||
mediaElement.load();
|
|
||||||
|
// Only attempt to play if the browser thinks it can handle this type
|
||||||
|
if (mediaElement.canPlayType(file.type)) {
|
||||||
|
mediaElement.load();
|
||||||
// Autoplay if checkbox is checked
|
// Autoplay if checkbox is checked
|
||||||
if (autoplayCheckbox.checked) {
|
if (autoplayCheckbox.checked) {
|
||||||
mediaElement.play().catch(err => console.warn(err));
|
mediaElement.play().catch(err => console.warn(err));
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
console.warn("SimpliPlay does not support this video type:", file.type);
|
||||||
|
}
|
||||||
|
|
||||||
// Store for future cleanup
|
// Store for future cleanup
|
||||||
previousDropURL = fileURL;
|
previousDropURL = fileURL;
|
||||||
@ -196,5 +202,3 @@ window.electron.receive("unload-addon", (fileURL) => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user