mirror of
https://github.com/A-Star100/simpliplay-desktop.git
synced 2025-09-17 22:29:38 +00:00
Compare commits
25 Commits
release-2.
...
main
Author | SHA1 | Date | |
---|---|---|---|
![]() |
a26e1448ab | ||
![]() |
59a8d5c577 | ||
![]() |
ef5e34331e | ||
![]() |
cc5da53f23 | ||
![]() |
5d0128e2af | ||
![]() |
101f14c4d6 | ||
![]() |
49939dd963 | ||
![]() |
257218c5a1 | ||
![]() |
808c275167 | ||
![]() |
5d49c97662 | ||
![]() |
16311d2eff | ||
![]() |
4a23d31b03 | ||
![]() |
97088fb943 | ||
![]() |
b987f539f8 | ||
![]() |
117d2950ea | ||
![]() |
0aa0e06194 | ||
![]() |
2ddce17442 | ||
![]() |
ae127fb837 | ||
![]() |
f7fa4bf081 | ||
![]() |
9cdbc5e328 | ||
![]() |
778cc0ec74 | ||
![]() |
451313f414 | ||
![]() |
2c6b048721 | ||
![]() |
adb0647fdc | ||
![]() |
f06f2cc9fc |
@ -26,5 +26,5 @@ ___
|
|||||||
Read the docs ([Electron - Tutorial](https://www.electronjs.org/docs/latest/tutorial/tutorial-prerequisites), [Neutralinojs - Your First App](https://neutralino.js.org/docs/getting-started/your-first-neutralinojs-app), [NW.js - Getting Started (For Users)](https://nwjs.readthedocs.io/en/latest/For%20Users/Getting%20Started/#write-nwjs-app))
|
Read the docs ([Electron - Tutorial](https://www.electronjs.org/docs/latest/tutorial/tutorial-prerequisites), [Neutralinojs - Your First App](https://neutralino.js.org/docs/getting-started/your-first-neutralinojs-app), [NW.js - Getting Started (For Users)](https://nwjs.readthedocs.io/en/latest/For%20Users/Getting%20Started/#write-nwjs-app))
|
||||||
|
|
||||||
## Mirrors
|
## Mirrors
|
||||||
Self-hosted mirror available [here](https://git.anirudhsevugan.me/simpliplay/simpliplay-desktop-mirror).
|
Self-hosted mirror available [here](https://new-git.anirudhsevugan.me/anirudh/simpliplay-desktop/src/branch/main/).
|
||||||
**The server may not always be up. You'll see a screen saying "Git is down" if the server is down, with a link to contact me (the webmaster)**.
|
**The server may not always be up. If it isn't, you can contact me at: (personal at anirudhsevugan dot me)**.
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 76 KiB |
@ -6,7 +6,7 @@ const { pathToFileURL } = require("url");
|
|||||||
const { checkForUpdate } = require('./updateChecker');
|
const { checkForUpdate } = require('./updateChecker');
|
||||||
let gpuAccel = "";
|
let gpuAccel = "";
|
||||||
let didRegisterShortcuts = false;
|
let didRegisterShortcuts = false;
|
||||||
let version = "2.1.1.0"
|
let version = "2.1.3.0"
|
||||||
|
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
if (process.argv.includes('--use-gl')) {
|
if (process.argv.includes('--use-gl')) {
|
||||||
|
@ -6,7 +6,7 @@ const { pathToFileURL } = require("url");
|
|||||||
const { checkForUpdate } = require('./updateChecker');
|
const { checkForUpdate } = require('./updateChecker');
|
||||||
let gpuAccel = "";
|
let gpuAccel = "";
|
||||||
let didRegisterShortcuts = false;
|
let didRegisterShortcuts = false;
|
||||||
let version = "2.1.1.0"
|
let version = "2.1.4.0"
|
||||||
|
|
||||||
if (process.platform === 'darwin') {
|
if (process.platform === 'darwin') {
|
||||||
if (process.argv.includes('--use-gl')) {
|
if (process.argv.includes('--use-gl')) {
|
||||||
@ -321,6 +321,14 @@ addonsMenu.append(new MenuItem({
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
// "Store" menu item (info dialog version)
|
||||||
|
addonsMenu.append(new MenuItem({
|
||||||
|
label: 'Store',
|
||||||
|
click: () => {
|
||||||
|
shell.openExternal("https://simpliplay.netlify.app/addons/")
|
||||||
|
}
|
||||||
|
}));
|
||||||
|
|
||||||
// Add the Add-ons menu only once here:
|
// Add the Add-ons menu only once here:
|
||||||
newMenuItems.push(new MenuItem({ label: 'Add-ons', submenu: addonsMenu }));
|
newMenuItems.push(new MenuItem({ label: 'Add-ons', submenu: addonsMenu }));
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "SimpliPlay",
|
"name": "SimpliPlay",
|
||||||
"version": "2.1.1",
|
"version": "2.1.4",
|
||||||
"description": "SimpliPlay - The mission to make media playback accessible on every device, anywhere, anytime.",
|
"description": "SimpliPlay - The mission to make media playback accessible on every device, anywhere, anytime.",
|
||||||
"main": "./main.js",
|
"main": "./main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -92,6 +92,11 @@
|
|||||||
"name": "FLAC Audio",
|
"name": "FLAC Audio",
|
||||||
"role": "Viewer"
|
"role": "Viewer"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ext": "opus",
|
||||||
|
"name": "Opus Audio",
|
||||||
|
"role": "Viewer"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ext": "mkv",
|
"ext": "mkv",
|
||||||
"name": "MKV Video",
|
"name": "MKV Video",
|
||||||
@ -113,7 +118,7 @@
|
|||||||
"allowToChangeInstallationDirectory": true
|
"allowToChangeInstallationDirectory": true
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"electron": "^37.4.0",
|
"electron": "^38.1.0",
|
||||||
"electron-builder": "^26.0.12"
|
"electron-builder": "^26.0.12"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "SimpliPlay",
|
"name": "SimpliPlay",
|
||||||
"version": "2.1.1",
|
"version": "2.1.4",
|
||||||
"description": "The mission to make media playback accessible on every platform, anywhere, anytime.",
|
"description": "The mission to make media playback accessible on every platform, anywhere, anytime.",
|
||||||
"main": "./main.js",
|
"main": "./main.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
@ -105,6 +105,11 @@
|
|||||||
"name": "FLAC Audio",
|
"name": "FLAC Audio",
|
||||||
"role": "Viewer"
|
"role": "Viewer"
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"ext": "opus",
|
||||||
|
"name": "Opus Audio",
|
||||||
|
"role": "Viewer"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"ext": "mkv",
|
"ext": "mkv",
|
||||||
"name": "MKV Video",
|
"name": "MKV Video",
|
||||||
@ -118,7 +123,7 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"electron": "^37.4.0",
|
"electron": "^38.1.0",
|
||||||
"electron-builder": "^26.0.12"
|
"electron-builder": "^26.0.12"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -272,6 +272,7 @@ const { isHLS, isDASH } = await detectStreamType(url);
|
|||||||
|
|
||||||
|
|
||||||
let previousObjectURL = null; // Store the last Object URL
|
let previousObjectURL = null; // Store the last Object URL
|
||||||
|
window.objectURL = previousObjectURL
|
||||||
|
|
||||||
fileInput.addEventListener('change', (event) => {
|
fileInput.addEventListener('change', (event) => {
|
||||||
if (hls !== null) {
|
if (hls !== null) {
|
||||||
@ -292,8 +293,14 @@ const { isHLS, isDASH } = await detectStreamType(url);
|
|||||||
// Revoke the previous Object URL if it exists
|
// Revoke the previous Object URL if it exists
|
||||||
if (previousObjectURL) {
|
if (previousObjectURL) {
|
||||||
URL.revokeObjectURL(previousObjectURL);
|
URL.revokeObjectURL(previousObjectURL);
|
||||||
|
window.objectURL = previousObjectURL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Revoke previous file picker Object URL
|
||||||
|
if (window.previousDropURL) {
|
||||||
|
URL.revokeObjectURL(window.previousDropURL);
|
||||||
|
}
|
||||||
|
|
||||||
// Create a new Object URL for the selected file
|
// Create a new Object URL for the selected file
|
||||||
const fileURL = URL.createObjectURL(file);
|
const fileURL = URL.createObjectURL(file);
|
||||||
mediaPlayer.src = fileURL;
|
mediaPlayer.src = fileURL;
|
||||||
|
@ -16,6 +16,103 @@ function loadMedia(fileURL) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
window.addEventListener('DOMContentLoaded', () => {
|
||||||
|
const dropArea = document.createElement('div');
|
||||||
|
dropArea.style.position = 'fixed';
|
||||||
|
dropArea.style.top = '0';
|
||||||
|
dropArea.style.left = '0';
|
||||||
|
dropArea.style.width = '100vw';
|
||||||
|
dropArea.style.height = '100vh';
|
||||||
|
dropArea.style.display = 'none'; // hidden by default
|
||||||
|
dropArea.style.zIndex = '0'; // behind everything
|
||||||
|
dropArea.style.opacity = '0'; // invisible
|
||||||
|
document.body.appendChild(dropArea);
|
||||||
|
|
||||||
|
let dragCounter = 0; // track nested dragenter/dragleave events
|
||||||
|
|
||||||
|
|
||||||
|
window.addEventListener('dragenter', (e) => {
|
||||||
|
if (e.dataTransfer.types.includes('Files')) {
|
||||||
|
dragCounter++;
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
window.addEventListener('dragleave', (e) => {
|
||||||
|
if (e.dataTransfer.types.includes('Files')) {
|
||||||
|
dragCounter--;
|
||||||
|
if (dragCounter <= 0) dragCounter = 0;
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
window.addEventListener('dragover', (e) => {
|
||||||
|
if (e.dataTransfer.types.includes('Files')) {
|
||||||
|
e.preventDefault(); // allow drop
|
||||||
|
e.stopPropagation();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
let previousDropURL = null; // Store last Object URL
|
||||||
|
window.previousDropURL = previousDropURL
|
||||||
|
|
||||||
|
window.addEventListener('drop', e => {
|
||||||
|
e.preventDefault();
|
||||||
|
e.stopPropagation();
|
||||||
|
|
||||||
|
const file = e.dataTransfer.files[0];
|
||||||
|
if (!file) return;
|
||||||
|
|
||||||
|
// Destroy existing HLS/DASH instances if they exist
|
||||||
|
if (window.hls) {
|
||||||
|
window.hls.destroy();
|
||||||
|
window.hls = null;
|
||||||
|
}
|
||||||
|
if (window.dash) {
|
||||||
|
window.dash.reset();
|
||||||
|
window.dash = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Clear previously loaded subtitles
|
||||||
|
const tracks = mediaElement.getElementsByTagName('track');
|
||||||
|
for (let i = tracks.length - 1; i >= 0; i--) {
|
||||||
|
tracks[i].remove();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Revoke previous Object URL
|
||||||
|
if (previousDropURL) {
|
||||||
|
URL.revokeObjectURL(previousDropURL);
|
||||||
|
window.previousDropURL = previousDropURL;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Revoke previous file picker Object URL
|
||||||
|
if (window.objectURL) {
|
||||||
|
URL.revokeObjectURL(window.objectURL);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Create a new Object URL
|
||||||
|
const fileURL = URL.createObjectURL(file);
|
||||||
|
mediaElement.src = fileURL;
|
||||||
|
|
||||||
|
mediaElement.load();
|
||||||
|
// Autoplay if checkbox is checked
|
||||||
|
if (autoplayCheckbox.checked) {
|
||||||
|
mediaElement.play().catch(err => console.warn(err));
|
||||||
|
}
|
||||||
|
|
||||||
|
// Store for future cleanup
|
||||||
|
previousDropURL = fileURL;
|
||||||
|
|
||||||
|
// Hide file dialog if applicable
|
||||||
|
if (dialogOverlay) dialogOverlay.style.display = 'none';
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
// Handle submit subtitle URL
|
// Handle submit subtitle URL
|
||||||
function clearSubtitles() {
|
function clearSubtitles() {
|
||||||
const tracks = mediaElement.getElementsByTagName('track');
|
const tracks = mediaElement.getElementsByTagName('track');
|
||||||
@ -97,3 +194,7 @@ window.electron.receive("unload-addon", (fileURL) => {
|
|||||||
unloadAddon(fileURL);
|
unloadAddon(fileURL);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user