Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
JavaScript Suite Documentation
MediaServiceData

MediaServiceData Class Reference

Constructors

Instance Methods

Constructors

new MediaServiceData(parameters)

Initializes an instance of MediaServiceData.

Instance Methods

mediaServiceData.getIsExplicit() ⇒ Boolean

Get the IsExplicit

Kind: Instance method of MediaServiceData
Returns: Boolean - the KEY_IS_EXPLICIT value

mediaServiceData.getMediaAlbum() ⇒ String

Get the MediaAlbum

Kind: Instance method of MediaServiceData
Returns: String - the KEY_MEDIA_ALBUM value

mediaServiceData.getMediaArtist() ⇒ String

Get the MediaArtist

Kind: Instance method of MediaServiceData
Returns: String - the KEY_MEDIA_ARTIST value

mediaServiceData.getMediaImage() ⇒ Image

Get the MediaImage

Kind: Instance method of MediaServiceData
Returns: Image - the KEY_MEDIA_IMAGE value

mediaServiceData.getMediaTitle() ⇒ String

Get the MediaTitle

Kind: Instance method of MediaServiceData
Returns: String - the KEY_MEDIA_TITLE value

mediaServiceData.getMediaType() ⇒ MediaType

Get the MediaType

Kind: Instance method of MediaServiceData
Returns: MediaType - the KEY_MEDIA_TYPE value

mediaServiceData.getPlaylistName() ⇒ String

Get the PlaylistName

Kind: Instance method of MediaServiceData
Returns: String - the KEY_PLAYLIST_NAME value

mediaServiceData.getQueueCurrentTrackNumber() ⇒ Number

Get the QueueCurrentTrackNumber

Kind: Instance method of MediaServiceData
Returns: Number - the KEY_QUEUE_CURRENT_TRACK_NUMBER value

mediaServiceData.getQueuePlaybackDuration() ⇒ Number

Get the QueuePlaybackDuration

Kind: Instance method of MediaServiceData
Returns: Number - the KEY_QUEUE_PLAYBACK_DURATION value

mediaServiceData.getQueuePlaybackProgress() ⇒ Number

Get the QueuePlaybackProgress

Kind: Instance method of MediaServiceData
Returns: Number - the KEY_QUEUE_PLAYBACK_PROGRESS value

mediaServiceData.getQueueTotalTrackCount() ⇒ Number

Get the QueueTotalTrackCount

Kind: Instance method of MediaServiceData
Returns: Number - the KEY_QUEUE_TOTAL_TRACK_COUNT value

mediaServiceData.getTrackPlaybackDuration() ⇒ Number

Get the TrackPlaybackDuration

Kind: Instance method of MediaServiceData
Returns: Number - the KEY_TRACK_PLAYBACK_DURATION value

mediaServiceData.getTrackPlaybackProgress() ⇒ Number

Get the TrackPlaybackProgress

Kind: Instance method of MediaServiceData
Returns: Number - the KEY_TRACK_PLAYBACK_PROGRESS value

mediaServiceData.setIsExplicit(explicit) ⇒ MediaServiceData

Set the IsExplicit

Kind: Instance method of MediaServiceData
Returns: MediaServiceData - The class instance for method chaining.

ParamTypeDescription
explicit Boolean Whether or not the content currently playing (e.g. the track, episode, or book) contains explicit content - The desired IsExplicit.

mediaServiceData.setMediaAlbum(album) ⇒ MediaServiceData

Set the MediaAlbum

Kind: Instance method of MediaServiceData
Returns: MediaServiceData - The class instance for method chaining.

ParamTypeDescription
album String Music: The name of the current album Podcast: The name of the current podcast show Audiobook: The name of the current book - The desired MediaAlbum. {'string_min_length': 1}

mediaServiceData.setMediaArtist(artist) ⇒ MediaServiceData

Set the MediaArtist

Kind: Instance method of MediaServiceData
Returns: MediaServiceData - The class instance for method chaining.

ParamTypeDescription
artist String Music: The name of the current album artist Podcast: The provider of the podcast (hosts, network, company) Audiobook: The book author's name - The desired MediaArtist. {'string_min_length': 1}

mediaServiceData.setMediaImage(image) ⇒ MediaServiceData

Set the MediaImage

Kind: Instance method of MediaServiceData
Returns: MediaServiceData - The class instance for method chaining.

