jellyflood/JellyfinPlayer/Swaggers/APIs/VideosAPI.swift

2153 lines
122 KiB
Swift

//
// VideosAPI.swift
//
// Generated by swagger-codegen
// https://github.com/swagger-api/swagger-codegen
//
import Foundation
import Alamofire
open class VideosAPI {
/**
Removes alternate video sources.
- parameter itemId: (path) The item id.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func deleteAlternateSources(itemId: UUID, completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
deleteAlternateSourcesWithRequestBuilder(itemId: itemId).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Removes alternate video sources.
- DELETE /Videos/{itemId}/AlternateSources
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter itemId: (path) The item id.
- returns: RequestBuilder<Void>
*/
open class func deleteAlternateSourcesWithRequestBuilder(itemId: UUID) -> RequestBuilder<Void> {
var path = "/Videos/{itemId}/AlternateSources"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
let url = URLComponents(string: URLString)
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "DELETE", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets additional parts for a video.
- parameter itemId: (path) The item id.
- parameter userId: (query) Optional. Filter by user id, and attach user data. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getAdditionalPart(itemId: UUID, userId: UUID? = nil, completion: @escaping ((_ data: BaseItemDtoQueryResult?,_ error: Error?) -> Void)) {
getAdditionalPartWithRequestBuilder(itemId: itemId, userId: userId).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets additional parts for a video.
- GET /Videos/{itemId}/AdditionalParts
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- examples: [{contentType=application/json, example={
"TotalRecordCount" : 7,
"StartIndex" : 5,
"Items" : [ {
"SeasonName" : "SeasonName",
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"CriticRating" : 9.018348,
"AirTime" : "AirTime",
"Studios" : [ {
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Name" : "Name"
}, {
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Name" : "Name"
} ],
"CameraMake" : "CameraMake",
"Aperture" : 1.041444916118296,
"ChannelPrimaryImageTag" : "ChannelPrimaryImageTag",
"ExtraType" : "ExtraType",
"ParentBackdropItemId" : "ParentBackdropItemId",
"Etag" : "Etag",
"ParentLogoImageTag" : "ParentLogoImageTag",
"ExposureTime" : 6.628464275087742,
"IsoType" : "",
"MediaType" : "MediaType",
"Tags" : [ "Tags", "Tags" ],
"ImageBlurHashes" : {
"Art" : {
"key" : "Art"
},
"Banner" : {
"key" : "Banner"
},
"Thumb" : {
"key" : "Thumb"
},
"Chapter" : {
"key" : "Chapter"
},
"BoxRear" : {
"key" : "BoxRear"
},
"Box" : {
"key" : "Box"
},
"Profile" : {
"key" : "Profile"
},
"Logo" : {
"key" : "Logo"
},
"Disc" : {
"key" : "Disc"
},
"Primary" : {
"key" : "Primary"
},
"Screenshot" : {
"key" : "Screenshot"
},
"Backdrop" : {
"key" : "Backdrop"
},
"Menu" : {
"key" : "Menu"
}
},
"Status" : "Status",
"IndexNumberEnd" : 6,
"ArtistItems" : [ null, null ],
"MediaSources" : [ {
"EncoderPath" : "EncoderPath",
"RequiredHttpHeaders" : {
"key" : "RequiredHttpHeaders"
},
"RunTimeTicks" : 5,
"MediaStreams" : [ {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
}, {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
} ],
"Size" : 5,
"Video3DFormat" : "",
"BufferMs" : 2,
"Timestamp" : "",
"Name" : "Name",
"RequiresOpening" : true,
"SupportsDirectStream" : true,
"VideoType" : "",
"RequiresClosing" : true,
"Container" : "Container",
"IsoType" : "",
"LiveStreamId" : "LiveStreamId",
"RequiresLooping" : true,
"Protocol" : "",
"DefaultSubtitleStreamIndex" : 8,
"GenPtsInput" : true,
"IsInfiniteStream" : true,
"Path" : "Path",
"IsRemote" : true,
"EncoderProtocol" : "",
"IgnoreIndex" : true,
"SupportsDirectPlay" : true,
"TranscodingSubProtocol" : "TranscodingSubProtocol",
"Formats" : [ "Formats", "Formats" ],
"AnalyzeDurationMs" : 9,
"Bitrate" : 9,
"OpenToken" : "OpenToken",
"SupportsProbing" : true,
"Type" : "",
"MediaAttachments" : [ {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
}, {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
} ],
"ReadAtNativeFramerate" : true,
"ETag" : "ETag",
"TranscodingContainer" : "TranscodingContainer",
"IgnoreDts" : true,
"TranscodingUrl" : "TranscodingUrl",
"Id" : "Id",
"SupportsTranscoding" : true,
"DefaultAudioStreamIndex" : 6
}, {
"EncoderPath" : "EncoderPath",
"RequiredHttpHeaders" : {
"key" : "RequiredHttpHeaders"
},
"RunTimeTicks" : 5,
"MediaStreams" : [ {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
}, {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
} ],
"Size" : 5,
"Video3DFormat" : "",
"BufferMs" : 2,
"Timestamp" : "",
"Name" : "Name",
"RequiresOpening" : true,
"SupportsDirectStream" : true,
"VideoType" : "",
"RequiresClosing" : true,
"Container" : "Container",
"IsoType" : "",
"LiveStreamId" : "LiveStreamId",
"RequiresLooping" : true,
"Protocol" : "",
"DefaultSubtitleStreamIndex" : 8,
"GenPtsInput" : true,
"IsInfiniteStream" : true,
"Path" : "Path",
"IsRemote" : true,
"EncoderProtocol" : "",
"IgnoreIndex" : true,
"SupportsDirectPlay" : true,
"TranscodingSubProtocol" : "TranscodingSubProtocol",
"Formats" : [ "Formats", "Formats" ],
"AnalyzeDurationMs" : 9,
"Bitrate" : 9,
"OpenToken" : "OpenToken",
"SupportsProbing" : true,
"Type" : "",
"MediaAttachments" : [ {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
}, {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
} ],
"ReadAtNativeFramerate" : true,
"ETag" : "ETag",
"TranscodingContainer" : "TranscodingContainer",
"IgnoreDts" : true,
"TranscodingUrl" : "TranscodingUrl",
"Id" : "Id",
"SupportsTranscoding" : true,
"DefaultAudioStreamIndex" : 6
} ],
"GenreItems" : [ null, null ],
"OfficialRating" : "OfficialRating",
"ProgramCount" : 7,
"ProgramId" : "ProgramId",
"Longitude" : 9.132027271330688,
"LockData" : true,
"FocalLength" : 4.258773108174356,
"IsNews" : true,
"ShutterSpeed" : 4.678947989005849,
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"IsFolder" : true,
"SeriesTimerId" : "SeriesTimerId",
"SeriesId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"MediaStreams" : [ null, null ],
"IsPlaceHolder" : true,
"CanDownload" : true,
"SeriesCount" : 8,
"IsMovie" : true,
"DateLastMediaAdded" : "2000-01-23T04:56:07.000+00:00",
"ParentArtImageTag" : "ParentArtImageTag",
"PlayAccess" : "",
"SeriesStudio" : "SeriesStudio",
"IsLive" : true,
"Width" : 4,
"ExternalUrls" : [ {
"Url" : "Url",
"Name" : "Name"
}, {
"Url" : "Url",
"Name" : "Name"
} ],
"RecursiveItemCount" : 6,
"Path" : "Path",
"ParentId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"MusicVideoCount" : 3,
"ScreenshotImageTags" : [ "ScreenshotImageTags", "ScreenshotImageTags" ],
"EpisodeCount" : 3,
"IsSeries" : true,
"ProductionLocations" : [ "ProductionLocations", "ProductionLocations" ],
"ParentPrimaryImageItemId" : "ParentPrimaryImageItemId",
"EndDate" : "2000-01-23T04:56:07.000+00:00",
"SeriesPrimaryImageTag" : "SeriesPrimaryImageTag",
"ParentThumbItemId" : "ParentThumbItemId",
"PreferredMetadataLanguage" : "PreferredMetadataLanguage",
"Type" : "Type",
"BackdropImageTags" : [ "BackdropImageTags", "BackdropImageTags" ],
"ParentBackdropImageTags" : [ "ParentBackdropImageTags", "ParentBackdropImageTags" ],
"AirsBeforeEpisodeNumber" : 1,
"ChildCount" : 3,
"Audio" : "",
"Artists" : [ "Artists", "Artists" ],
"ChannelType" : "",
"RunTimeTicks" : 6,
"AlbumPrimaryImageTag" : "AlbumPrimaryImageTag",
"Video3DFormat" : "",
"CumulativeRunTimeTicks" : 3,
"SourceType" : "SourceType",
"CanDelete" : true,
"PlaylistItemId" : "PlaylistItemId",
"DisplayPreferencesId" : "DisplayPreferencesId",
"Album" : "Album",
"Latitude" : 7.260521264802104,
"SortName" : "SortName",
"ArtistCount" : 5,
"Name" : "Name",
"StartDate" : "2000-01-23T04:56:07.000+00:00",
"Container" : "Container",
"ProductionYear" : 1,
"SeriesName" : "SeriesName",
"ParentArtItemId" : "ParentArtItemId",
"AlbumId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"SupportsSync" : true,
"LocalTrailerCount" : 5,
"IndexNumber" : 2,
"CompletionPercentage" : 0.5199002018724985,
"Genres" : [ "Genres", "Genres" ],
"SeasonId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"LockedFields" : [ "Cast", "Cast" ],
"ParentPrimaryImageTag" : "ParentPrimaryImageTag",
"ProviderIds" : {
"key" : "ProviderIds"
},
"RemoteTrailers" : [ {
"Url" : "Url",
"Name" : "Name"
}, {
"Url" : "Url",
"Name" : "Name"
} ],
"MediaSourceCount" : 7,
"CustomRating" : "CustomRating",
"AirsAfterSeasonNumber" : 6,
"AirDays" : [ "Sunday", "Sunday" ],
"ParentLogoItemId" : "ParentLogoItemId",
"PartCount" : 0,
"ChannelName" : "ChannelName",
"EpisodeTitle" : "EpisodeTitle",
"IsoSpeedRating" : 9,
"CommunityRating" : 6.4384236,
"Software" : "Software",
"Chapters" : [ {
"StartPositionTicks" : 6,
"ImageTag" : "ImageTag",
"ImageDateModified" : "2000-01-23T04:56:07.000+00:00",
"ImagePath" : "ImagePath",
"Name" : "Name"
}, {
"StartPositionTicks" : 6,
"ImageTag" : "ImageTag",
"ImageDateModified" : "2000-01-23T04:56:07.000+00:00",
"ImagePath" : "ImagePath",
"Name" : "Name"
} ],
"SongCount" : 3,
"Taglines" : [ "Taglines", "Taglines" ],
"AirsBeforeSeasonNumber" : 0,
"PreferredMetadataCountryCode" : "PreferredMetadataCountryCode",
"CameraModel" : "CameraModel",
"ChannelNumber" : "ChannelNumber",
"UserData" : "",
"TimerId" : "TimerId",
"DateCreated" : "2000-01-23T04:56:07.000+00:00",
"HasSubtitles" : true,
"ParentThumbImageTag" : "ParentThumbImageTag",
"IsSports" : true,
"ChannelId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"ParentIndexNumber" : 6,
"VideoType" : "",
"AlbumArtists" : [ null, null ],
"ServerId" : "ServerId",
"Number" : "Number",
"AlbumCount" : 7,
"IsRepeat" : true,
"CollectionType" : "CollectionType",
"PrimaryImageAspectRatio" : 7.143538047012306,
"Height" : 0,
"IsKids" : true,
"DisplayOrder" : "DisplayOrder",
"IsHD" : true,
"EnableMediaSourceDisplay" : true,
"SeriesThumbImageTag" : "SeriesThumbImageTag",
"MovieCount" : 4,
"People" : [ {
"Role" : "Role",
"Type" : "Type",
"PrimaryImageTag" : "PrimaryImageTag",
"Id" : "Id",
"Name" : "Name",
"ImageBlurHashes" : {
"Art" : {
"key" : "Art"
},
"Banner" : {
"key" : "Banner"
},
"Thumb" : {
"key" : "Thumb"
},
"Chapter" : {
"key" : "Chapter"
},
"BoxRear" : {
"key" : "BoxRear"
},
"Box" : {
"key" : "Box"
},
"Profile" : {
"key" : "Profile"
},
"Logo" : {
"key" : "Logo"
},
"Disc" : {
"key" : "Disc"
},
"Primary" : {
"key" : "Primary"
},
"Screenshot" : {
"key" : "Screenshot"
},
"Backdrop" : {
"key" : "Backdrop"
},
"Menu" : {
"key" : "Menu"
}
}
}, {
"Role" : "Role",
"Type" : "Type",
"PrimaryImageTag" : "PrimaryImageTag",
"Id" : "Id",
"Name" : "Name",
"ImageBlurHashes" : {
"Art" : {
"key" : "Art"
},
"Banner" : {
"key" : "Banner"
},
"Thumb" : {
"key" : "Thumb"
},
"Chapter" : {
"key" : "Chapter"
},
"BoxRear" : {
"key" : "BoxRear"
},
"Box" : {
"key" : "Box"
},
"Profile" : {
"key" : "Profile"
},
"Logo" : {
"key" : "Logo"
},
"Disc" : {
"key" : "Disc"
},
"Primary" : {
"key" : "Primary"
},
"Screenshot" : {
"key" : "Screenshot"
},
"Backdrop" : {
"key" : "Backdrop"
},
"Menu" : {
"key" : "Menu"
}
}
} ],
"Overview" : "Overview",
"SpecialFeatureCount" : 3,
"ImageOrientation" : "",
"AlbumArtist" : "AlbumArtist",
"ImageTags" : {
"key" : "ImageTags"
},
"AspectRatio" : "AspectRatio",
"TrailerCount" : 0,
"OriginalTitle" : "OriginalTitle",
"ForcedSortName" : "ForcedSortName",
"CurrentProgram" : "",
"LocationType" : "",
"IsPremiere" : true,
"Altitude" : 0.8774076871421566
}, {
"SeasonName" : "SeasonName",
"PremiereDate" : "2000-01-23T04:56:07.000+00:00",
"CriticRating" : 9.018348,
"AirTime" : "AirTime",
"Studios" : [ {
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Name" : "Name"
}, {
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"Name" : "Name"
} ],
"CameraMake" : "CameraMake",
"Aperture" : 1.041444916118296,
"ChannelPrimaryImageTag" : "ChannelPrimaryImageTag",
"ExtraType" : "ExtraType",
"ParentBackdropItemId" : "ParentBackdropItemId",
"Etag" : "Etag",
"ParentLogoImageTag" : "ParentLogoImageTag",
"ExposureTime" : 6.628464275087742,
"IsoType" : "",
"MediaType" : "MediaType",
"Tags" : [ "Tags", "Tags" ],
"ImageBlurHashes" : {
"Art" : {
"key" : "Art"
},
"Banner" : {
"key" : "Banner"
},
"Thumb" : {
"key" : "Thumb"
},
"Chapter" : {
"key" : "Chapter"
},
"BoxRear" : {
"key" : "BoxRear"
},
"Box" : {
"key" : "Box"
},
"Profile" : {
"key" : "Profile"
},
"Logo" : {
"key" : "Logo"
},
"Disc" : {
"key" : "Disc"
},
"Primary" : {
"key" : "Primary"
},
"Screenshot" : {
"key" : "Screenshot"
},
"Backdrop" : {
"key" : "Backdrop"
},
"Menu" : {
"key" : "Menu"
}
},
"Status" : "Status",
"IndexNumberEnd" : 6,
"ArtistItems" : [ null, null ],
"MediaSources" : [ {
"EncoderPath" : "EncoderPath",
"RequiredHttpHeaders" : {
"key" : "RequiredHttpHeaders"
},
"RunTimeTicks" : 5,
"MediaStreams" : [ {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
}, {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
} ],
"Size" : 5,
"Video3DFormat" : "",
"BufferMs" : 2,
"Timestamp" : "",
"Name" : "Name",
"RequiresOpening" : true,
"SupportsDirectStream" : true,
"VideoType" : "",
"RequiresClosing" : true,
"Container" : "Container",
"IsoType" : "",
"LiveStreamId" : "LiveStreamId",
"RequiresLooping" : true,
"Protocol" : "",
"DefaultSubtitleStreamIndex" : 8,
"GenPtsInput" : true,
"IsInfiniteStream" : true,
"Path" : "Path",
"IsRemote" : true,
"EncoderProtocol" : "",
"IgnoreIndex" : true,
"SupportsDirectPlay" : true,
"TranscodingSubProtocol" : "TranscodingSubProtocol",
"Formats" : [ "Formats", "Formats" ],
"AnalyzeDurationMs" : 9,
"Bitrate" : 9,
"OpenToken" : "OpenToken",
"SupportsProbing" : true,
"Type" : "",
"MediaAttachments" : [ {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
}, {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
} ],
"ReadAtNativeFramerate" : true,
"ETag" : "ETag",
"TranscodingContainer" : "TranscodingContainer",
"IgnoreDts" : true,
"TranscodingUrl" : "TranscodingUrl",
"Id" : "Id",
"SupportsTranscoding" : true,
"DefaultAudioStreamIndex" : 6
}, {
"EncoderPath" : "EncoderPath",
"RequiredHttpHeaders" : {
"key" : "RequiredHttpHeaders"
},
"RunTimeTicks" : 5,
"MediaStreams" : [ {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
}, {
"VideoRange" : "VideoRange",
"CodecTimeBase" : "CodecTimeBase",
"ColorSpace" : "ColorSpace",
"Index" : 7,
"ColorRange" : "ColorRange",
"localizedForced" : "localizedForced",
"BitDepth" : 9,
"Channels" : 4,
"Profile" : "Profile",
"SupportsExternalStream" : true,
"localizedDefault" : "localizedDefault",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"ColorPrimaries" : "ColorPrimaries",
"SampleRate" : 7,
"Language" : "Language",
"IsTextSubtitleStream" : true,
"IsAnamorphic" : true,
"NalLengthSize" : "NalLengthSize",
"Height" : 1,
"PixelFormat" : "PixelFormat",
"RefFrames" : 3,
"IsAVC" : true,
"Width" : 1,
"TimeBase" : "TimeBase",
"ColorTransfer" : "ColorTransfer",
"CodecTag" : "CodecTag",
"IsDefault" : true,
"Path" : "Path",
"Comment" : "Comment",
"DeliveryMethod" : "",
"IsExternalUrl" : true,
"DisplayTitle" : "DisplayTitle",
"IsForced" : true,
"ChannelLayout" : "ChannelLayout",
"localizedUndefined" : "localizedUndefined",
"PacketLength" : 2,
"Title" : "Title",
"RealFrameRate" : 6.846853,
"AspectRatio" : "AspectRatio",
"AverageFrameRate" : 1.4894159,
"Type" : "",
"Score" : 1,
"IsExternal" : true,
"IsInterlaced" : true,
"Level" : 4.965218492984954,
"BitRate" : 7
} ],
"Size" : 5,
"Video3DFormat" : "",
"BufferMs" : 2,
"Timestamp" : "",
"Name" : "Name",
"RequiresOpening" : true,
"SupportsDirectStream" : true,
"VideoType" : "",
"RequiresClosing" : true,
"Container" : "Container",
"IsoType" : "",
"LiveStreamId" : "LiveStreamId",
"RequiresLooping" : true,
"Protocol" : "",
"DefaultSubtitleStreamIndex" : 8,
"GenPtsInput" : true,
"IsInfiniteStream" : true,
"Path" : "Path",
"IsRemote" : true,
"EncoderProtocol" : "",
"IgnoreIndex" : true,
"SupportsDirectPlay" : true,
"TranscodingSubProtocol" : "TranscodingSubProtocol",
"Formats" : [ "Formats", "Formats" ],
"AnalyzeDurationMs" : 9,
"Bitrate" : 9,
"OpenToken" : "OpenToken",
"SupportsProbing" : true,
"Type" : "",
"MediaAttachments" : [ {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
}, {
"CodecTag" : "CodecTag",
"Comment" : "Comment",
"DeliveryUrl" : "DeliveryUrl",
"Codec" : "Codec",
"FileName" : "FileName",
"Index" : 5,
"MimeType" : "MimeType"
} ],
"ReadAtNativeFramerate" : true,
"ETag" : "ETag",
"TranscodingContainer" : "TranscodingContainer",
"IgnoreDts" : true,
"TranscodingUrl" : "TranscodingUrl",
"Id" : "Id",
"SupportsTranscoding" : true,
"DefaultAudioStreamIndex" : 6
} ],
"GenreItems" : [ null, null ],
"OfficialRating" : "OfficialRating",
"ProgramCount" : 7,
"ProgramId" : "ProgramId",
"Longitude" : 9.132027271330688,
"LockData" : true,
"FocalLength" : 4.258773108174356,
"IsNews" : true,
"ShutterSpeed" : 4.678947989005849,
"Id" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"IsFolder" : true,
"SeriesTimerId" : "SeriesTimerId",
"SeriesId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"MediaStreams" : [ null, null ],
"IsPlaceHolder" : true,
"CanDownload" : true,
"SeriesCount" : 8,
"IsMovie" : true,
"DateLastMediaAdded" : "2000-01-23T04:56:07.000+00:00",
"ParentArtImageTag" : "ParentArtImageTag",
"PlayAccess" : "",
"SeriesStudio" : "SeriesStudio",
"IsLive" : true,
"Width" : 4,
"ExternalUrls" : [ {
"Url" : "Url",
"Name" : "Name"
}, {
"Url" : "Url",
"Name" : "Name"
} ],
"RecursiveItemCount" : 6,
"Path" : "Path",
"ParentId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"MusicVideoCount" : 3,
"ScreenshotImageTags" : [ "ScreenshotImageTags", "ScreenshotImageTags" ],
"EpisodeCount" : 3,
"IsSeries" : true,
"ProductionLocations" : [ "ProductionLocations", "ProductionLocations" ],
"ParentPrimaryImageItemId" : "ParentPrimaryImageItemId",
"EndDate" : "2000-01-23T04:56:07.000+00:00",
"SeriesPrimaryImageTag" : "SeriesPrimaryImageTag",
"ParentThumbItemId" : "ParentThumbItemId",
"PreferredMetadataLanguage" : "PreferredMetadataLanguage",
"Type" : "Type",
"BackdropImageTags" : [ "BackdropImageTags", "BackdropImageTags" ],
"ParentBackdropImageTags" : [ "ParentBackdropImageTags", "ParentBackdropImageTags" ],
"AirsBeforeEpisodeNumber" : 1,
"ChildCount" : 3,
"Audio" : "",
"Artists" : [ "Artists", "Artists" ],
"ChannelType" : "",
"RunTimeTicks" : 6,
"AlbumPrimaryImageTag" : "AlbumPrimaryImageTag",
"Video3DFormat" : "",
"CumulativeRunTimeTicks" : 3,
"SourceType" : "SourceType",
"CanDelete" : true,
"PlaylistItemId" : "PlaylistItemId",
"DisplayPreferencesId" : "DisplayPreferencesId",
"Album" : "Album",
"Latitude" : 7.260521264802104,
"SortName" : "SortName",
"ArtistCount" : 5,
"Name" : "Name",
"StartDate" : "2000-01-23T04:56:07.000+00:00",
"Container" : "Container",
"ProductionYear" : 1,
"SeriesName" : "SeriesName",
"ParentArtItemId" : "ParentArtItemId",
"AlbumId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"SupportsSync" : true,
"LocalTrailerCount" : 5,
"IndexNumber" : 2,
"CompletionPercentage" : 0.5199002018724985,
"Genres" : [ "Genres", "Genres" ],
"SeasonId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"LockedFields" : [ "Cast", "Cast" ],
"ParentPrimaryImageTag" : "ParentPrimaryImageTag",
"ProviderIds" : {
"key" : "ProviderIds"
},
"RemoteTrailers" : [ {
"Url" : "Url",
"Name" : "Name"
}, {
"Url" : "Url",
"Name" : "Name"
} ],
"MediaSourceCount" : 7,
"CustomRating" : "CustomRating",
"AirsAfterSeasonNumber" : 6,
"AirDays" : [ "Sunday", "Sunday" ],
"ParentLogoItemId" : "ParentLogoItemId",
"PartCount" : 0,
"ChannelName" : "ChannelName",
"EpisodeTitle" : "EpisodeTitle",
"IsoSpeedRating" : 9,
"CommunityRating" : 6.4384236,
"Software" : "Software",
"Chapters" : [ {
"StartPositionTicks" : 6,
"ImageTag" : "ImageTag",
"ImageDateModified" : "2000-01-23T04:56:07.000+00:00",
"ImagePath" : "ImagePath",
"Name" : "Name"
}, {
"StartPositionTicks" : 6,
"ImageTag" : "ImageTag",
"ImageDateModified" : "2000-01-23T04:56:07.000+00:00",
"ImagePath" : "ImagePath",
"Name" : "Name"
} ],
"SongCount" : 3,
"Taglines" : [ "Taglines", "Taglines" ],
"AirsBeforeSeasonNumber" : 0,
"PreferredMetadataCountryCode" : "PreferredMetadataCountryCode",
"CameraModel" : "CameraModel",
"ChannelNumber" : "ChannelNumber",
"UserData" : "",
"TimerId" : "TimerId",
"DateCreated" : "2000-01-23T04:56:07.000+00:00",
"HasSubtitles" : true,
"ParentThumbImageTag" : "ParentThumbImageTag",
"IsSports" : true,
"ChannelId" : "046b6c7f-0b8a-43b9-b35d-6489e6daee91",
"ParentIndexNumber" : 6,
"VideoType" : "",
"AlbumArtists" : [ null, null ],
"ServerId" : "ServerId",
"Number" : "Number",
"AlbumCount" : 7,
"IsRepeat" : true,
"CollectionType" : "CollectionType",
"PrimaryImageAspectRatio" : 7.143538047012306,
"Height" : 0,
"IsKids" : true,
"DisplayOrder" : "DisplayOrder",
"IsHD" : true,
"EnableMediaSourceDisplay" : true,
"SeriesThumbImageTag" : "SeriesThumbImageTag",
"MovieCount" : 4,
"People" : [ {
"Role" : "Role",
"Type" : "Type",
"PrimaryImageTag" : "PrimaryImageTag",
"Id" : "Id",
"Name" : "Name",
"ImageBlurHashes" : {
"Art" : {
"key" : "Art"
},
"Banner" : {
"key" : "Banner"
},
"Thumb" : {
"key" : "Thumb"
},
"Chapter" : {
"key" : "Chapter"
},
"BoxRear" : {
"key" : "BoxRear"
},
"Box" : {
"key" : "Box"
},
"Profile" : {
"key" : "Profile"
},
"Logo" : {
"key" : "Logo"
},
"Disc" : {
"key" : "Disc"
},
"Primary" : {
"key" : "Primary"
},
"Screenshot" : {
"key" : "Screenshot"
},
"Backdrop" : {
"key" : "Backdrop"
},
"Menu" : {
"key" : "Menu"
}
}
}, {
"Role" : "Role",
"Type" : "Type",
"PrimaryImageTag" : "PrimaryImageTag",
"Id" : "Id",
"Name" : "Name",
"ImageBlurHashes" : {
"Art" : {
"key" : "Art"
},
"Banner" : {
"key" : "Banner"
},
"Thumb" : {
"key" : "Thumb"
},
"Chapter" : {
"key" : "Chapter"
},
"BoxRear" : {
"key" : "BoxRear"
},
"Box" : {
"key" : "Box"
},
"Profile" : {
"key" : "Profile"
},
"Logo" : {
"key" : "Logo"
},
"Disc" : {
"key" : "Disc"
},
"Primary" : {
"key" : "Primary"
},
"Screenshot" : {
"key" : "Screenshot"
},
"Backdrop" : {
"key" : "Backdrop"
},
"Menu" : {
"key" : "Menu"
}
}
} ],
"Overview" : "Overview",
"SpecialFeatureCount" : 3,
"ImageOrientation" : "",
"AlbumArtist" : "AlbumArtist",
"ImageTags" : {
"key" : "ImageTags"
},
"AspectRatio" : "AspectRatio",
"TrailerCount" : 0,
"OriginalTitle" : "OriginalTitle",
"ForcedSortName" : "ForcedSortName",
"CurrentProgram" : "",
"LocationType" : "",
"IsPremiere" : true,
"Altitude" : 0.8774076871421566
} ]
}}]
- parameter itemId: (path) The item id.
- parameter userId: (query) Optional. Filter by user id, and attach user data. (optional)
- returns: RequestBuilder<BaseItemDtoQueryResult>
*/
open class func getAdditionalPartWithRequestBuilder(itemId: UUID, userId: UUID? = nil) -> RequestBuilder<BaseItemDtoQueryResult> {
var path = "/Videos/{itemId}/AdditionalParts"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"userId": userId
])
let requestBuilder: RequestBuilder<BaseItemDtoQueryResult>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a video stream.
- parameter itemId: (path) The item id.
- parameter container: (query) The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. (optional)
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment length. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getVideoStream(itemId: UUID, container: String? = nil, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod13? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context13? = nil, streamOptions: [String:String]? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getVideoStreamWithRequestBuilder(itemId: itemId, container: container, _static: _static, params: params, tag: tag, deviceProfileId: deviceProfileId, playSessionId: playSessionId, segmentContainer: segmentContainer, segmentLength: segmentLength, minSegments: minSegments, mediaSourceId: mediaSourceId, deviceId: deviceId, audioCodec: audioCodec, enableAutoStreamCopy: enableAutoStreamCopy, allowVideoStreamCopy: allowVideoStreamCopy, allowAudioStreamCopy: allowAudioStreamCopy, breakOnNonKeyFrames: breakOnNonKeyFrames, audioSampleRate: audioSampleRate, maxAudioBitDepth: maxAudioBitDepth, audioBitRate: audioBitRate, audioChannels: audioChannels, maxAudioChannels: maxAudioChannels, profile: profile, level: level, framerate: framerate, maxFramerate: maxFramerate, copyTimestamps: copyTimestamps, startTimeTicks: startTimeTicks, width: width, height: height, videoBitRate: videoBitRate, subtitleStreamIndex: subtitleStreamIndex, subtitleMethod: subtitleMethod, maxRefFrames: maxRefFrames, maxVideoBitDepth: maxVideoBitDepth, requireAvc: requireAvc, deInterlace: deInterlace, requireNonAnamorphic: requireNonAnamorphic, transcodingMaxAudioChannels: transcodingMaxAudioChannels, cpuCoreLimit: cpuCoreLimit, liveStreamId: liveStreamId, enableMpegtsM2TsMode: enableMpegtsM2TsMode, videoCodec: videoCodec, subtitleCodec: subtitleCodec, transcodeReasons: transcodeReasons, audioStreamIndex: audioStreamIndex, videoStreamIndex: videoStreamIndex, context: context, streamOptions: streamOptions).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a video stream.
- GET /Videos/{itemId}/stream
-
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The item id.
- parameter container: (query) The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. (optional)
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment length. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- returns: RequestBuilder<Data>
*/
open class func getVideoStreamWithRequestBuilder(itemId: UUID, container: String? = nil, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod13? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context13? = nil, streamOptions: [String:String]? = nil) -> RequestBuilder<Data> {
var path = "/Videos/{itemId}/stream"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"container": container,
"static": _static,
"params": params,
"tag": tag,
"deviceProfileId": deviceProfileId,
"playSessionId": playSessionId,
"segmentContainer": segmentContainer,
"segmentLength": segmentLength?.encodeToJSON(),
"minSegments": minSegments?.encodeToJSON(),
"mediaSourceId": mediaSourceId,
"deviceId": deviceId,
"audioCodec": audioCodec,
"enableAutoStreamCopy": enableAutoStreamCopy,
"allowVideoStreamCopy": allowVideoStreamCopy,
"allowAudioStreamCopy": allowAudioStreamCopy,
"breakOnNonKeyFrames": breakOnNonKeyFrames,
"audioSampleRate": audioSampleRate?.encodeToJSON(),
"maxAudioBitDepth": maxAudioBitDepth?.encodeToJSON(),
"audioBitRate": audioBitRate?.encodeToJSON(),
"audioChannels": audioChannels?.encodeToJSON(),
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
"profile": profile,
"level": level,
"framerate": framerate,
"maxFramerate": maxFramerate,
"copyTimestamps": copyTimestamps,
"startTimeTicks": startTimeTicks?.encodeToJSON(),
"width": width?.encodeToJSON(),
"height": height?.encodeToJSON(),
"videoBitRate": videoBitRate?.encodeToJSON(),
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
"subtitleMethod": subtitleMethod,
"maxRefFrames": maxRefFrames?.encodeToJSON(),
"maxVideoBitDepth": maxVideoBitDepth?.encodeToJSON(),
"requireAvc": requireAvc,
"deInterlace": deInterlace,
"requireNonAnamorphic": requireNonAnamorphic,
"transcodingMaxAudioChannels": transcodingMaxAudioChannels?.encodeToJSON(),
"cpuCoreLimit": cpuCoreLimit?.encodeToJSON(),
"liveStreamId": liveStreamId,
"enableMpegtsM2TsMode": enableMpegtsM2TsMode,
"videoCodec": videoCodec,
"subtitleCodec": subtitleCodec,
"transcodeReasons": transcodeReasons,
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
"videoStreamIndex": videoStreamIndex?.encodeToJSON(),
"context": context,
"streamOptions": streamOptions
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a video stream.
- parameter itemId: (path) The item id.
- parameter container: (path) The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv.
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment length. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func getVideoStreamByContainer(itemId: UUID, container: String, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod15? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context15? = nil, streamOptions: [String:String]? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
getVideoStreamByContainerWithRequestBuilder(itemId: itemId, container: container, _static: _static, params: params, tag: tag, deviceProfileId: deviceProfileId, playSessionId: playSessionId, segmentContainer: segmentContainer, segmentLength: segmentLength, minSegments: minSegments, mediaSourceId: mediaSourceId, deviceId: deviceId, audioCodec: audioCodec, enableAutoStreamCopy: enableAutoStreamCopy, allowVideoStreamCopy: allowVideoStreamCopy, allowAudioStreamCopy: allowAudioStreamCopy, breakOnNonKeyFrames: breakOnNonKeyFrames, audioSampleRate: audioSampleRate, maxAudioBitDepth: maxAudioBitDepth, audioBitRate: audioBitRate, audioChannels: audioChannels, maxAudioChannels: maxAudioChannels, profile: profile, level: level, framerate: framerate, maxFramerate: maxFramerate, copyTimestamps: copyTimestamps, startTimeTicks: startTimeTicks, width: width, height: height, videoBitRate: videoBitRate, subtitleStreamIndex: subtitleStreamIndex, subtitleMethod: subtitleMethod, maxRefFrames: maxRefFrames, maxVideoBitDepth: maxVideoBitDepth, requireAvc: requireAvc, deInterlace: deInterlace, requireNonAnamorphic: requireNonAnamorphic, transcodingMaxAudioChannels: transcodingMaxAudioChannels, cpuCoreLimit: cpuCoreLimit, liveStreamId: liveStreamId, enableMpegtsM2TsMode: enableMpegtsM2TsMode, videoCodec: videoCodec, subtitleCodec: subtitleCodec, transcodeReasons: transcodeReasons, audioStreamIndex: audioStreamIndex, videoStreamIndex: videoStreamIndex, context: context, streamOptions: streamOptions).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a video stream.
- GET /Videos/{itemId}/stream.{container}
-
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The item id.
- parameter container: (path) The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv.
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment length. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- returns: RequestBuilder<Data>
*/
open class func getVideoStreamByContainerWithRequestBuilder(itemId: UUID, container: String, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod15? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context15? = nil, streamOptions: [String:String]? = nil) -> RequestBuilder<Data> {
var path = "/Videos/{itemId}/stream.{container}"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let containerPreEscape = "\(container)"
let containerPostEscape = containerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{container}", with: containerPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"static": _static,
"params": params,
"tag": tag,
"deviceProfileId": deviceProfileId,
"playSessionId": playSessionId,
"segmentContainer": segmentContainer,
"segmentLength": segmentLength?.encodeToJSON(),
"minSegments": minSegments?.encodeToJSON(),
"mediaSourceId": mediaSourceId,
"deviceId": deviceId,
"audioCodec": audioCodec,
"enableAutoStreamCopy": enableAutoStreamCopy,
"allowVideoStreamCopy": allowVideoStreamCopy,
"allowAudioStreamCopy": allowAudioStreamCopy,
"breakOnNonKeyFrames": breakOnNonKeyFrames,
"audioSampleRate": audioSampleRate?.encodeToJSON(),
"maxAudioBitDepth": maxAudioBitDepth?.encodeToJSON(),
"audioBitRate": audioBitRate?.encodeToJSON(),
"audioChannels": audioChannels?.encodeToJSON(),
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
"profile": profile,
"level": level,
"framerate": framerate,
"maxFramerate": maxFramerate,
"copyTimestamps": copyTimestamps,
"startTimeTicks": startTimeTicks?.encodeToJSON(),
"width": width?.encodeToJSON(),
"height": height?.encodeToJSON(),
"videoBitRate": videoBitRate?.encodeToJSON(),
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
"subtitleMethod": subtitleMethod,
"maxRefFrames": maxRefFrames?.encodeToJSON(),
"maxVideoBitDepth": maxVideoBitDepth?.encodeToJSON(),
"requireAvc": requireAvc,
"deInterlace": deInterlace,
"requireNonAnamorphic": requireNonAnamorphic,
"transcodingMaxAudioChannels": transcodingMaxAudioChannels?.encodeToJSON(),
"cpuCoreLimit": cpuCoreLimit?.encodeToJSON(),
"liveStreamId": liveStreamId,
"enableMpegtsM2TsMode": enableMpegtsM2TsMode,
"videoCodec": videoCodec,
"subtitleCodec": subtitleCodec,
"transcodeReasons": transcodeReasons,
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
"videoStreamIndex": videoStreamIndex?.encodeToJSON(),
"context": context,
"streamOptions": streamOptions
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "GET", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a video stream.
- parameter itemId: (path) The item id.
- parameter container: (query) The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. (optional)
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment length. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func headVideoStream(itemId: UUID, container: String? = nil, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod14? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context14? = nil, streamOptions: [String:String]? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
headVideoStreamWithRequestBuilder(itemId: itemId, container: container, _static: _static, params: params, tag: tag, deviceProfileId: deviceProfileId, playSessionId: playSessionId, segmentContainer: segmentContainer, segmentLength: segmentLength, minSegments: minSegments, mediaSourceId: mediaSourceId, deviceId: deviceId, audioCodec: audioCodec, enableAutoStreamCopy: enableAutoStreamCopy, allowVideoStreamCopy: allowVideoStreamCopy, allowAudioStreamCopy: allowAudioStreamCopy, breakOnNonKeyFrames: breakOnNonKeyFrames, audioSampleRate: audioSampleRate, maxAudioBitDepth: maxAudioBitDepth, audioBitRate: audioBitRate, audioChannels: audioChannels, maxAudioChannels: maxAudioChannels, profile: profile, level: level, framerate: framerate, maxFramerate: maxFramerate, copyTimestamps: copyTimestamps, startTimeTicks: startTimeTicks, width: width, height: height, videoBitRate: videoBitRate, subtitleStreamIndex: subtitleStreamIndex, subtitleMethod: subtitleMethod, maxRefFrames: maxRefFrames, maxVideoBitDepth: maxVideoBitDepth, requireAvc: requireAvc, deInterlace: deInterlace, requireNonAnamorphic: requireNonAnamorphic, transcodingMaxAudioChannels: transcodingMaxAudioChannels, cpuCoreLimit: cpuCoreLimit, liveStreamId: liveStreamId, enableMpegtsM2TsMode: enableMpegtsM2TsMode, videoCodec: videoCodec, subtitleCodec: subtitleCodec, transcodeReasons: transcodeReasons, audioStreamIndex: audioStreamIndex, videoStreamIndex: videoStreamIndex, context: context, streamOptions: streamOptions).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a video stream.
- HEAD /Videos/{itemId}/stream
-
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The item id.
- parameter container: (query) The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv. (optional)
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment length. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- returns: RequestBuilder<Data>
*/
open class func headVideoStreamWithRequestBuilder(itemId: UUID, container: String? = nil, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod14? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context14? = nil, streamOptions: [String:String]? = nil) -> RequestBuilder<Data> {
var path = "/Videos/{itemId}/stream"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"container": container,
"static": _static,
"params": params,
"tag": tag,
"deviceProfileId": deviceProfileId,
"playSessionId": playSessionId,
"segmentContainer": segmentContainer,
"segmentLength": segmentLength?.encodeToJSON(),
"minSegments": minSegments?.encodeToJSON(),
"mediaSourceId": mediaSourceId,
"deviceId": deviceId,
"audioCodec": audioCodec,
"enableAutoStreamCopy": enableAutoStreamCopy,
"allowVideoStreamCopy": allowVideoStreamCopy,
"allowAudioStreamCopy": allowAudioStreamCopy,
"breakOnNonKeyFrames": breakOnNonKeyFrames,
"audioSampleRate": audioSampleRate?.encodeToJSON(),
"maxAudioBitDepth": maxAudioBitDepth?.encodeToJSON(),
"audioBitRate": audioBitRate?.encodeToJSON(),
"audioChannels": audioChannels?.encodeToJSON(),
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
"profile": profile,
"level": level,
"framerate": framerate,
"maxFramerate": maxFramerate,
"copyTimestamps": copyTimestamps,
"startTimeTicks": startTimeTicks?.encodeToJSON(),
"width": width?.encodeToJSON(),
"height": height?.encodeToJSON(),
"videoBitRate": videoBitRate?.encodeToJSON(),
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
"subtitleMethod": subtitleMethod,
"maxRefFrames": maxRefFrames?.encodeToJSON(),
"maxVideoBitDepth": maxVideoBitDepth?.encodeToJSON(),
"requireAvc": requireAvc,
"deInterlace": deInterlace,
"requireNonAnamorphic": requireNonAnamorphic,
"transcodingMaxAudioChannels": transcodingMaxAudioChannels?.encodeToJSON(),
"cpuCoreLimit": cpuCoreLimit?.encodeToJSON(),
"liveStreamId": liveStreamId,
"enableMpegtsM2TsMode": enableMpegtsM2TsMode,
"videoCodec": videoCodec,
"subtitleCodec": subtitleCodec,
"transcodeReasons": transcodeReasons,
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
"videoStreamIndex": videoStreamIndex?.encodeToJSON(),
"context": context,
"streamOptions": streamOptions
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Gets a video stream.
- parameter itemId: (path) The item id.
- parameter container: (path) The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv.
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment length. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- parameter completion: completion handler to receive the data and the error objects
*/
open class func headVideoStreamByContainer(itemId: UUID, container: String, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod16? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context16? = nil, streamOptions: [String:String]? = nil, completion: @escaping ((_ data: Data?,_ error: Error?) -> Void)) {
headVideoStreamByContainerWithRequestBuilder(itemId: itemId, container: container, _static: _static, params: params, tag: tag, deviceProfileId: deviceProfileId, playSessionId: playSessionId, segmentContainer: segmentContainer, segmentLength: segmentLength, minSegments: minSegments, mediaSourceId: mediaSourceId, deviceId: deviceId, audioCodec: audioCodec, enableAutoStreamCopy: enableAutoStreamCopy, allowVideoStreamCopy: allowVideoStreamCopy, allowAudioStreamCopy: allowAudioStreamCopy, breakOnNonKeyFrames: breakOnNonKeyFrames, audioSampleRate: audioSampleRate, maxAudioBitDepth: maxAudioBitDepth, audioBitRate: audioBitRate, audioChannels: audioChannels, maxAudioChannels: maxAudioChannels, profile: profile, level: level, framerate: framerate, maxFramerate: maxFramerate, copyTimestamps: copyTimestamps, startTimeTicks: startTimeTicks, width: width, height: height, videoBitRate: videoBitRate, subtitleStreamIndex: subtitleStreamIndex, subtitleMethod: subtitleMethod, maxRefFrames: maxRefFrames, maxVideoBitDepth: maxVideoBitDepth, requireAvc: requireAvc, deInterlace: deInterlace, requireNonAnamorphic: requireNonAnamorphic, transcodingMaxAudioChannels: transcodingMaxAudioChannels, cpuCoreLimit: cpuCoreLimit, liveStreamId: liveStreamId, enableMpegtsM2TsMode: enableMpegtsM2TsMode, videoCodec: videoCodec, subtitleCodec: subtitleCodec, transcodeReasons: transcodeReasons, audioStreamIndex: audioStreamIndex, videoStreamIndex: videoStreamIndex, context: context, streamOptions: streamOptions).execute { (response, error) -> Void in
completion(response?.body, error)
}
}
/**
Gets a video stream.
- HEAD /Videos/{itemId}/stream.{container}
-
- examples: [{contentType=application/json, example=""}]
- parameter itemId: (path) The item id.
- parameter container: (path) The video container. Possible values are: ts, webm, asf, wmv, ogv, mp4, m4v, mkv, mpeg, mpg, avi, 3gp, wmv, wtv, m2ts, mov, iso, flv.
- parameter _static: (query) Optional. If true, the original file will be streamed statically without any encoding. Use either no url extension or the original file extension. true/false. (optional)
- parameter params: (query) The streaming parameters. (optional)
- parameter tag: (query) The tag. (optional)
- parameter deviceProfileId: (query) Optional. The dlna device profile id to utilize. (optional)
- parameter playSessionId: (query) The play session id. (optional)
- parameter segmentContainer: (query) The segment container. (optional)
- parameter segmentLength: (query) The segment length. (optional)
- parameter minSegments: (query) The minimum number of segments. (optional)
- parameter mediaSourceId: (query) The media version id, if playing an alternate version. (optional)
- parameter deviceId: (query) The device id of the client requesting. Used to stop encoding processes when needed. (optional)
- parameter audioCodec: (query) Optional. Specify a audio codec to encode to, e.g. mp3. If omitted the server will auto-select using the url&#x27;s extension. Options: aac, mp3, vorbis, wma. (optional)
- parameter enableAutoStreamCopy: (query) Whether or not to allow automatic stream copy if requested values match the original source. Defaults to true. (optional)
- parameter allowVideoStreamCopy: (query) Whether or not to allow copying of the video stream url. (optional)
- parameter allowAudioStreamCopy: (query) Whether or not to allow copying of the audio stream url. (optional)
- parameter breakOnNonKeyFrames: (query) Optional. Whether to break on non key frames. (optional)
- parameter audioSampleRate: (query) Optional. Specify a specific audio sample rate, e.g. 44100. (optional)
- parameter maxAudioBitDepth: (query) Optional. The maximum audio bit depth. (optional)
- parameter audioBitRate: (query) Optional. Specify an audio bitrate to encode to, e.g. 128000. If omitted this will be left to encoder defaults. (optional)
- parameter audioChannels: (query) Optional. Specify a specific number of audio channels to encode to, e.g. 2. (optional)
- parameter maxAudioChannels: (query) Optional. Specify a maximum number of audio channels to encode to, e.g. 2. (optional)
- parameter profile: (query) Optional. Specify a specific an encoder profile (varies by encoder), e.g. main, baseline, high. (optional)
- parameter level: (query) Optional. Specify a level for the encoder profile (varies by encoder), e.g. 3, 3.1. (optional)
- parameter framerate: (query) Optional. A specific video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter maxFramerate: (query) Optional. A specific maximum video framerate to encode to, e.g. 23.976. Generally this should be omitted unless the device has specific requirements. (optional)
- parameter copyTimestamps: (query) Whether or not to copy timestamps when transcoding with an offset. Defaults to false. (optional)
- parameter startTimeTicks: (query) Optional. Specify a starting offset, in ticks. 1 tick &#x3D; 10000 ms. (optional)
- parameter width: (query) Optional. The fixed horizontal resolution of the encoded video. (optional)
- parameter height: (query) Optional. The fixed vertical resolution of the encoded video. (optional)
- parameter videoBitRate: (query) Optional. Specify a video bitrate to encode to, e.g. 500000. If omitted this will be left to encoder defaults. (optional)
- parameter subtitleStreamIndex: (query) Optional. The index of the subtitle stream to use. If omitted no subtitles will be used. (optional)
- parameter subtitleMethod: (query) Optional. Specify the subtitle delivery method. (optional)
- parameter maxRefFrames: (query) Optional. (optional)
- parameter maxVideoBitDepth: (query) Optional. The maximum video bit depth. (optional)
- parameter requireAvc: (query) Optional. Whether to require avc. (optional)
- parameter deInterlace: (query) Optional. Whether to deinterlace the video. (optional)
- parameter requireNonAnamorphic: (query) Optional. Whether to require a non anamorphic stream. (optional)
- parameter transcodingMaxAudioChannels: (query) Optional. The maximum number of audio channels to transcode. (optional)
- parameter cpuCoreLimit: (query) Optional. The limit of how many cpu cores to use. (optional)
- parameter liveStreamId: (query) The live stream id. (optional)
- parameter enableMpegtsM2TsMode: (query) Optional. Whether to enable the MpegtsM2Ts mode. (optional)
- parameter videoCodec: (query) Optional. Specify a video codec to encode to, e.g. h264. If omitted the server will auto-select using the url&#x27;s extension. Options: h265, h264, mpeg4, theora, vpx, wmv. (optional)
- parameter subtitleCodec: (query) Optional. Specify a subtitle codec to encode to. (optional)
- parameter transcodeReasons: (query) Optional. The transcoding reason. (optional)
- parameter audioStreamIndex: (query) Optional. The index of the audio stream to use. If omitted the first audio stream will be used. (optional)
- parameter videoStreamIndex: (query) Optional. The index of the video stream to use. If omitted the first video stream will be used. (optional)
- parameter context: (query) Optional. The MediaBrowser.Model.Dlna.EncodingContext. (optional)
- parameter streamOptions: (query) Optional. The streaming options. (optional)
- returns: RequestBuilder<Data>
*/
open class func headVideoStreamByContainerWithRequestBuilder(itemId: UUID, container: String, _static: Bool? = nil, params: String? = nil, tag: String? = nil, deviceProfileId: String? = nil, playSessionId: String? = nil, segmentContainer: String? = nil, segmentLength: Int? = nil, minSegments: Int? = nil, mediaSourceId: String? = nil, deviceId: String? = nil, audioCodec: String? = nil, enableAutoStreamCopy: Bool? = nil, allowVideoStreamCopy: Bool? = nil, allowAudioStreamCopy: Bool? = nil, breakOnNonKeyFrames: Bool? = nil, audioSampleRate: Int? = nil, maxAudioBitDepth: Int? = nil, audioBitRate: Int? = nil, audioChannels: Int? = nil, maxAudioChannels: Int? = nil, profile: String? = nil, level: String? = nil, framerate: Float? = nil, maxFramerate: Float? = nil, copyTimestamps: Bool? = nil, startTimeTicks: Int64? = nil, width: Int? = nil, height: Int? = nil, videoBitRate: Int? = nil, subtitleStreamIndex: Int? = nil, subtitleMethod: SubtitleMethod16? = nil, maxRefFrames: Int? = nil, maxVideoBitDepth: Int? = nil, requireAvc: Bool? = nil, deInterlace: Bool? = nil, requireNonAnamorphic: Bool? = nil, transcodingMaxAudioChannels: Int? = nil, cpuCoreLimit: Int? = nil, liveStreamId: String? = nil, enableMpegtsM2TsMode: Bool? = nil, videoCodec: String? = nil, subtitleCodec: String? = nil, transcodeReasons: String? = nil, audioStreamIndex: Int? = nil, videoStreamIndex: Int? = nil, context: Context16? = nil, streamOptions: [String:String]? = nil) -> RequestBuilder<Data> {
var path = "/Videos/{itemId}/stream.{container}"
let itemIdPreEscape = "\(itemId)"
let itemIdPostEscape = itemIdPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{itemId}", with: itemIdPostEscape, options: .literal, range: nil)
let containerPreEscape = "\(container)"
let containerPostEscape = containerPreEscape.addingPercentEncoding(withAllowedCharacters: .urlPathAllowed) ?? ""
path = path.replacingOccurrences(of: "{container}", with: containerPostEscape, options: .literal, range: nil)
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"static": _static,
"params": params,
"tag": tag,
"deviceProfileId": deviceProfileId,
"playSessionId": playSessionId,
"segmentContainer": segmentContainer,
"segmentLength": segmentLength?.encodeToJSON(),
"minSegments": minSegments?.encodeToJSON(),
"mediaSourceId": mediaSourceId,
"deviceId": deviceId,
"audioCodec": audioCodec,
"enableAutoStreamCopy": enableAutoStreamCopy,
"allowVideoStreamCopy": allowVideoStreamCopy,
"allowAudioStreamCopy": allowAudioStreamCopy,
"breakOnNonKeyFrames": breakOnNonKeyFrames,
"audioSampleRate": audioSampleRate?.encodeToJSON(),
"maxAudioBitDepth": maxAudioBitDepth?.encodeToJSON(),
"audioBitRate": audioBitRate?.encodeToJSON(),
"audioChannels": audioChannels?.encodeToJSON(),
"maxAudioChannels": maxAudioChannels?.encodeToJSON(),
"profile": profile,
"level": level,
"framerate": framerate,
"maxFramerate": maxFramerate,
"copyTimestamps": copyTimestamps,
"startTimeTicks": startTimeTicks?.encodeToJSON(),
"width": width?.encodeToJSON(),
"height": height?.encodeToJSON(),
"videoBitRate": videoBitRate?.encodeToJSON(),
"subtitleStreamIndex": subtitleStreamIndex?.encodeToJSON(),
"subtitleMethod": subtitleMethod,
"maxRefFrames": maxRefFrames?.encodeToJSON(),
"maxVideoBitDepth": maxVideoBitDepth?.encodeToJSON(),
"requireAvc": requireAvc,
"deInterlace": deInterlace,
"requireNonAnamorphic": requireNonAnamorphic,
"transcodingMaxAudioChannels": transcodingMaxAudioChannels?.encodeToJSON(),
"cpuCoreLimit": cpuCoreLimit?.encodeToJSON(),
"liveStreamId": liveStreamId,
"enableMpegtsM2TsMode": enableMpegtsM2TsMode,
"videoCodec": videoCodec,
"subtitleCodec": subtitleCodec,
"transcodeReasons": transcodeReasons,
"audioStreamIndex": audioStreamIndex?.encodeToJSON(),
"videoStreamIndex": videoStreamIndex?.encodeToJSON(),
"context": context,
"streamOptions": streamOptions
])
let requestBuilder: RequestBuilder<Data>.Type = SwaggerClientAPI.requestBuilderFactory.getBuilder()
return requestBuilder.init(method: "HEAD", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
/**
Merges videos into a single record.
- parameter ids: (query) Item id list. This allows multiple, comma delimited.
- parameter completion: completion handler to receive the data and the error objects
*/
open class func mergeVersions(ids: [UUID], completion: @escaping ((_ data: Void?,_ error: Error?) -> Void)) {
mergeVersionsWithRequestBuilder(ids: ids).execute { (response, error) -> Void in
if error == nil {
completion((), error)
} else {
completion(nil, error)
}
}
}
/**
Merges videos into a single record.
- POST /Videos/MergeVersions
-
- API Key:
- type: apiKey X-Emby-Authorization
- name: CustomAuthentication
- parameter ids: (query) Item id list. This allows multiple, comma delimited.
- returns: RequestBuilder<Void>
*/
open class func mergeVersionsWithRequestBuilder(ids: [UUID]) -> RequestBuilder<Void> {
let path = "/Videos/MergeVersions"
let URLString = SwaggerClientAPI.basePath + path
let parameters: [String:Any]? = nil
var url = URLComponents(string: URLString)
url?.queryItems = APIHelper.mapValuesToQueryItems([
"ids": ids
])
let requestBuilder: RequestBuilder<Void>.Type = SwaggerClientAPI.requestBuilderFactory.getNonDecodableBuilder()
return requestBuilder.init(method: "POST", URLString: (url?.string ?? URLString), parameters: parameters, isBody: false)
}
}