mirror of
https://github.com/LukeHagar/plexjs.git
synced 2025-12-06 12:37:46 +00:00
12 KiB
12 KiB
GetLibraryItemsStream
Example Usage
import { GetLibraryItemsStream } from "@lukehagar/plexjs/sdk/models/operations";
let value: GetLibraryItemsStream = {
id: 272796,
streamType: 1,
default: true,
selected: true,
codec: "h264",
index: 0,
bitrate: 6273,
colorPrimaries: "bt709",
colorRange: "tv",
colorSpace: "bt709",
colorTrc: "bt709",
bitDepth: 8,
chromaLocation: "left",
streamIdentifier: "2",
chromaSubsampling: "4:2:0",
codedHeight: 1088,
codedWidth: 1920,
frameRate: 29.97,
hasScalingMatrix: false,
hearingImpaired: false,
closedCaptions: false,
embeddedInVideo: "1",
height: 1080,
level: 40,
profile: "main",
refFrames: 4,
scanType: "progressive",
width: 1920,
displayTitle: "1080p (H.264)",
extendedDisplayTitle: "1080p (H.264)",
channels: 2,
language: "English",
languageTag: "en",
languageCode: "eng",
audioChannelLayout: "stereo",
samplingRate: 48000,
title: "English",
canAutoSync: false,
};
Fields
| Field | Type | Required | Description | Example |
|---|---|---|---|---|
id |
number | ✔️ | N/A | 272796 |
streamType |
number | ✔️ | Type of stream (1 = video, 2 = audio, 3 = subtitle) | 1 |
default |
boolean | ➖ | Indicates if this is the default stream | true |
selected |
boolean | ➖ | Indicates if the stream is selected | true |
codec |
string | ✔️ | Codec used by the stream | h264 |
index |
number | ✔️ | The index of the stream | 0 |
bitrate |
number | ➖ | The bitrate of the stream in kbps | 6273 |
colorPrimaries |
string | ➖ | The color primaries of the video stream | bt709 |
colorRange |
string | ➖ | The color range of the video stream | tv |
colorSpace |
string | ➖ | The color space of the video stream | bt709 |
colorTrc |
string | ➖ | The transfer characteristics (TRC) of the video stream | bt709 |
bitDepth |
number | ➖ | The bit depth of the video stream | 8 |
chromaLocation |
string | ➖ | The chroma location of the video stream | left |
streamIdentifier |
string | ➖ | The identifier of the video stream | 2 |
chromaSubsampling |
string | ➖ | The chroma subsampling format | 4:2:0 |
codedHeight |
number | ➖ | The coded height of the video stream | 1088 |
codedWidth |
number | ➖ | The coded width of the video stream | 1920 |
frameRate |
number | ➖ | The frame rate of the video stream | 29.97 |
hasScalingMatrix |
boolean | ➖ | Indicates if the stream has a scaling matrix | false |
hearingImpaired |
boolean | ➖ | N/A | false |
closedCaptions |
boolean | ➖ | N/A | false |
embeddedInVideo |
string | ➖ | N/A | 1 |
height |
number | ➖ | The height of the video stream | 1080 |
level |
number | ➖ | The level of the video codec | 40 |
profile |
string | ➖ | The profile of the video codec | main |
refFrames |
number | ➖ | Number of reference frames | 4 |
scanType |
string | ➖ | The scan type (progressive or interlaced) | progressive |
width |
number | ➖ | The width of the video stream | 1920 |
displayTitle |
string | ➖ | Display title of the stream | 1080p (H.264) |
extendedDisplayTitle |
string | ➖ | Extended display title of the stream | 1080p (H.264) |
channels |
number | ➖ | Number of audio channels (for audio streams) | 2 |
language |
string | ➖ | The language of the stream (for audio/subtitle streams) | English |
languageTag |
string | ➖ | Language tag of the stream | en |
languageCode |
string | ➖ | Language code of the stream | eng |
audioChannelLayout |
string | ➖ | The audio channel layout | stereo |
samplingRate |
number | ➖ | Sampling rate of the audio stream in Hz | 48000 |
title |
string | ➖ | Title of the subtitle track (for subtitle streams) | English |
canAutoSync |
boolean | ➖ | Indicates if the subtitle stream can auto-sync | false |