class Plex_Server_Library_Item_Media implements Plex_Server_Library_Item_MediaInterface

Class that represents the media info a Plex Server Library Item.

Methods

void
__construct(array $rawMedia)

Sets an array of media info to their corresponding class members.

integer
getId()

Returns the ID of the media info.

void
setId(integer $id)

Sets the ID of the media info.

integer
getDuration()

Returns the length of the file.

void
setDuration(integer $duration)

Sets the length of the file.

integer
getBitrate()

Returns the bitrate of the file.

void
setBitrate(integer $bitrate)

Sets the bitrate of the file.

integer
getWidth()

Returns the width of the file's video.

void
setWidth(integer $width)

Sets the width of the file's video.

integer
getHeight()

Returns the height of the file's video.

void
setHeight(integer $height)

Sets the height of the file's video.

float
getAspectRatio()

Returns the aspect ratio of the file's video.

void
setAspectRatio(float $aspectRatio)

Sets the aspect ratio of the file's video.

integer
getVideoResolution()

Returns the video resolution of the file's video.

void
setVideoResolution(integer $videoResolution)

Sets the video resolution of the file's video.

string
getContainer()

Returns the container of the file.

void
setContainer(string $container)

Sets the container of the file.

string
getVideoFrameRate()

Returns the frame rate of the file's video

void
setVideoFrameRate(string $videoFrameRate)

Sets the frame rate of the file's video

getFiles()

Returns the files associated with the item.

void
setFiles(Plex_Server_Library_Item_Media_File[] $files)

Sets the files associated with the item.

Details

at line 125
void __construct(array $rawMedia)

Sets an array of media info to their corresponding class members.

Parameters

array $rawMedia An array of the raw media info returned from the Plex HTTP API.

Return Value

void

at line 172
integer getId()

Returns the ID of the media info.

Return Value

integer The ID of the media info.

at line 186
void setId(integer $id)

Sets the ID of the media info.

Parameters

integer $id The ID of the media info.

Return Value

void

at line 198
integer getDuration()

Returns the length of the file.

Return Value

integer The length of the file.

at line 212
void setDuration(integer $duration)

Sets the length of the file.

Parameters

integer $duration The length of the file.

Return Value

void

at line 224
integer getBitrate()

Returns the bitrate of the file.

Return Value

integer The bitrate of the file.

at line 238
void setBitrate(integer $bitrate)

Sets the bitrate of the file.

Parameters

integer $bitrate The bitrate of the file.

Return Value

void

at line 250
integer getWidth()

Returns the width of the file's video.

Return Value

integer The width of the file's video.

at line 264
void setWidth(integer $width)

Sets the width of the file's video.

Parameters

integer $width The width of the file's video.

Return Value

void

at line 276
integer getHeight()

Returns the height of the file's video.

Return Value

integer The height of the file's video.

at line 290
void setHeight(integer $height)

Sets the height of the file's video.

Parameters

integer $height The height of the file's video.

Return Value

void

at line 302
float getAspectRatio()

Returns the aspect ratio of the file's video.

Return Value

float The aspect ratio of the file's video.

at line 316
void setAspectRatio(float $aspectRatio)

Sets the aspect ratio of the file's video.

Parameters

float $aspectRatio The aspect ratio of the file's video.

Return Value

void

at line 328
integer getVideoResolution()

Returns the video resolution of the file's video.

Return Value

integer The video resolution of the file's video.

at line 342
void setVideoResolution(integer $videoResolution)

Sets the video resolution of the file's video.

Parameters

integer $videoResolution The video resolution of the file's video.

Return Value

void

at line 354
string getContainer()

Returns the container of the file.

Return Value

string The container of the file.

at line 368
void setContainer(string $container)

Sets the container of the file.

Parameters

string $container The container of the file.

Return Value

void

at line 380
string getVideoFrameRate()

Returns the frame rate of the file's video

Return Value

string The frame rate of the file's video.

at line 394
void setVideoFrameRate(string $videoFrameRate)

Sets the frame rate of the file's video

Parameters

string $videoFrameRate The frame rate of the file's video.

Return Value

void

at line 406
Plex_Server_Library_Item_Media_File[] getFiles()

Returns the files associated with the item.

Return Value

Plex_Server_Library_Item_Media_File[] Array of media files.

at line 420
void setFiles(Plex_Server_Library_Item_Media_File[] $files)

Sets the files associated with the item.

Parameters

Plex_Server_Library_Item_Media_File[] $files Array of media files.

Return Value

void