added transcode commend

This commit is contained in:
KGT1 2020-09-29 13:32:52 +02:00
parent 9f12d8bfc1
commit 1acc765f92

View File

@ -22,7 +22,7 @@ var _seek;
const jellyfinClientManager = require("./jellyfinclientmanager"); const jellyfinClientManager = require("./jellyfinclientmanager");
function streamURLbuilder (itemID, bitrate) { function streamURLbuilder (itemID, bitrate) {
// so the server transcodes. Seems appropriate as it has the source file. // so the server transcodes. Seems appropriate as it has the source file.(doesnt yet work i dont know why)
const supportedCodecs = "opus"; const supportedCodecs = "opus";
const supportedContainers = "ogg,opus"; const supportedContainers = "ogg,opus";
return `${jellyfinClientManager.getJellyfinClient().serverAddress()}/Audio/${itemID}/universal?UserId=${jellyfinClientManager.getJellyfinClient().getCurrentUserId()}&DeviceId=${jellyfinClientManager.getJellyfinClient().deviceId()}&MaxStreamingBitrate=${bitrate}&Container=${supportedContainers}&AudioCodec=${supportedCodecs}&api_key=${jellyfinClientManager.getJellyfinClient().accessToken()}&TranscodingContainer=ts&TranscodingProtocol=hls`; return `${jellyfinClientManager.getJellyfinClient().serverAddress()}/Audio/${itemID}/universal?UserId=${jellyfinClientManager.getJellyfinClient().getCurrentUserId()}&DeviceId=${jellyfinClientManager.getJellyfinClient().deviceId()}&MaxStreamingBitrate=${bitrate}&Container=${supportedContainers}&AudioCodec=${supportedCodecs}&api_key=${jellyfinClientManager.getJellyfinClient().accessToken()}&TranscodingContainer=ts&TranscodingProtocol=hls`;