mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
using NativeShell api for native apps in shell.js
This commit is contained in:
parent
60c0e58c64
commit
3de82f210a
1 changed files with 13 additions and 4 deletions
|
@ -2,8 +2,13 @@ define([], function () {
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
return {
|
return {
|
||||||
openUrl: function (url) {
|
openUrl: function (url, target) {
|
||||||
window.open(url, '_blank');
|
if (window.NativeShell) {
|
||||||
|
window.NativeShell.openUrl(url, target);
|
||||||
|
} else {
|
||||||
|
window.open(url, target || '_blank');
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
canExec: false,
|
canExec: false,
|
||||||
exec: function (options) {
|
exec: function (options) {
|
||||||
|
@ -12,10 +17,14 @@ define([], function () {
|
||||||
return Promise.reject();
|
return Promise.reject();
|
||||||
},
|
},
|
||||||
enableFullscreen: function () {
|
enableFullscreen: function () {
|
||||||
// do nothing since this is for native apps
|
if (window.NativeShell) {
|
||||||
|
window.NativeShell.enableFullscreen();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
disableFullscreen: function () {
|
disableFullscreen: function () {
|
||||||
// do nothing since this is for native apps
|
if (window.NativeShell) {
|
||||||
|
window.NativeShell.disableFullscreen();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
});
|
});
|
Loading…
Add table
Add a link
Reference in a new issue