ParamTypeDescription
image Image Music: The album art of the current track Podcast: The podcast or chapter artwork of the current podcast episode Audiobook: The book or chapter artwork of the current audiobook - The desired MediaImage.

mediaServiceData.setMediaTitle(title) ⇒ MediaServiceData

Set the MediaTitle

Kind: Instance method of MediaServiceData
Returns: MediaServiceData - The class instance for method chaining.

ParamTypeDescription
title String Music: The name of the current track Podcast: The name of the current episode Audiobook: The name of the current chapter - The desired MediaTitle. {'string_min_length': 1}

mediaServiceData.setMediaType(type) ⇒ MediaServiceData

Set the MediaType

Kind: Instance method of MediaServiceData
Returns: MediaServiceData - The class instance for method chaining.

ParamTypeDescription
type MediaType The type of the currently playing or paused track. - The desired MediaType.

mediaServiceData.setPlaylistName(name) ⇒ MediaServiceData

Set the PlaylistName

Kind: Instance method of MediaServiceData
Returns: MediaServiceData - The class instance for method chaining.

ParamTypeDescription
name String Music: The name of the playlist or radio station, if the user is playing from a playlist, otherwise, Null Podcast: The name of the playlist, if the user is playing from a playlist, otherwise, Null Audiobook: Likely not applicable, possibly a collection or "playlist" of books - The desired PlaylistName. {'string_min_length': 1}

mediaServiceData.setQueueCurrentTrackNumber(number) ⇒ MediaServiceData

Set the QueueCurrentTrackNumber

Kind: Instance method of MediaServiceData
Returns: MediaServiceData - The class instance for method chaining.

ParamTypeDescription
number Number Music: The current number (1 based) of the track in the playback queue Podcast: The current number (1 based) of the episode in the playback queue Audiobook: The current number (1 based) of the episode in the playback queue (e.g. the chapter number in the book) - The desired QueueCurrentTrackNumber.

mediaServiceData.setQueuePlaybackDuration(duration) ⇒ MediaServiceData

Set the QueuePlaybackDuration

Kind: Instance method of MediaServiceData
Returns: MediaServiceData - The class instance for method chaining.

ParamTypeDescription
duration Number Music: The total duration of the playback queue in seconds Podcast: The total duration of the playback queue in seconds Audiobook: The total duration of the playback queue (e.g. the book) in seconds - The desired QueuePlaybackDuration.

mediaServiceData.setQueuePlaybackProgress(progress) ⇒ MediaServiceData

Set the QueuePlaybackProgress

Kind: Instance method of MediaServiceData
Returns: MediaServiceData - The class instance for method chaining.

ParamTypeDescription
progress Number Music: The current progress of the playback queue in seconds Podcast: The current progress of the playback queue in seconds Audiobook: The current progress of the playback queue (e.g. the book) in seconds - The desired QueuePlaybackProgress.

mediaServiceData.setQueueTotalTrackCount(count) ⇒ MediaServiceData

Set the QueueTotalTrackCount

Kind: Instance method of MediaServiceData
Returns: MediaServiceData - The class instance for method chaining.

ParamTypeDescription
count Number Music: The total number of tracks in the playback queue Podcast: The total number of episodes in the playback queue Audiobook: The total number of sections in the playback queue (e.g. the number of chapters in the book) - The desired QueueTotalTrackCount.

mediaServiceData.setTrackPlaybackDuration(duration) ⇒ MediaServiceData

Set the TrackPlaybackDuration

Kind: Instance method of MediaServiceData
Returns: MediaServiceData - The class instance for method chaining.

ParamTypeDescription
duration Number Music: The total duration of the track in seconds Podcast: The total duration of the episode in seconds Audiobook: The total duration of the current segment (e.g. the chapter) in seconds - The desired TrackPlaybackDuration.

mediaServiceData.setTrackPlaybackProgress(progress) ⇒ MediaServiceData

Set the TrackPlaybackProgress

Kind: Instance method of MediaServiceData
Returns: MediaServiceData - The class instance for method chaining.

ParamTypeDescription
progress Number Music: The current progress of the track in seconds Podcast: The current progress of the episode in seconds Audiobook: The current progress of the current segment (e.g. the chapter) in seconds - The desired TrackPlaybackProgress.
View on GitHub.com
Previous Section Next Section