1
0
Fork 0
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:
Thibault Nocchi 2020-02-02 14:13:43 +01:00
parent a72d05db84
commit 2e6b2b5f82

View file

@ -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;