mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Added back old URL copy method as fallback
This commit is contained in:
parent
a72d05db84
commit
2e6b2b5f82
1 changed files with 16 additions and 4 deletions
|
@ -351,10 +351,22 @@ define(["apphost", "globalize", "connectionManager", "itemHelper", "appRouter",
|
|||
toast(globalize.translate("CopyStreamURLSuccess"));
|
||||
});
|
||||
}, function () {
|
||||
prompt(globalize.translate("CopyStreamURL"), downloadHref);
|
||||
require(["toast"], function (toast) {
|
||||
toast(globalize.translate("CopyStreamURLSuccess"));
|
||||
});
|
||||
var textArea = document.createElement("textarea");
|
||||
textArea.value = downloadHref;
|
||||
document.body.appendChild(textArea);
|
||||
textArea.focus();
|
||||
textArea.select();
|
||||
if (document.execCommand("copy")) {
|
||||
require(["toast"], function (toast) {
|
||||
toast(globalize.translate("CopyStreamURLSuccess"));
|
||||
});
|
||||
} else {
|
||||
prompt(globalize.translate("CopyStreamURL"), downloadHref);
|
||||
require(["toast"], function (toast) {
|
||||
toast(globalize.translate("CopyStreamURLSuccess"));
|
||||
});
|
||||
}
|
||||
document.body.removeChild(textArea);
|
||||
});
|
||||
getResolveFunction(resolve, id)();
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue