jellyfin-discord-bot/server/jellyfin/apis/DynamicHlsApi.ts

2673 lines
99 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 GetHlsAudioSegmentRequest {
itemId: string;
playlistId: string;
segmentId: number;
container: string;
runtimeTicks: number;
actualSegmentLengthTicks: number;
_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;
maxStreamingBitrate?: 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 GetHlsVideoSegmentRequest {
itemId: string;
playlistId: string;
segmentId: number;
container: string;
runtimeTicks: number;
actualSegmentLengthTicks: number;
_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;
maxWidth?: number;
maxHeight?: 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 GetLiveHlsStreamRequest {
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; };
maxWidth?: number;
maxHeight?: number;
enableSubtitlesInManifest?: boolean;
}
export interface GetMasterHlsAudioPlaylistRequest {
itemId: string;
mediaSourceId: string;
_static?: boolean;
params?: string;
tag?: string;
deviceProfileId?: string;
playSessionId?: string;
segmentContainer?: string;
segmentLength?: number;
minSegments?: number;
deviceId?: string;
audioCodec?: string;
enableAutoStreamCopy?: boolean;
allowVideoStreamCopy?: boolean;
allowAudioStreamCopy?: boolean;
breakOnNonKeyFrames?: boolean;
audioSampleRate?: number;
maxAudioBitDepth?: number;
maxStreamingBitrate?: 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; };
enableAdaptiveBitrateStreaming?: boolean;
}
export interface GetMasterHlsVideoPlaylistRequest {
itemId: string;
mediaSourceId: string;
_static?: boolean;
params?: string;
tag?: string;
deviceProfileId?: string;
playSessionId?: string;
segmentContainer?: string;
segmentLength?: number;
minSegments?: number;
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;
maxWidth?: number;
maxHeight?: 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; };
enableAdaptiveBitrateStreaming?: boolean;
}
export interface GetVariantHlsAudioPlaylistRequest {
itemId: 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;
maxStreamingBitrate?: 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 GetVariantHlsVideoPlaylistRequest {
itemId: 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;
maxWidth?: number;
maxHeight?: 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 HeadMasterHlsAudioPlaylistRequest {
itemId: string;
mediaSourceId: string;
_static?: boolean;
params?: string;
tag?: string;
deviceProfileId?: string;
playSessionId?: string;
segmentContainer?: string;
segmentLength?: number;
minSegments?: number;
deviceId?: string;
audioCodec?: string;
enableAutoStreamCopy?: boolean;
allowVideoStreamCopy?: boolean;
allowAudioStreamCopy?: boolean;
breakOnNonKeyFrames?: boolean;
audioSampleRate?: number;
maxAudioBitDepth?: number;
maxStreamingBitrate?: 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; };
enableAdaptiveBitrateStreaming?: boolean;
}
export interface HeadMasterHlsVideoPlaylistRequest {
itemId: string;
mediaSourceId: string;
_static?: boolean;
params?: string;
tag?: string;
deviceProfileId?: string;
playSessionId?: string;
segmentContainer?: string;
segmentLength?: number;
minSegments?: number;
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;
maxWidth?: number;
maxHeight?: 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; };
enableAdaptiveBitrateStreaming?: boolean;
}
/**
*
*/
export class DynamicHlsApi extends runtime.BaseAPI {
/**
* Gets a video stream using HTTP live streaming.
*/
async getHlsAudioSegmentRaw(requestParameters: GetHlsAudioSegmentRequest, 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 getHlsAudioSegment.');
}
if (requestParameters.playlistId === null || requestParameters.playlistId === undefined) {
throw new runtime.RequiredError('playlistId','Required parameter requestParameters.playlistId was null or undefined when calling getHlsAudioSegment.');
}
if (requestParameters.segmentId === null || requestParameters.segmentId === undefined) {
throw new runtime.RequiredError('segmentId','Required parameter requestParameters.segmentId was null or undefined when calling getHlsAudioSegment.');
}
if (requestParameters.container === null || requestParameters.container === undefined) {
throw new runtime.RequiredError('container','Required parameter requestParameters.container was null or undefined when calling getHlsAudioSegment.');
}
if (requestParameters.runtimeTicks === null || requestParameters.runtimeTicks === undefined) {
throw new runtime.RequiredError('runtimeTicks','Required parameter requestParameters.runtimeTicks was null or undefined when calling getHlsAudioSegment.');
}
if (requestParameters.actualSegmentLengthTicks === null || requestParameters.actualSegmentLengthTicks === undefined) {
throw new runtime.RequiredError('actualSegmentLengthTicks','Required parameter requestParameters.actualSegmentLengthTicks was null or undefined when calling getHlsAudioSegment.');
}
const queryParameters: any = {};
if (requestParameters.runtimeTicks !== undefined) {
queryParameters['runtimeTicks'] = requestParameters.runtimeTicks;
}
if (requestParameters.actualSegmentLengthTicks !== undefined) {
queryParameters['actualSegmentLengthTicks'] = requestParameters.actualSegmentLengthTicks;
}
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.maxStreamingBitrate !== undefined) {
queryParameters['maxStreamingBitrate'] = requestParameters.maxStreamingBitrate;
}
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 = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Audio/{itemId}/hls1/{playlistId}/{segmentId}.{container}`.replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters.itemId))).replace(`{${"playlistId"}}`, encodeURIComponent(String(requestParameters.playlistId))).replace(`{${"segmentId"}}`, encodeURIComponent(String(requestParameters.segmentId))).replace(`{${"container"}}`, encodeURIComponent(String(requestParameters.container))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.BlobApiResponse(response);
}
/**
* Gets a video stream using HTTP live streaming.
*/
async getHlsAudioSegment(requestParameters: GetHlsAudioSegmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
const response = await this.getHlsAudioSegmentRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets a video stream using HTTP live streaming.
*/
async getHlsVideoSegmentRaw(requestParameters: GetHlsVideoSegmentRequest, 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 getHlsVideoSegment.');
}
if (requestParameters.playlistId === null || requestParameters.playlistId === undefined) {
throw new runtime.RequiredError('playlistId','Required parameter requestParameters.playlistId was null or undefined when calling getHlsVideoSegment.');
}
if (requestParameters.segmentId === null || requestParameters.segmentId === undefined) {
throw new runtime.RequiredError('segmentId','Required parameter requestParameters.segmentId was null or undefined when calling getHlsVideoSegment.');
}
if (requestParameters.container === null || requestParameters.container === undefined) {
throw new runtime.RequiredError('container','Required parameter requestParameters.container was null or undefined when calling getHlsVideoSegment.');
}
if (requestParameters.runtimeTicks === null || requestParameters.runtimeTicks === undefined) {
throw new runtime.RequiredError('runtimeTicks','Required parameter requestParameters.runtimeTicks was null or undefined when calling getHlsVideoSegment.');
}
if (requestParameters.actualSegmentLengthTicks === null || requestParameters.actualSegmentLengthTicks === undefined) {
throw new runtime.RequiredError('actualSegmentLengthTicks','Required parameter requestParameters.actualSegmentLengthTicks was null or undefined when calling getHlsVideoSegment.');
}
const queryParameters: any = {};
if (requestParameters.runtimeTicks !== undefined) {
queryParameters['runtimeTicks'] = requestParameters.runtimeTicks;
}
if (requestParameters.actualSegmentLengthTicks !== undefined) {
queryParameters['actualSegmentLengthTicks'] = requestParameters.actualSegmentLengthTicks;
}
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.maxWidth !== undefined) {
queryParameters['maxWidth'] = requestParameters.maxWidth;
}
if (requestParameters.maxHeight !== undefined) {
queryParameters['maxHeight'] = requestParameters.maxHeight;
}
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 = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Videos/{itemId}/hls1/{playlistId}/{segmentId}.{container}`.replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters.itemId))).replace(`{${"playlistId"}}`, encodeURIComponent(String(requestParameters.playlistId))).replace(`{${"segmentId"}}`, encodeURIComponent(String(requestParameters.segmentId))).replace(`{${"container"}}`, encodeURIComponent(String(requestParameters.container))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.BlobApiResponse(response);
}
/**
* Gets a video stream using HTTP live streaming.
*/
async getHlsVideoSegment(requestParameters: GetHlsVideoSegmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
const response = await this.getHlsVideoSegmentRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets a hls live stream.
*/
async getLiveHlsStreamRaw(requestParameters: GetLiveHlsStreamRequest, 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 getLiveHlsStream.');
}
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;
}
if (requestParameters.maxWidth !== undefined) {
queryParameters['maxWidth'] = requestParameters.maxWidth;
}
if (requestParameters.maxHeight !== undefined) {
queryParameters['maxHeight'] = requestParameters.maxHeight;
}
if (requestParameters.enableSubtitlesInManifest !== undefined) {
queryParameters['enableSubtitlesInManifest'] = requestParameters.enableSubtitlesInManifest;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Videos/{itemId}/live.m3u8`.replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters.itemId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.BlobApiResponse(response);
}
/**
* Gets a hls live stream.
*/
async getLiveHlsStream(requestParameters: GetLiveHlsStreamRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
const response = await this.getLiveHlsStreamRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets an audio hls playlist stream.
*/
async getMasterHlsAudioPlaylistRaw(requestParameters: GetMasterHlsAudioPlaylistRequest, 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 getMasterHlsAudioPlaylist.');
}
if (requestParameters.mediaSourceId === null || requestParameters.mediaSourceId === undefined) {
throw new runtime.RequiredError('mediaSourceId','Required parameter requestParameters.mediaSourceId was null or undefined when calling getMasterHlsAudioPlaylist.');
}
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.maxStreamingBitrate !== undefined) {
queryParameters['maxStreamingBitrate'] = requestParameters.maxStreamingBitrate;
}
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;
}
if (requestParameters.enableAdaptiveBitrateStreaming !== undefined) {
queryParameters['enableAdaptiveBitrateStreaming'] = requestParameters.enableAdaptiveBitrateStreaming;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Audio/{itemId}/master.m3u8`.replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters.itemId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.BlobApiResponse(response);
}
/**
* Gets an audio hls playlist stream.
*/
async getMasterHlsAudioPlaylist(requestParameters: GetMasterHlsAudioPlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
const response = await this.getMasterHlsAudioPlaylistRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets a video hls playlist stream.
*/
async getMasterHlsVideoPlaylistRaw(requestParameters: GetMasterHlsVideoPlaylistRequest, 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 getMasterHlsVideoPlaylist.');
}
if (requestParameters.mediaSourceId === null || requestParameters.mediaSourceId === undefined) {
throw new runtime.RequiredError('mediaSourceId','Required parameter requestParameters.mediaSourceId was null or undefined when calling getMasterHlsVideoPlaylist.');
}
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.maxWidth !== undefined) {
queryParameters['maxWidth'] = requestParameters.maxWidth;
}
if (requestParameters.maxHeight !== undefined) {
queryParameters['maxHeight'] = requestParameters.maxHeight;
}
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;
}
if (requestParameters.enableAdaptiveBitrateStreaming !== undefined) {
queryParameters['enableAdaptiveBitrateStreaming'] = requestParameters.enableAdaptiveBitrateStreaming;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Videos/{itemId}/master.m3u8`.replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters.itemId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.BlobApiResponse(response);
}
/**
* Gets a video hls playlist stream.
*/
async getMasterHlsVideoPlaylist(requestParameters: GetMasterHlsVideoPlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
const response = await this.getMasterHlsVideoPlaylistRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets an audio stream using HTTP live streaming.
*/
async getVariantHlsAudioPlaylistRaw(requestParameters: GetVariantHlsAudioPlaylistRequest, 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 getVariantHlsAudioPlaylist.');
}
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.maxStreamingBitrate !== undefined) {
queryParameters['maxStreamingBitrate'] = requestParameters.maxStreamingBitrate;
}
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 = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Audio/{itemId}/main.m3u8`.replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters.itemId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.BlobApiResponse(response);
}
/**
* Gets an audio stream using HTTP live streaming.
*/
async getVariantHlsAudioPlaylist(requestParameters: GetVariantHlsAudioPlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
const response = await this.getVariantHlsAudioPlaylistRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets a video stream using HTTP live streaming.
*/
async getVariantHlsVideoPlaylistRaw(requestParameters: GetVariantHlsVideoPlaylistRequest, 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 getVariantHlsVideoPlaylist.');
}
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.maxWidth !== undefined) {
queryParameters['maxWidth'] = requestParameters.maxWidth;
}
if (requestParameters.maxHeight !== undefined) {
queryParameters['maxHeight'] = requestParameters.maxHeight;
}
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 = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Videos/{itemId}/main.m3u8`.replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters.itemId))),
method: 'GET',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.BlobApiResponse(response);
}
/**
* Gets a video stream using HTTP live streaming.
*/
async getVariantHlsVideoPlaylist(requestParameters: GetVariantHlsVideoPlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
const response = await this.getVariantHlsVideoPlaylistRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets an audio hls playlist stream.
*/
async headMasterHlsAudioPlaylistRaw(requestParameters: HeadMasterHlsAudioPlaylistRequest, 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 headMasterHlsAudioPlaylist.');
}
if (requestParameters.mediaSourceId === null || requestParameters.mediaSourceId === undefined) {
throw new runtime.RequiredError('mediaSourceId','Required parameter requestParameters.mediaSourceId was null or undefined when calling headMasterHlsAudioPlaylist.');
}
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.maxStreamingBitrate !== undefined) {
queryParameters['maxStreamingBitrate'] = requestParameters.maxStreamingBitrate;
}
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;
}
if (requestParameters.enableAdaptiveBitrateStreaming !== undefined) {
queryParameters['enableAdaptiveBitrateStreaming'] = requestParameters.enableAdaptiveBitrateStreaming;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Audio/{itemId}/master.m3u8`.replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters.itemId))),
method: 'HEAD',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.BlobApiResponse(response);
}
/**
* Gets an audio hls playlist stream.
*/
async headMasterHlsAudioPlaylist(requestParameters: HeadMasterHlsAudioPlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
const response = await this.headMasterHlsAudioPlaylistRaw(requestParameters, initOverrides);
return await response.value();
}
/**
* Gets a video hls playlist stream.
*/
async headMasterHlsVideoPlaylistRaw(requestParameters: HeadMasterHlsVideoPlaylistRequest, 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 headMasterHlsVideoPlaylist.');
}
if (requestParameters.mediaSourceId === null || requestParameters.mediaSourceId === undefined) {
throw new runtime.RequiredError('mediaSourceId','Required parameter requestParameters.mediaSourceId was null or undefined when calling headMasterHlsVideoPlaylist.');
}
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.maxWidth !== undefined) {
queryParameters['maxWidth'] = requestParameters.maxWidth;
}
if (requestParameters.maxHeight !== undefined) {
queryParameters['maxHeight'] = requestParameters.maxHeight;
}
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;
}
if (requestParameters.enableAdaptiveBitrateStreaming !== undefined) {
queryParameters['enableAdaptiveBitrateStreaming'] = requestParameters.enableAdaptiveBitrateStreaming;
}
const headerParameters: runtime.HTTPHeaders = {};
if (this.configuration && this.configuration.apiKey) {
headerParameters["Authorization"] = this.configuration.apiKey("Authorization"); // CustomAuthentication authentication
}
const response = await this.request({
path: `/Videos/{itemId}/master.m3u8`.replace(`{${"itemId"}}`, encodeURIComponent(String(requestParameters.itemId))),
method: 'HEAD',
headers: headerParameters,
query: queryParameters,
}, initOverrides);
return new runtime.BlobApiResponse(response);
}
/**
* Gets a video hls playlist stream.
*/
async headMasterHlsVideoPlaylist(requestParameters: HeadMasterHlsVideoPlaylistRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob> {
const response = await this.headMasterHlsVideoPlaylistRaw(requestParameters, initOverrides);
return await response.value();
}
}