1
0
Fork 0
mirror of https://gitlab.com/futo-org/fcast.git synced 2025-08-08 10:12:50 +00:00

WebOS 22 and 6.0 collection of fixes

This commit is contained in:
Michael Hollister 2024-12-17 22:59:41 -06:00
parent 902ccff8bc
commit d57e1368b1
13 changed files with 228 additions and 36 deletions

View file

@ -40,11 +40,23 @@ if (TARGET === 'electron') {
let onSeekCb, onSetVolumeCb, onSetSpeedCb;
let playerWindowOpen = false;
const keepAliveService = window.webOS.service.request(`luna://${serviceId}/`, {
method:"keepAlive",
parameters: {},
onSuccess: (message: any) => {
console.log(`Player: keepAlive ${JSON.stringify(message)}`);
},
onFailure: (message: any) => {
console.error(`Player: keepAlive ${JSON.stringify(message)}`);
},
// onComplete: (message) => {},
});
const playService = window.webOS.service.request(`luna://${serviceId}/`, {
method:"play",
parameters: {},
onSuccess: (message: any) => {
console.log(JSON.stringify(message));
// console.log(JSON.stringify(message));
if (message.value.subscribed === true) {
console.log('Player: Registered play handler with service');
}
@ -122,8 +134,10 @@ if (TARGET === 'electron') {
setVolumeService.cancel();
setSpeedService.cancel();
// window.open('../main_window/index.html');
history.back();
// WebOS 22 and earlier does not work well using the history API,
// so manually handling page navigation...
// history.back();
window.open('../main_window/index.html');
}
},
onFailure: (message: any) => {