1130 lines
40 KiB
TypeScript
1130 lines
40 KiB
TypeScript
/* tslint:disable */
|
|
/* eslint-disable */
|
|
/**
|
|
* Jellyfin API
|
|
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
*
|
|
* The version of the OpenAPI document: 10.8.9
|
|
*
|
|
*
|
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
* https://openapi-generator.tech
|
|
* Do not edit the class manually.
|
|
*/
|
|
|
|
|
|
import * as runtime from '../runtime';
|
|
import type {
|
|
EncodingContext,
|
|
SubtitleDeliveryMethod,
|
|
} from '../models';
|
|
import {
|
|
EncodingContextFromJSON,
|
|
EncodingContextToJSON,
|
|
SubtitleDeliveryMethodFromJSON,
|
|
SubtitleDeliveryMethodToJSON,
|
|
} from '../models';
|
|
|
|
export interface GetAudioStreamRequest {
|
|
itemId: string;
|
|
container?: string;
|
|
_static?: boolean;
|
|
params?: string;
|
|
tag?: string;
|
|
deviceProfileId?: string;
|
|
playSessionId?: string;
|
|
segmentContainer?: string;
|
|
segmentLength?: number;
|
|
minSegments?: number;
|
|
mediaSourceId?: string;
|
|
deviceId?: string;
|
|
audioCodec?: string;
|
|
enableAutoStreamCopy?: boolean;
|
|
allowVideoStreamCopy?: boolean;
|
|
allowAudioStreamCopy?: boolean;
|
|
breakOnNonKeyFrames?: boolean;
|
|
audioSampleRate?: number;
|
|
maxAudioBitDepth?: number;
|
|
audioBitRate?: number;
|
|
audioChannels?: number;
|
|
maxAudioChannels?: number;
|
|
profile?: string;
|
|
level?: string;
|
|
framerate?: number;
|
|
maxFramerate?: number;
|
|
copyTimestamps?: boolean;
|
|
startTimeTicks?: number;
|
|
width?: number;
|
|
height?: number;
|
|
videoBitRate?: number;
|
|
subtitleStreamIndex?: number;
|
|
subtitleMethod?: SubtitleDeliveryMethod;
|
|
maxRefFrames?: number;
|
|
maxVideoBitDepth?: number;
|
|
requireAvc?: boolean;
|
|
deInterlace?: boolean;
|
|
requireNonAnamorphic?: boolean;
|
|
transcodingMaxAudioChannels?: number;
|
|
cpuCoreLimit?: number;
|
|
liveStreamId?: string;
|
|
enableMpegtsM2TsMode?: boolean;
|
|
videoCodec?: string;
|
|
subtitleCodec?: string;
|
|
transcodeReasons?: string;
|
|
audioStreamIndex?: number;
|
|
videoStreamIndex?: number;
|
|
context?: EncodingContext;
|
|
streamOptions?: { [key: string]: string; };
|
|
}
|
|
|
|
export interface GetAudioStreamByContainerRequest {
|
|
itemId: string;
|
|
container: string;
|
|
_static?: boolean;
|
|
params?: string;
|
|
tag?: string;
|
|
deviceProfileId?: string;
|
|
playSessionId?: string;
|
|
segmentContainer?: string;
|
|
segmentLength?: number;
|
|
minSegments?: number;
|
|
mediaSourceId?: string;
|
|
deviceId?: string;
|
|
audioCodec?: string;
|
|
enableAutoStreamCopy?: boolean;
|
|
allowVideoStreamCopy?: boolean;
|
|
allowAudioStreamCopy?: boolean;
|
|
breakOnNonKeyFrames?: boolean;
|
|
audioSampleRate?: number;
|
|
maxAudioBitDepth?: number;
|
|
audioBitRate?: number;
|
|
audioChannels?: number;
|
|
maxAudioChannels?: number;
|
|
profile?: string;
|
|
level?: string;
|
|
framerate?: number;
|
|
maxFramerate?: number;
|
|
copyTimestamps?: boolean;
|
|
startTimeTicks?: number;
|
|
width?: number;
|
|
height?: number;
|
|
videoBitRate?: number;
|
|
subtitleStreamIndex?: number;
|
|
subtitleMethod?: SubtitleDeliveryMethod;
|
|
maxRefFrames?: number;
|
|
maxVideoBitDepth?: number;
|
|
requireAvc?: boolean;
|
|
deInterlace?: boolean;
|
|
requireNonAnamorphic?: boolean;
|
|
transcodingMaxAudioChannels?: number;
|
|
cpuCoreLimit?: number;
|
|
liveStreamId?: string;
|
|
enableMpegtsM2TsMode?: boolean;
|
|
videoCodec?: string;
|
|
subtitleCodec?: string;
|
|
transcodeReasons?: string;
|
|
audioStreamIndex?: number;
|
|
videoStreamIndex?: number;
|
|
context?: EncodingContext;
|
|
streamOptions?: { [key: string]: string; };
|
|
}
|
|
|
|
export interface HeadAudioStreamRequest {
|
|
itemId: string;
|
|
container?: string;
|
|
_static?: boolean;
|
|
params?: string;
|
|
tag?: string;
|
|
deviceProfileId?: string;
|
|
playSessionId?: string;
|
|
segmentContainer?: string;
|
|
segmentLength?: number;
|
|
minSegments?: number;
|
|
mediaSourceId?: string;
|
|
deviceId?: string;
|
|
audioCodec?: string;
|
|
enableAutoStreamCopy?: boolean;
|
|
allowVideoStreamCopy?: boolean;
|
|
allowAudioStreamCopy?: boolean;
|
|
breakOnNonKeyFrames?: boolean;
|
|
audioSampleRate?: number;
|
|
maxAudioBitDepth?: number;
|
|
audioBitRate?: number;
|
|
audioChannels?: number;
|
|
maxAudioChannels?: number;
|
|
profile?: string;
|
|
level?: string;
|
|
framerate?: number;
|
|
maxFramerate?: number;
|
|
copyTimestamps?: boolean;
|
|
startTimeTicks?: number;
|
|
width?: number;
|
|
height?: number;
|
|
videoBitRate?: number;
|
|
subtitleStreamIndex?: number;
|
|
subtitleMethod?: SubtitleDeliveryMethod;
|
|
maxRefFrames?: number;
|
|
maxVideoBitDepth?: number;
|
|
requireAvc?: boolean;
|
|
deInterlace?: boolean;
|
|
requireNonAnamorphic?: boolean;
|
|
transcodingMaxAudioChannels?: number;
|
|
cpuCoreLimit?: number;
|
|
liveStreamId?: string;
|
|
enableMpegtsM2TsMode?: boolean;
|
|
videoCodec?: string;
|
|
subtitleCodec?: string;
|
|
transcodeReasons?: string;
|
|
audioStreamIndex?: number;
|
|
videoStreamIndex?: number;
|
|
context?: EncodingContext;
|
|
streamOptions?: { [key: string]: string; };
|
|
}
|
|
|
|
export interface HeadAudioStreamByContainerRequest {
|
|
itemId: string;
|
|
container: string;
|
|
_static?: boolean;
|
|
params?: string;
|
|
tag?: string;
|
|
deviceProfileId?: string;
|
|
playSessionId?: string;
|
|
segmentContainer?: string;
|
|
segmentLength?: number;
|
|
minSegments?: number;
|
|
mediaSourceId?: string;
|
|
deviceId?: string;
|
|
audioCodec?: string;
|
|
enableAutoStreamCopy?: boolean;
|
|
allowVideoStreamCopy?: boolean;
|
|
allowAudioStreamCopy?: boolean;
|
|
breakOnNonKeyFrames?: boolean;
|
|
audioSampleRate?: number;
|
|
maxAudioBitDepth?: number;
|
|
audioBitRate?: number;
|
|
audioChannels?: number;
|
|
maxAudioChannels?: number;
|
|
profile?: string;
|
|
level?: string;
|
|
framerate?: number;
|
|
maxFramerate?: number;
|
|
copyTimestamps?: boolean;
|
|
startTimeTicks?: number;
|
|
width?: number;
|
|
height?: number;
|
|
videoBitRate?: number;
|
|
subtitleStreamIndex?: number;
|
|
subtitleMethod?: SubtitleDeliveryMethod;
|
|
maxRefFrames?: number;
|
|
maxVideoBitDepth?: number;
|
|
requireAvc?: boolean;
|
|
deInterlace?: boolean;
|
|
requireNonAnamorphic?: boolean;
|
|
transcodingMaxAudioChannels?: number;
|
|
cpuCoreLimit?: number;
|
|
liveStreamId?: string;
|
|
enableMpegtsM2TsMode?: boolean;
|
|
videoCodec?: string;
|
|
subtitleCodec?: string;
|
|
transcodeReasons?: string;
|
|
audioStreamIndex?: number;
|
|
videoStreamIndex?: number;
|
|
context?: EncodingContext;
|
|
streamOptions?: { [key: string]: string; };
|
|
}
|
|
|
|
/**
|
|
*
|
|
*/
|
|
export class AudioApi extends runtime.BaseAPI {
|
|
|
|
/**
|
|
* Gets an audio stream.
|
|
*/
|
|
async getAudioStreamRaw(requestParameters: GetAudioStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
if (requestParameters.itemId === null || requestParameters.itemId === undefined) {
|
|
throw new runtime.RequiredError('itemId','Required parameter requestParameters.itemId was null or undefined when calling getAudioStream.');
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters.container !== undefined) {
|
|
queryParameters['container'] = requestParameters.container;
|
|
}
|
|
|
|
if (requestParameters._static !== undefined) {
|
|
queryParameters['static'] = requestParameters._static;
|
|
}
|
|
|
|
if (requestParameters.params !== undefined) {
|
|
queryParameters['params'] = requestParameters.params;
|
|
}
|
|
|
|
if (requestParameters.tag !== undefined) {
|
|
queryParameters['tag'] = requestParameters.tag;
|
|
}
|
|
|
|
if (requestParameters.deviceProfileId !== undefined) {
|
|
queryParameters['deviceProfileId'] = requestParameters.deviceProfileId;
|
|
}
|
|
|
|
if (requestParameters.playSessionId !== undefined) {
|
|
queryParameters['playSessionId'] = requestParameters.playSessionId;
|
|
}
|
|
|
|
if (requestParameters.segmentContainer !== undefined) {
|
|
queryParameters['segmentContainer'] = requestParameters.segmentContainer;
|
|
}
|
|
|
|
if (requestParameters.segmentLength !== undefined) {
|
|
queryParameters['segmentLength'] = requestParameters.segmentLength;
|
|
}
|
|
|
|
if (requestParameters.minSegments !== undefined) {
|
|
queryParameters['minSegments'] = requestParameters.minSegments;
|
|
}
|
|
|
|
if (requestParameters.mediaSourceId !== undefined) {
|
|
queryParameters['mediaSourceId'] = requestParameters.mediaSourceId;
|
|
}
|
|
|
|
if (requestParameters.deviceId !== undefined) {
|
|
queryParameters['deviceId'] = requestParameters.deviceId;
|
|
}
|
|
|
|
if (requestParameters.audioCodec !== undefined) {
|
|
queryParameters['audioCodec'] = requestParameters.audioCodec;
|
|
}
|
|
|
|
if (requestParameters.enableAutoStreamCopy !== undefined) {
|
|
queryParameters['enableAutoStreamCopy'] = requestParameters.enableAutoStreamCopy;
|
|
}
|
|
|
|
if (requestParameters.allowVideoStreamCopy !== undefined) {
|
|
queryParameters['allowVideoStreamCopy'] = requestParameters.allowVideoStreamCopy;
|
|
}
|
|
|
|
if (requestParameters.allowAudioStreamCopy !== undefined) {
|
|
queryParameters['allowAudioStreamCopy'] = requestParameters.allowAudioStreamCopy;
|
|
}
|
|
|
|
if (requestParameters.breakOnNonKeyFrames !== undefined) {
|
|
queryParameters['breakOnNonKeyFrames'] = requestParameters.breakOnNonKeyFrames;
|
|
}
|
|
|
|
if (requestParameters.audioSampleRate !== undefined) {
|
|
queryParameters['audioSampleRate'] = requestParameters.audioSampleRate;
|
|
}
|
|
|
|
if (requestParameters.maxAudioBitDepth !== undefined) {
|
|
queryParameters['maxAudioBitDepth'] = requestParameters.maxAudioBitDepth;
|
|
}
|
|
|
|
if (requestParameters.audioBitRate !== undefined) {
|
|
queryParameters['audioBitRate'] = requestParameters.audioBitRate;
|
|
}
|
|
|
|
if (requestParameters.audioChannels !== undefined) {
|
|
queryParameters['audioChannels'] = requestParameters.audioChannels;
|
|
}
|
|
|
|
if (requestParameters.maxAudioChannels !== undefined) {
|
|
queryParameters['maxAudioChannels'] = requestParameters.maxAudioChannels;
|
|
}
|
|
|
|
if (requestParameters.profile !== undefined) {
|
|
queryParameters['profile'] = requestParameters.profile;
|
|
}
|
|
|
|
if (requestParameters.level !== undefined) {
|
|
queryParameters['level'] = requestParameters.level;
|
|
}
|
|
|
|
if (requestParameters.framerate !== undefined) {
|
|
queryParameters['framerate'] = requestParameters.framerate;
|
|
}
|
|
|
|
if (requestParameters.maxFramerate !== undefined) {
|
|
queryParameters['maxFramerate'] = requestParameters.maxFramerate;
|
|
}
|
|
|
|
if (requestParameters.copyTimestamps !== undefined) {
|
|
queryParameters['copyTimestamps'] = requestParameters.copyTimestamps;
|
|
}
|
|
|
|
if (requestParameters.startTimeTicks !== undefined) {
|
|
queryParameters['startTimeTicks'] = requestParameters.startTimeTicks;
|
|
}
|
|
|
|
if (requestParameters.width !== undefined) {
|
|
queryParameters['width'] = requestParameters.width;
|
|
}
|
|
|
|
if (requestParameters.height !== undefined) {
|
|
queryParameters['height'] = requestParameters.height;
|
|
}
|
|
|
|
if (requestParameters.videoBitRate !== undefined) {
|
|
queryParameters['videoBitRate'] = requestParameters.videoBitRate;
|
|
}
|
|
|
|
if (requestParameters.subtitleStreamIndex !== undefined) {
|
|
queryParameters['subtitleStreamIndex'] = requestParameters.subtitleStreamIndex;
|
|
}
|
|
|
|
if (requestParameters.subtitleMethod !== undefined) {
|
|
queryParameters['subtitleMethod'] = requestParameters.subtitleMethod;
|
|
}
|
|
|
|
if (requestParameters.maxRefFrames !== undefined) {
|
|
queryParameters['maxRefFrames'] = requestParameters.maxRefFrames;
|
|
}
|
|
|
|
if (requestParameters.maxVideoBitDepth !== undefined) {
|
|
queryParameters['maxVideoBitDepth'] = requestParameters.maxVideoBitDepth;
|
|
}
|
|
|
|
if (requestParameters.requireAvc !== undefined) {
|
|
queryParameters['requireAvc'] = requestParameters.requireAvc;
|
|
}
|
|
|
|
if (requestParameters.deInterlace !== undefined) {
|
|
queryParameters['deInterlace'] = requestParameters.deInterlace;
|
|
}
|
|
|
|
if (requestParameters.requireNonAnamorphic !== undefined) {
|
|
queryParameters['requireNonAnamorphic'] = requestParameters.requireNonAnamorphic;
|
|
}
|
|
|
|
if (requestParameters.transcodingMaxAudioChannels !== undefined) {
|
|
queryParameters['transcodingMaxAudioChannels'] = requestParameters.transcodingMaxAudioChannels;
|
|
}
|
|
|
|
if (requestParameters.cpuCoreLimit !== undefined) {
|
|
queryParameters['cpuCoreLimit'] = requestParameters.cpuCoreLimit;
|
|
}
|
|
|
|
if (requestParameters.liveStreamId !== undefined) {
|
|
queryParameters['liveStreamId'] = requestParameters.liveStreamId;
|
|
}
|
|
|
|
if (requestParameters.enableMpegtsM2TsMode !== undefined) {
|
|
queryParameters['enableMpegtsM2TsMode'] = requestParameters.enableMpegtsM2TsMode;
|
|
}
|
|
|
|
if (requestParameters.videoCodec !== undefined) {
|
|
queryParameters['videoCodec'] = requestParameters.videoCodec;
|
|
}
|
|
|
|
if (requestParameters.subtitleCodec !== undefined) {
|
|
queryParameters['subtitleCodec'] = requestParameters.subtitleCodec;
|
|
}
|
|
|
|
if (requestParameters.transcodeReasons !== undefined) {
|
|
queryParameters['transcodeReasons'] = requestParameters.transcodeReasons;
|
|
}
|
|
|
|
if (requestParameters.audioStreamIndex !== undefined) {
|
|
queryParameters['audioStreamIndex'] = requestParameters.audioStreamIndex;
|
|
}
|
|
|
|
if (requestParameters.videoStreamIndex !== undefined) {
|
|
queryParameters['videoStreamIndex'] = requestParameters.videoStreamIndex;
|
|
}
|
|
|
|
if (requestParameters.context !== undefined) {
|
|
queryParameters['context'] = requestParameters.context;
|
|
}
|
|
|
|
if (requestParameters.streamOptions !== undefined) {
|
|
queryParameters['streamOptions'] = requestParameters.streamOptions;
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
const response = await this.request({
|
|
path: `/Audio/{itemId}/stream`.replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters.itemId))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.BlobApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* Gets an audio stream.
|
|
*/
|
|
async getAudioStream(requestParameters: GetAudioStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
const response = await this.getAudioStreamRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* Gets an audio stream.
|
|
*/
|
|
async getAudioStreamByContainerRaw(requestParameters: GetAudioStreamByContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
if (requestParameters.itemId === null || requestParameters.itemId === undefined) {
|
|
throw new runtime.RequiredError('itemId','Required parameter requestParameters.itemId was null or undefined when calling getAudioStreamByContainer.');
|
|
}
|
|
|
|
if (requestParameters.container === null || requestParameters.container === undefined) {
|
|
throw new runtime.RequiredError('container','Required parameter requestParameters.container was null or undefined when calling getAudioStreamByContainer.');
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters._static !== undefined) {
|
|
queryParameters['static'] = requestParameters._static;
|
|
}
|
|
|
|
if (requestParameters.params !== undefined) {
|
|
queryParameters['params'] = requestParameters.params;
|
|
}
|
|
|
|
if (requestParameters.tag !== undefined) {
|
|
queryParameters['tag'] = requestParameters.tag;
|
|
}
|
|
|
|
if (requestParameters.deviceProfileId !== undefined) {
|
|
queryParameters['deviceProfileId'] = requestParameters.deviceProfileId;
|
|
}
|
|
|
|
if (requestParameters.playSessionId !== undefined) {
|
|
queryParameters['playSessionId'] = requestParameters.playSessionId;
|
|
}
|
|
|
|
if (requestParameters.segmentContainer !== undefined) {
|
|
queryParameters['segmentContainer'] = requestParameters.segmentContainer;
|
|
}
|
|
|
|
if (requestParameters.segmentLength !== undefined) {
|
|
queryParameters['segmentLength'] = requestParameters.segmentLength;
|
|
}
|
|
|
|
if (requestParameters.minSegments !== undefined) {
|
|
queryParameters['minSegments'] = requestParameters.minSegments;
|
|
}
|
|
|
|
if (requestParameters.mediaSourceId !== undefined) {
|
|
queryParameters['mediaSourceId'] = requestParameters.mediaSourceId;
|
|
}
|
|
|
|
if (requestParameters.deviceId !== undefined) {
|
|
queryParameters['deviceId'] = requestParameters.deviceId;
|
|
}
|
|
|
|
if (requestParameters.audioCodec !== undefined) {
|
|
queryParameters['audioCodec'] = requestParameters.audioCodec;
|
|
}
|
|
|
|
if (requestParameters.enableAutoStreamCopy !== undefined) {
|
|
queryParameters['enableAutoStreamCopy'] = requestParameters.enableAutoStreamCopy;
|
|
}
|
|
|
|
if (requestParameters.allowVideoStreamCopy !== undefined) {
|
|
queryParameters['allowVideoStreamCopy'] = requestParameters.allowVideoStreamCopy;
|
|
}
|
|
|
|
if (requestParameters.allowAudioStreamCopy !== undefined) {
|
|
queryParameters['allowAudioStreamCopy'] = requestParameters.allowAudioStreamCopy;
|
|
}
|
|
|
|
if (requestParameters.breakOnNonKeyFrames !== undefined) {
|
|
queryParameters['breakOnNonKeyFrames'] = requestParameters.breakOnNonKeyFrames;
|
|
}
|
|
|
|
if (requestParameters.audioSampleRate !== undefined) {
|
|
queryParameters['audioSampleRate'] = requestParameters.audioSampleRate;
|
|
}
|
|
|
|
if (requestParameters.maxAudioBitDepth !== undefined) {
|
|
queryParameters['maxAudioBitDepth'] = requestParameters.maxAudioBitDepth;
|
|
}
|
|
|
|
if (requestParameters.audioBitRate !== undefined) {
|
|
queryParameters['audioBitRate'] = requestParameters.audioBitRate;
|
|
}
|
|
|
|
if (requestParameters.audioChannels !== undefined) {
|
|
queryParameters['audioChannels'] = requestParameters.audioChannels;
|
|
}
|
|
|
|
if (requestParameters.maxAudioChannels !== undefined) {
|
|
queryParameters['maxAudioChannels'] = requestParameters.maxAudioChannels;
|
|
}
|
|
|
|
if (requestParameters.profile !== undefined) {
|
|
queryParameters['profile'] = requestParameters.profile;
|
|
}
|
|
|
|
if (requestParameters.level !== undefined) {
|
|
queryParameters['level'] = requestParameters.level;
|
|
}
|
|
|
|
if (requestParameters.framerate !== undefined) {
|
|
queryParameters['framerate'] = requestParameters.framerate;
|
|
}
|
|
|
|
if (requestParameters.maxFramerate !== undefined) {
|
|
queryParameters['maxFramerate'] = requestParameters.maxFramerate;
|
|
}
|
|
|
|
if (requestParameters.copyTimestamps !== undefined) {
|
|
queryParameters['copyTimestamps'] = requestParameters.copyTimestamps;
|
|
}
|
|
|
|
if (requestParameters.startTimeTicks !== undefined) {
|
|
queryParameters['startTimeTicks'] = requestParameters.startTimeTicks;
|
|
}
|
|
|
|
if (requestParameters.width !== undefined) {
|
|
queryParameters['width'] = requestParameters.width;
|
|
}
|
|
|
|
if (requestParameters.height !== undefined) {
|
|
queryParameters['height'] = requestParameters.height;
|
|
}
|
|
|
|
if (requestParameters.videoBitRate !== undefined) {
|
|
queryParameters['videoBitRate'] = requestParameters.videoBitRate;
|
|
}
|
|
|
|
if (requestParameters.subtitleStreamIndex !== undefined) {
|
|
queryParameters['subtitleStreamIndex'] = requestParameters.subtitleStreamIndex;
|
|
}
|
|
|
|
if (requestParameters.subtitleMethod !== undefined) {
|
|
queryParameters['subtitleMethod'] = requestParameters.subtitleMethod;
|
|
}
|
|
|
|
if (requestParameters.maxRefFrames !== undefined) {
|
|
queryParameters['maxRefFrames'] = requestParameters.maxRefFrames;
|
|
}
|
|
|
|
if (requestParameters.maxVideoBitDepth !== undefined) {
|
|
queryParameters['maxVideoBitDepth'] = requestParameters.maxVideoBitDepth;
|
|
}
|
|
|
|
if (requestParameters.requireAvc !== undefined) {
|
|
queryParameters['requireAvc'] = requestParameters.requireAvc;
|
|
}
|
|
|
|
if (requestParameters.deInterlace !== undefined) {
|
|
queryParameters['deInterlace'] = requestParameters.deInterlace;
|
|
}
|
|
|
|
if (requestParameters.requireNonAnamorphic !== undefined) {
|
|
queryParameters['requireNonAnamorphic'] = requestParameters.requireNonAnamorphic;
|
|
}
|
|
|
|
if (requestParameters.transcodingMaxAudioChannels !== undefined) {
|
|
queryParameters['transcodingMaxAudioChannels'] = requestParameters.transcodingMaxAudioChannels;
|
|
}
|
|
|
|
if (requestParameters.cpuCoreLimit !== undefined) {
|
|
queryParameters['cpuCoreLimit'] = requestParameters.cpuCoreLimit;
|
|
}
|
|
|
|
if (requestParameters.liveStreamId !== undefined) {
|
|
queryParameters['liveStreamId'] = requestParameters.liveStreamId;
|
|
}
|
|
|
|
if (requestParameters.enableMpegtsM2TsMode !== undefined) {
|
|
queryParameters['enableMpegtsM2TsMode'] = requestParameters.enableMpegtsM2TsMode;
|
|
}
|
|
|
|
if (requestParameters.videoCodec !== undefined) {
|
|
queryParameters['videoCodec'] = requestParameters.videoCodec;
|
|
}
|
|
|
|
if (requestParameters.subtitleCodec !== undefined) {
|
|
queryParameters['subtitleCodec'] = requestParameters.subtitleCodec;
|
|
}
|
|
|
|
if (requestParameters.transcodeReasons !== undefined) {
|
|
queryParameters['transcodeReasons'] = requestParameters.transcodeReasons;
|
|
}
|
|
|
|
if (requestParameters.audioStreamIndex !== undefined) {
|
|
queryParameters['audioStreamIndex'] = requestParameters.audioStreamIndex;
|
|
}
|
|
|
|
if (requestParameters.videoStreamIndex !== undefined) {
|
|
queryParameters['videoStreamIndex'] = requestParameters.videoStreamIndex;
|
|
}
|
|
|
|
if (requestParameters.context !== undefined) {
|
|
queryParameters['context'] = requestParameters.context;
|
|
}
|
|
|
|
if (requestParameters.streamOptions !== undefined) {
|
|
queryParameters['streamOptions'] = requestParameters.streamOptions;
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
const response = await this.request({
|
|
path: `/Audio/{itemId}/stream.{container}`.replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters.itemId))).replace(`{${"container"}}`, encodeURIComponent(String(requestParameters.container))),
|
|
method: 'GET',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.BlobApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* Gets an audio stream.
|
|
*/
|
|
async getAudioStreamByContainer(requestParameters: GetAudioStreamByContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
const response = await this.getAudioStreamByContainerRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* Gets an audio stream.
|
|
*/
|
|
async headAudioStreamRaw(requestParameters: HeadAudioStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
if (requestParameters.itemId === null || requestParameters.itemId === undefined) {
|
|
throw new runtime.RequiredError('itemId','Required parameter requestParameters.itemId was null or undefined when calling headAudioStream.');
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters.container !== undefined) {
|
|
queryParameters['container'] = requestParameters.container;
|
|
}
|
|
|
|
if (requestParameters._static !== undefined) {
|
|
queryParameters['static'] = requestParameters._static;
|
|
}
|
|
|
|
if (requestParameters.params !== undefined) {
|
|
queryParameters['params'] = requestParameters.params;
|
|
}
|
|
|
|
if (requestParameters.tag !== undefined) {
|
|
queryParameters['tag'] = requestParameters.tag;
|
|
}
|
|
|
|
if (requestParameters.deviceProfileId !== undefined) {
|
|
queryParameters['deviceProfileId'] = requestParameters.deviceProfileId;
|
|
}
|
|
|
|
if (requestParameters.playSessionId !== undefined) {
|
|
queryParameters['playSessionId'] = requestParameters.playSessionId;
|
|
}
|
|
|
|
if (requestParameters.segmentContainer !== undefined) {
|
|
queryParameters['segmentContainer'] = requestParameters.segmentContainer;
|
|
}
|
|
|
|
if (requestParameters.segmentLength !== undefined) {
|
|
queryParameters['segmentLength'] = requestParameters.segmentLength;
|
|
}
|
|
|
|
if (requestParameters.minSegments !== undefined) {
|
|
queryParameters['minSegments'] = requestParameters.minSegments;
|
|
}
|
|
|
|
if (requestParameters.mediaSourceId !== undefined) {
|
|
queryParameters['mediaSourceId'] = requestParameters.mediaSourceId;
|
|
}
|
|
|
|
if (requestParameters.deviceId !== undefined) {
|
|
queryParameters['deviceId'] = requestParameters.deviceId;
|
|
}
|
|
|
|
if (requestParameters.audioCodec !== undefined) {
|
|
queryParameters['audioCodec'] = requestParameters.audioCodec;
|
|
}
|
|
|
|
if (requestParameters.enableAutoStreamCopy !== undefined) {
|
|
queryParameters['enableAutoStreamCopy'] = requestParameters.enableAutoStreamCopy;
|
|
}
|
|
|
|
if (requestParameters.allowVideoStreamCopy !== undefined) {
|
|
queryParameters['allowVideoStreamCopy'] = requestParameters.allowVideoStreamCopy;
|
|
}
|
|
|
|
if (requestParameters.allowAudioStreamCopy !== undefined) {
|
|
queryParameters['allowAudioStreamCopy'] = requestParameters.allowAudioStreamCopy;
|
|
}
|
|
|
|
if (requestParameters.breakOnNonKeyFrames !== undefined) {
|
|
queryParameters['breakOnNonKeyFrames'] = requestParameters.breakOnNonKeyFrames;
|
|
}
|
|
|
|
if (requestParameters.audioSampleRate !== undefined) {
|
|
queryParameters['audioSampleRate'] = requestParameters.audioSampleRate;
|
|
}
|
|
|
|
if (requestParameters.maxAudioBitDepth !== undefined) {
|
|
queryParameters['maxAudioBitDepth'] = requestParameters.maxAudioBitDepth;
|
|
}
|
|
|
|
if (requestParameters.audioBitRate !== undefined) {
|
|
queryParameters['audioBitRate'] = requestParameters.audioBitRate;
|
|
}
|
|
|
|
if (requestParameters.audioChannels !== undefined) {
|
|
queryParameters['audioChannels'] = requestParameters.audioChannels;
|
|
}
|
|
|
|
if (requestParameters.maxAudioChannels !== undefined) {
|
|
queryParameters['maxAudioChannels'] = requestParameters.maxAudioChannels;
|
|
}
|
|
|
|
if (requestParameters.profile !== undefined) {
|
|
queryParameters['profile'] = requestParameters.profile;
|
|
}
|
|
|
|
if (requestParameters.level !== undefined) {
|
|
queryParameters['level'] = requestParameters.level;
|
|
}
|
|
|
|
if (requestParameters.framerate !== undefined) {
|
|
queryParameters['framerate'] = requestParameters.framerate;
|
|
}
|
|
|
|
if (requestParameters.maxFramerate !== undefined) {
|
|
queryParameters['maxFramerate'] = requestParameters.maxFramerate;
|
|
}
|
|
|
|
if (requestParameters.copyTimestamps !== undefined) {
|
|
queryParameters['copyTimestamps'] = requestParameters.copyTimestamps;
|
|
}
|
|
|
|
if (requestParameters.startTimeTicks !== undefined) {
|
|
queryParameters['startTimeTicks'] = requestParameters.startTimeTicks;
|
|
}
|
|
|
|
if (requestParameters.width !== undefined) {
|
|
queryParameters['width'] = requestParameters.width;
|
|
}
|
|
|
|
if (requestParameters.height !== undefined) {
|
|
queryParameters['height'] = requestParameters.height;
|
|
}
|
|
|
|
if (requestParameters.videoBitRate !== undefined) {
|
|
queryParameters['videoBitRate'] = requestParameters.videoBitRate;
|
|
}
|
|
|
|
if (requestParameters.subtitleStreamIndex !== undefined) {
|
|
queryParameters['subtitleStreamIndex'] = requestParameters.subtitleStreamIndex;
|
|
}
|
|
|
|
if (requestParameters.subtitleMethod !== undefined) {
|
|
queryParameters['subtitleMethod'] = requestParameters.subtitleMethod;
|
|
}
|
|
|
|
if (requestParameters.maxRefFrames !== undefined) {
|
|
queryParameters['maxRefFrames'] = requestParameters.maxRefFrames;
|
|
}
|
|
|
|
if (requestParameters.maxVideoBitDepth !== undefined) {
|
|
queryParameters['maxVideoBitDepth'] = requestParameters.maxVideoBitDepth;
|
|
}
|
|
|
|
if (requestParameters.requireAvc !== undefined) {
|
|
queryParameters['requireAvc'] = requestParameters.requireAvc;
|
|
}
|
|
|
|
if (requestParameters.deInterlace !== undefined) {
|
|
queryParameters['deInterlace'] = requestParameters.deInterlace;
|
|
}
|
|
|
|
if (requestParameters.requireNonAnamorphic !== undefined) {
|
|
queryParameters['requireNonAnamorphic'] = requestParameters.requireNonAnamorphic;
|
|
}
|
|
|
|
if (requestParameters.transcodingMaxAudioChannels !== undefined) {
|
|
queryParameters['transcodingMaxAudioChannels'] = requestParameters.transcodingMaxAudioChannels;
|
|
}
|
|
|
|
if (requestParameters.cpuCoreLimit !== undefined) {
|
|
queryParameters['cpuCoreLimit'] = requestParameters.cpuCoreLimit;
|
|
}
|
|
|
|
if (requestParameters.liveStreamId !== undefined) {
|
|
queryParameters['liveStreamId'] = requestParameters.liveStreamId;
|
|
}
|
|
|
|
if (requestParameters.enableMpegtsM2TsMode !== undefined) {
|
|
queryParameters['enableMpegtsM2TsMode'] = requestParameters.enableMpegtsM2TsMode;
|
|
}
|
|
|
|
if (requestParameters.videoCodec !== undefined) {
|
|
queryParameters['videoCodec'] = requestParameters.videoCodec;
|
|
}
|
|
|
|
if (requestParameters.subtitleCodec !== undefined) {
|
|
queryParameters['subtitleCodec'] = requestParameters.subtitleCodec;
|
|
}
|
|
|
|
if (requestParameters.transcodeReasons !== undefined) {
|
|
queryParameters['transcodeReasons'] = requestParameters.transcodeReasons;
|
|
}
|
|
|
|
if (requestParameters.audioStreamIndex !== undefined) {
|
|
queryParameters['audioStreamIndex'] = requestParameters.audioStreamIndex;
|
|
}
|
|
|
|
if (requestParameters.videoStreamIndex !== undefined) {
|
|
queryParameters['videoStreamIndex'] = requestParameters.videoStreamIndex;
|
|
}
|
|
|
|
if (requestParameters.context !== undefined) {
|
|
queryParameters['context'] = requestParameters.context;
|
|
}
|
|
|
|
if (requestParameters.streamOptions !== undefined) {
|
|
queryParameters['streamOptions'] = requestParameters.streamOptions;
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
const response = await this.request({
|
|
path: `/Audio/{itemId}/stream`.replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters.itemId))),
|
|
method: 'HEAD',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.BlobApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* Gets an audio stream.
|
|
*/
|
|
async headAudioStream(requestParameters: HeadAudioStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
const response = await this.headAudioStreamRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
/**
|
|
* Gets an audio stream.
|
|
*/
|
|
async headAudioStreamByContainerRaw(requestParameters: HeadAudioStreamByContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>> {
|
|
if (requestParameters.itemId === null || requestParameters.itemId === undefined) {
|
|
throw new runtime.RequiredError('itemId','Required parameter requestParameters.itemId was null or undefined when calling headAudioStreamByContainer.');
|
|
}
|
|
|
|
if (requestParameters.container === null || requestParameters.container === undefined) {
|
|
throw new runtime.RequiredError('container','Required parameter requestParameters.container was null or undefined when calling headAudioStreamByContainer.');
|
|
}
|
|
|
|
const queryParameters: any = {};
|
|
|
|
if (requestParameters._static !== undefined) {
|
|
queryParameters['static'] = requestParameters._static;
|
|
}
|
|
|
|
if (requestParameters.params !== undefined) {
|
|
queryParameters['params'] = requestParameters.params;
|
|
}
|
|
|
|
if (requestParameters.tag !== undefined) {
|
|
queryParameters['tag'] = requestParameters.tag;
|
|
}
|
|
|
|
if (requestParameters.deviceProfileId !== undefined) {
|
|
queryParameters['deviceProfileId'] = requestParameters.deviceProfileId;
|
|
}
|
|
|
|
if (requestParameters.playSessionId !== undefined) {
|
|
queryParameters['playSessionId'] = requestParameters.playSessionId;
|
|
}
|
|
|
|
if (requestParameters.segmentContainer !== undefined) {
|
|
queryParameters['segmentContainer'] = requestParameters.segmentContainer;
|
|
}
|
|
|
|
if (requestParameters.segmentLength !== undefined) {
|
|
queryParameters['segmentLength'] = requestParameters.segmentLength;
|
|
}
|
|
|
|
if (requestParameters.minSegments !== undefined) {
|
|
queryParameters['minSegments'] = requestParameters.minSegments;
|
|
}
|
|
|
|
if (requestParameters.mediaSourceId !== undefined) {
|
|
queryParameters['mediaSourceId'] = requestParameters.mediaSourceId;
|
|
}
|
|
|
|
if (requestParameters.deviceId !== undefined) {
|
|
queryParameters['deviceId'] = requestParameters.deviceId;
|
|
}
|
|
|
|
if (requestParameters.audioCodec !== undefined) {
|
|
queryParameters['audioCodec'] = requestParameters.audioCodec;
|
|
}
|
|
|
|
if (requestParameters.enableAutoStreamCopy !== undefined) {
|
|
queryParameters['enableAutoStreamCopy'] = requestParameters.enableAutoStreamCopy;
|
|
}
|
|
|
|
if (requestParameters.allowVideoStreamCopy !== undefined) {
|
|
queryParameters['allowVideoStreamCopy'] = requestParameters.allowVideoStreamCopy;
|
|
}
|
|
|
|
if (requestParameters.allowAudioStreamCopy !== undefined) {
|
|
queryParameters['allowAudioStreamCopy'] = requestParameters.allowAudioStreamCopy;
|
|
}
|
|
|
|
if (requestParameters.breakOnNonKeyFrames !== undefined) {
|
|
queryParameters['breakOnNonKeyFrames'] = requestParameters.breakOnNonKeyFrames;
|
|
}
|
|
|
|
if (requestParameters.audioSampleRate !== undefined) {
|
|
queryParameters['audioSampleRate'] = requestParameters.audioSampleRate;
|
|
}
|
|
|
|
if (requestParameters.maxAudioBitDepth !== undefined) {
|
|
queryParameters['maxAudioBitDepth'] = requestParameters.maxAudioBitDepth;
|
|
}
|
|
|
|
if (requestParameters.audioBitRate !== undefined) {
|
|
queryParameters['audioBitRate'] = requestParameters.audioBitRate;
|
|
}
|
|
|
|
if (requestParameters.audioChannels !== undefined) {
|
|
queryParameters['audioChannels'] = requestParameters.audioChannels;
|
|
}
|
|
|
|
if (requestParameters.maxAudioChannels !== undefined) {
|
|
queryParameters['maxAudioChannels'] = requestParameters.maxAudioChannels;
|
|
}
|
|
|
|
if (requestParameters.profile !== undefined) {
|
|
queryParameters['profile'] = requestParameters.profile;
|
|
}
|
|
|
|
if (requestParameters.level !== undefined) {
|
|
queryParameters['level'] = requestParameters.level;
|
|
}
|
|
|
|
if (requestParameters.framerate !== undefined) {
|
|
queryParameters['framerate'] = requestParameters.framerate;
|
|
}
|
|
|
|
if (requestParameters.maxFramerate !== undefined) {
|
|
queryParameters['maxFramerate'] = requestParameters.maxFramerate;
|
|
}
|
|
|
|
if (requestParameters.copyTimestamps !== undefined) {
|
|
queryParameters['copyTimestamps'] = requestParameters.copyTimestamps;
|
|
}
|
|
|
|
if (requestParameters.startTimeTicks !== undefined) {
|
|
queryParameters['startTimeTicks'] = requestParameters.startTimeTicks;
|
|
}
|
|
|
|
if (requestParameters.width !== undefined) {
|
|
queryParameters['width'] = requestParameters.width;
|
|
}
|
|
|
|
if (requestParameters.height !== undefined) {
|
|
queryParameters['height'] = requestParameters.height;
|
|
}
|
|
|
|
if (requestParameters.videoBitRate !== undefined) {
|
|
queryParameters['videoBitRate'] = requestParameters.videoBitRate;
|
|
}
|
|
|
|
if (requestParameters.subtitleStreamIndex !== undefined) {
|
|
queryParameters['subtitleStreamIndex'] = requestParameters.subtitleStreamIndex;
|
|
}
|
|
|
|
if (requestParameters.subtitleMethod !== undefined) {
|
|
queryParameters['subtitleMethod'] = requestParameters.subtitleMethod;
|
|
}
|
|
|
|
if (requestParameters.maxRefFrames !== undefined) {
|
|
queryParameters['maxRefFrames'] = requestParameters.maxRefFrames;
|
|
}
|
|
|
|
if (requestParameters.maxVideoBitDepth !== undefined) {
|
|
queryParameters['maxVideoBitDepth'] = requestParameters.maxVideoBitDepth;
|
|
}
|
|
|
|
if (requestParameters.requireAvc !== undefined) {
|
|
queryParameters['requireAvc'] = requestParameters.requireAvc;
|
|
}
|
|
|
|
if (requestParameters.deInterlace !== undefined) {
|
|
queryParameters['deInterlace'] = requestParameters.deInterlace;
|
|
}
|
|
|
|
if (requestParameters.requireNonAnamorphic !== undefined) {
|
|
queryParameters['requireNonAnamorphic'] = requestParameters.requireNonAnamorphic;
|
|
}
|
|
|
|
if (requestParameters.transcodingMaxAudioChannels !== undefined) {
|
|
queryParameters['transcodingMaxAudioChannels'] = requestParameters.transcodingMaxAudioChannels;
|
|
}
|
|
|
|
if (requestParameters.cpuCoreLimit !== undefined) {
|
|
queryParameters['cpuCoreLimit'] = requestParameters.cpuCoreLimit;
|
|
}
|
|
|
|
if (requestParameters.liveStreamId !== undefined) {
|
|
queryParameters['liveStreamId'] = requestParameters.liveStreamId;
|
|
}
|
|
|
|
if (requestParameters.enableMpegtsM2TsMode !== undefined) {
|
|
queryParameters['enableMpegtsM2TsMode'] = requestParameters.enableMpegtsM2TsMode;
|
|
}
|
|
|
|
if (requestParameters.videoCodec !== undefined) {
|
|
queryParameters['videoCodec'] = requestParameters.videoCodec;
|
|
}
|
|
|
|
if (requestParameters.subtitleCodec !== undefined) {
|
|
queryParameters['subtitleCodec'] = requestParameters.subtitleCodec;
|
|
}
|
|
|
|
if (requestParameters.transcodeReasons !== undefined) {
|
|
queryParameters['transcodeReasons'] = requestParameters.transcodeReasons;
|
|
}
|
|
|
|
if (requestParameters.audioStreamIndex !== undefined) {
|
|
queryParameters['audioStreamIndex'] = requestParameters.audioStreamIndex;
|
|
}
|
|
|
|
if (requestParameters.videoStreamIndex !== undefined) {
|
|
queryParameters['videoStreamIndex'] = requestParameters.videoStreamIndex;
|
|
}
|
|
|
|
if (requestParameters.context !== undefined) {
|
|
queryParameters['context'] = requestParameters.context;
|
|
}
|
|
|
|
if (requestParameters.streamOptions !== undefined) {
|
|
queryParameters['streamOptions'] = requestParameters.streamOptions;
|
|
}
|
|
|
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
|
|
const response = await this.request({
|
|
path: `/Audio/{itemId}/stream.{container}`.replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters.itemId))).replace(`{${"container"}}`, encodeURIComponent(String(requestParameters.container))),
|
|
method: 'HEAD',
|
|
headers: headerParameters,
|
|
query: queryParameters,
|
|
}, initOverrides);
|
|
|
|
return new runtime.BlobApiResponse(response);
|
|
}
|
|
|
|
/**
|
|
* Gets an audio stream.
|
|
*/
|
|
async headAudioStreamByContainer(requestParameters: HeadAudioStreamByContainerRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
|
|
const response = await this.headAudioStreamByContainerRaw(requestParameters, initOverrides);
|
|
return await response.value();
|
|
}
|
|
|
|
}
|