Package sage.api
Class MediaPlayerAPI
- java.lang.Object
-
- sage.api.MediaPlayerAPI
-
public class MediaPlayerAPI extends java.lang.Object
Calls for playing back media in SageTV and for controlling that playback
-
-
Constructor Summary
Constructors Constructor Description MediaPlayerAPI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
ApplyRelativeSubtitleAdjustment(int SubCount)
Adjusts the timing for subtitle display by increasing/decreasing the delay so that the sub at the relative SubCount position would be currently displayed.boolean
CanAdjustSubtitleTiming()
Returns true if the subtitles for the currently loaded file can have their timing adjusted.void
ChannelDown()
Performs a logical channel down in the MediaPlayer.void
ChannelSet(java.lang.String ChannelNumber)
Performs a logical channel set in the MediaPlayer.void
ChannelUp()
Performs a logical channel up in the MediaPlayer.void
ClearRecentChannels()
Clears the list of recently viewed channels.void
CloseAndWaitUntilClosed()
Closes the file that is currently loaded by the MediaPlayer and waits for the MediaPlayer to completely free all of its resources before returning.void
DirectPlaybackControl(int Code, long Param1, long Param2)
Submits an explicit playback control request to the MediaPlayer if it supports it.boolean
DoesCurrentMediaFileHaveVideo()
Returns true if the MediaPlayer has a file loading or loaded that has video content in itvoid
DVDAngleChange(int AngleNum)
Sets the 'Angle' for playback of the current DVD content.void
DVDAudioChange(int AudioNum)
Sets the audio language that should be used in the current DVD content.void
DVDChapterNext()
Informs the MediaPlayer to start playback of the next chapter in the current DVD content.void
DVDChapterPrevious()
Informs the MediaPlayer to start playback of the previous chapter in the current DVD content.void
DVDChapterSet(int ChapterNumber)
Informs the MediaPlayer to start playback of the specified chapter in the current DVD content.void
DVDEnter()
Performs the 'Enter' operation when using a menu system in DVD content.void
DVDMenu()
Performs the 'Menu' operation when playing back a DVD which should bring up the root menu of the DVDvoid
DVDReturn()
Performs the 'Return' operation when playing back a DVD which should bring the user back to the last DVD menu they were atvoid
DVDSubtitleChange(int SubtitleNum)
Sets the subtitle that should be displayed in the current DVD content.void
DVDSubtitleToggle()
Toggles the state for subtitle display in the DVD content being played back.void
DVDTitleMenu()
Performs the 'Menu' operation when playing back a DVD which should bring up the title menu of the DVDvoid
DVDTitleNext()
Informs the MediaPlayer to start playback of the next title in the current DVD content.void
DVDTitlePrevious()
Informs the MediaPlayer to start playback of the previous title in the current DVD content.long
GetAvailableSeekingEnd()
Gets the latest time that the current media can be seeked to using theSeek()
call.long
GetAvailableSeekingStart()
Gets the earliest time that the current media can be seeked to using theSeek()
call.java.lang.String
GetBluRayTitleDescription(int TitleNum)
Returns a description of the specified title number if playing back a BluRay.sage.MediaFile
GetCurrentMediaFile()
Returns the MediaFile object that is currently loaded (or loading) by the MediaPlayerjava.lang.String
GetCurrentMediaTitle()
Returns the title of the content that is currently loaded by the MediaPlayer.sage.Playlist
GetCurrentPlaylist()
Returns the current Playlist that is being played back by the MediaPlayer.int
GetCurrentPlaylistIndex()
Returns the 0-based index into the root Playlist that is currently being played back by the MediaPlayer.java.lang.String[]
GetDVDAvailableLanguages()
Gets a list of all of the audio languages that are currently available in the current DVD contentjava.lang.String[]
GetDVDAvailableSubpictures()
Gets a list of all of the subtitles that are currently available in the current DVD contentint
GetDVDCurrentAngle()
Gets the current angle number that is being played back for DVD contentint
GetDVDCurrentChapter()
Gets the current chapter number that is being played back for DVD content.int
GetDVDCurrentDomain()
Gets the current 'domain' that the DVD playback is in.java.lang.String
GetDVDCurrentLanguage()
Gets the current audio playback language that is being used for the current DVD contentjava.lang.String[]
GetDVDCurrentSubpicture()
Gets the current subtitle that is being used for the current DVD contentint
GetDVDCurrentTitle()
Gets the current title number that is being played back for DVD content.int
GetDVDNumberOfAngles()
Gets the total number of angles that are currently available to select from in the current DVD contentint
GetDVDNumberOfChapters()
Gets the total number of chapters in the current title in the current DVD contentint
GetDVDNumberOfTitles()
Gets the total number of titles in the current DVD contentlong
GetMediaDuration()
Returns the duration of the currently loaded MediaFile in milliseconds.java.lang.String
GetMediaPlayerClosedCaptionState()
Gets the current state that MediaPlayer close captioning is set to use.long
GetMediaTime()
Gets the current playback time of the MediaPlayer.float
GetPlaybackRate()
Returns the current playback rate as a floating point number.long
GetRawMediaTime()
Gets the current playback time of the MediaPlayer.sage.Channel[]
GetRecentChannels()
Returns an array of recently viewed channels.long
GetSubtitleDelay()
Gets the delay in milliseconds that is applied to external subtitle files when they are used during playback (can be positive or negative)java.awt.image.BufferedImage
GetVideoSnapshot()
Returns an image which is a frame grab of the currently rendered video frame.float
GetVolume()
Returns the current volume level of the MediaPlayer.boolean
HasMediaFile()
Returns true if the MediaPlayer currently has a file that is loading or loaded.boolean
IsCorrectParentalLockCode(java.lang.String ParentalLockCode)
Returns true if the argument passed in matches the parental lock code in the systemboolean
IsCurrentMediaFileDVD()
Returns true if the MediaPlayer has a file loading or loaded, and that file is a DVDboolean
IsCurrentMediaFileMusic()
Returns true if the MediaPlayer has a file loading or loaded, and that file is a music fileboolean
IsCurrentMediaFileRecording()
Returns true if the MediaPlayer has a file loading or loaded, and that file is currently being recordedboolean
IsMediaPlayerFullyLoaded()
Returns true if the MediaPlayer is fully loaded.boolean
IsMediaPlayerLoading()
Returns true if the MediaPlayer is loading.boolean
IsMediaPlayerSignalLost()
Returns true if the source the MediaPlayer is trying to playback from indicates a signal loss.boolean
IsMuted()
Returns true if the MediaPlayer is currently in a muted state.boolean
IsPlaying()
Returns true if the MediaPlayer is currently playing back content (i.e.boolean
IsShowingDVDMenu()
Returns true if the MediaPlayer currently has DVD content loaded and that content is showing a DVD menu that can have user interactionjava.lang.Object
LockTuner(java.lang.String CaptureDeviceInput)
Instructs SageTV to take control of the specified CaptureDeviceInput.void
Pause()
Pauses playback in the MediaPlayer.void
Play()
Resumes playback in the MediaPlayer.void
PlayFaster()
Sets the playback rate of the MediaPlayer to be twice the current playback rate.void
PlayPause()
Pauses playback of the MediaPlayer if it is currently playing or resumes playback of the MediaPlayer if it is currently paused.void
PlaySlower()
Sets the playback rate of the MediaPlayer to be half the current playback rate.void
ReloadCurrentFile()
Reloads the current file that is loaded by the MediaPlayer.void
Seek(long Time)
Performs a time seek in the MediaPlayer to the specified time.void
SetMediaPlayerClosedCaptionState(java.lang.String CCType)
Sets the current state that MediaPlayer close captioning should use.void
SetMute(boolean Muted)
Sets the mute state for the MediaPlayer.void
SetPlaybackRate(float PlaybackRate)
Sets the playback rate of the MediaPlayer to the specified value.void
SetSubtitleDelay(long DelayMsec)
Sets the delay in milliseconds that is applied to external subtitle files when they are used during playback (can be positive or negative)void
SetVideoAlwaysOnTop(boolean OnTop)
Sets the video portion of SageTV to always be on top of other windows in the desktop (Windows only).void
SetVolume(float Amount)
Explicitly sets the volume in the MediaPlayer to be the specified amount.void
SkipBackwards()
Performs a time seek backwards in the MediaPlayer.void
SkipBackwards2()
Performs a time seek backwards in the MediaPlayer.void
SkipForward()
Performs a time seek forward in the MediaPlayer.void
SkipForward2()
Performs a time seek forward in the MediaPlayer.java.lang.Object
StartPlaylist(sage.Playlist Playlist)
Starts playback of the specified Playlist.java.lang.Object
StartPlaylistAt(sage.Playlist Playlist, int StartIndex)
Starts playback of the specified Playlist.void
VolumeAdjust(float Amount)
Adjusts the volume in the MediaPlayer be the specified amount.void
VolumeDown()
Decreases the volume in the MediaPlayer.void
VolumeUp()
Increases the volume in the MediaPlayer.java.lang.Object
Watch(java.lang.Object Content)
Instructs SageTV to playback the specified media content.java.lang.Object
WatchLive(java.lang.String CaptureDeviceInput, long PauseBufferSize)
Instructs SageTV to begin playback of content streamed from the specified CaptureDeviceInput.java.lang.Object
WatchLive(java.lang.String CaptureDeviceInput, long PauseBufferSize, java.lang.String PhysicalChannel)
Instructs SageTV to begin playback of content streamed from the specified CaptureDeviceInput.java.lang.Object
WatchLocalFile(java.io.File file)
Instructs SageTV to playback the specified file path that's local to this client
-
-
-
Method Detail
-
IsMediaPlayerFullyLoaded
public boolean IsMediaPlayerFullyLoaded()
Returns true if the MediaPlayer is fully loaded. This means it has the meta information for the file loaded as well as the native media player.- Returns:
- true if the MediaPlayer is fully loaded, false otherwise
-
IsMediaPlayerLoading
public boolean IsMediaPlayerLoading()
Returns true if the MediaPlayer is loading. This is true from the point that a Watch() API call is made until the point that the native media player is loaded or there is a failure loading the file.- Returns:
- true if the MediaPlayer is loading, false otherwise
-
PlayFaster
public void PlayFaster()
Sets the playback rate of the MediaPlayer to be twice the current playback rate. Not supported on all platforms or with all media formats.
-
SkipForward
public void SkipForward()
Performs a time seek forward in the MediaPlayer. The amount of time skipped will be equivalent to the value of the property videoframe/ff_time in milliseconds. (the default is 10 seconds)
-
SkipForward2
public void SkipForward2()
Performs a time seek forward in the MediaPlayer. The amount of time skipped will be equivalent to the value of the property videoframe/ff_time2 in milliseconds. (the default is 2 1/2 minutes)
-
Seek
public void Seek(long Time)
Performs a time seek in the MediaPlayer to the specified time. This time is relative to the start time of the metadata for the MediaFile unless a DVD is being played back. In the case of a DVD the time is absolute.- Parameters:
Time
- the time to seek the MediaPlayer to in milliseconds
-
Pause
public void Pause()
Pauses playback in the MediaPlayer. If the MediaPlayer is currently paused this will perform a frame step.
-
Play
public void Play()
Resumes playback in the MediaPlayer. If the MediaPlayer is playing at a speed other than x1, the playback speed will be reset to x1.
-
PlaySlower
public void PlaySlower()
Sets the playback rate of the MediaPlayer to be half the current playback rate. Not supported on all platforms or with all media formats.
-
PlayPause
public void PlayPause()
Pauses playback of the MediaPlayer if it is currently playing or resumes playback of the MediaPlayer if it is currently paused.
-
SkipBackwards
public void SkipBackwards()
Performs a time seek backwards in the MediaPlayer. The amount of time skipped will be equivalent to the value of the property videoframe/rew_time in milliseconds. (the default is 10 seconds)
-
SkipBackwards2
public void SkipBackwards2()
Performs a time seek backwards in the MediaPlayer. The amount of time skipped will be equivalent to the value of the property videoframe/rew_time2 in milliseconds. (the default is 2 1/2 minutes)
-
GetPlaybackRate
public float GetPlaybackRate()
Returns the current playback rate as a floating point number. 1.0 is normal speed forward playback. Negative numbers indicate reverse playback.- Returns:
- the current playback rate of the MediaPlayer
-
SetPlaybackRate
public void SetPlaybackRate(float PlaybackRate)
Sets the playback rate of the MediaPlayer to the specified value. 1.0 is normal speed forward playback. Negative numbers indicate reverse playback. Not all values are supported on all platforms or for all formats.- Parameters:
PlaybackRate
- the playback rate to set the MediaPlayer to
-
VolumeUp
public void VolumeUp()
Increases the volume in the MediaPlayer. This may also effect the 'system' volume depending upon the configuration of SageTV.
-
VolumeDown
public void VolumeDown()
Decreases the volume in the MediaPlayer. This may also effect the 'system' volume depending upon the configuration of SageTV.
-
GetVolume
public float GetVolume()
Returns the current volume level of the MediaPlayer. If no MediaPlayer is loaded this will return the system volume.- Returns:
- the current volume level of the MediaPlayer; if no MediaPlayer is loaded this will return the system volume. The value will be between 0.0 and 1.0
-
ChannelUp
public void ChannelUp()
Performs a logical channel up in the MediaPlayer. This only has effect if the content that is currently being viewed has the concept of channels, tracks, chapters, etc.
-
ChannelDown
public void ChannelDown()
Performs a logical channel down in the MediaPlayer. This only has effect if the content that is currently being viewed has the concept of channels, tracks, chapters, etc.
-
ChannelSet
public void ChannelSet(java.lang.String ChannelNumber)
Performs a logical channel set in the MediaPlayer. This only has effect if the content that is currently being viewed has the concept of channels, tracks, chapters, etc.- Parameters:
ChannelNumber
- the new channel/track/chapter to playback
-
VolumeAdjust
public void VolumeAdjust(float Amount)
Adjusts the volume in the MediaPlayer be the specified amount. The overall volume for the player is between 0.0 and 1.0. This may also effect the 'system' volume depending upon the configuration of SageTV.- Parameters:
Amount
- the amount to adjust the volume by
-
SetVolume
public void SetVolume(float Amount)
Explicitly sets the volume in the MediaPlayer to be the specified amount. This should be between 0.0 and 1.0 This may also effect the 'system' volume depending upon the configuration of SageTV.- Parameters:
Amount
- the level to set the volume to
-
Watch
public java.lang.Object Watch(java.lang.Object Content)
Instructs SageTV to playback the specified media content. The argument can be either an Airing, a MediaFile or a file path. For Airings, it can correspond to a MediaFile (which has the same effect as just calling this with the MediaFile itself) or it can correspond to a live television Airing. For live TV airings, the appropriate work will be done to tune, record and start playback of the requested content. For MediaFiles or file paths, this will simply playback the specified content.- Parameters:
Content
- the Airing, MediaFile or file path to being playback of- Returns:
- true if the request was successful, a localized error message otherwise
-
WatchLive
public java.lang.Object WatchLive(java.lang.String CaptureDeviceInput, long PauseBufferSize)
Instructs SageTV to begin playback of content streamed from the specified CaptureDeviceInput. The content may or may not be buffered to a file first depending upon the PauseBufferSize parameter as well as the capabilities of the capture hardware and the network configuration. NOTE: This is NOT the same as jumping to live when playing back buffered TV content; to do that simply call Seek(Time())- Parameters:
CaptureDeviceInput
- the capture input to playback content directly fromPauseBufferSize
- the size in bytes of the buffer SageTV should use to buffer the content for playback, this will also allow pausing of this stream upto the size of the PauseBuffer; use 0 to request no buffering (although SageTV may still decide to use buffering if it deems it necessary)- Returns:
- true if the request was successful, a localized error message otherwise
-
WatchLive
public java.lang.Object WatchLive(java.lang.String CaptureDeviceInput, long PauseBufferSize, java.lang.String PhysicalChannel)
Instructs SageTV to begin playback of content streamed from the specified CaptureDeviceInput. The content may or may not be buffered to a file first depending upon the PauseBufferSize parameter as well as the capabilities of the capture hardware and the network configuration. The channel to view is also specified in this form of the call. NOTE: This is NOT the same as jumping to live when playing back buffered TV content; to do that simply call Seek(Time())- Parameters:
CaptureDeviceInput
- the capture input to playback content directly fromPauseBufferSize
- the size in bytes of the buffer SageTV should use to buffer the content for playback, this will also allow pausing of this stream upto the size of the PauseBuffer; use 0 to request no buffering (although SageTV may still decide to use buffering if it deems it necessary)PhysicalChannel
- the physical channel number that should be tuned to before starting viewing- Returns:
- true if the request was successful, a localized error message otherwise
- Since:
- 6.6
-
LockTuner
public java.lang.Object LockTuner(java.lang.String CaptureDeviceInput)
Instructs SageTV to take control of the specified CaptureDeviceInput. The device may then be used for channel scanning. This will cause any prompts to occur that are a result of taking control of the device. When done using it; CloseAndWaitUntilClosed() should be called.- Parameters:
CaptureDeviceInput
- the capture input to control- Returns:
- true if the request was successful, a localized error message otherwise
- Since:
- 6.6
-
WatchLocalFile
public java.lang.Object WatchLocalFile(java.io.File file)
Instructs SageTV to playback the specified file path that's local to this client- Parameters:
file
- path to playback- Returns:
- true if the request was successful, a localized error message otherwise
- Since:
- 6.4
-
StartPlaylist
public java.lang.Object StartPlaylist(sage.Playlist Playlist)
Starts playback of the specified Playlist. The MediaPlayer will playback everything in the Playlist sequentially until it is done.- Parameters:
Playlist
- the Playlist to being playback of- Returns:
- true if the request was successful, a localized error message otherwise (failure will only occur due to parental control issues)
-
StartPlaylistAt
public java.lang.Object StartPlaylistAt(sage.Playlist Playlist, int StartIndex)
Starts playback of the specified Playlist. The MediaPlayer will playback everything in the Playlist sequentially until it is done. Playback will begin at the item at the specified by the passed in index.- Parameters:
Playlist
- the Playlist to being playback ofStartIndex
- the index in the playlist to start playing at (1-based index)- Returns:
- true if the request was successful, a localized error message otherwise (failure will only occur due to parental control issues)
-
CloseAndWaitUntilClosed
public void CloseAndWaitUntilClosed()
Closes the file that is currently loaded by the MediaPlayer and waits for the MediaPlayer to completely free all of its resources before returning.
-
IsMuted
public boolean IsMuted()
Returns true if the MediaPlayer is currently in a muted state. This will not affect the system volume.- Returns:
- true if the MediaPlayer is muted, false otherwise
-
SetMute
public void SetMute(boolean Muted)
Sets the mute state for the MediaPlayer. This does not affect the system volume.- Parameters:
Muted
- true if the MediaPlayer should be muted, false otherwise
-
GetCurrentMediaTitle
public java.lang.String GetCurrentMediaTitle()
Returns the title of the content that is currently loaded by the MediaPlayer.- Returns:
- the title of the content that is currently loaded by the MediaPlayer
-
GetMediaTime
public long GetMediaTime()
Gets the current playback time of the MediaPlayer. For DVD content this time will return a value appropriate for a current time display (starting at zero). For all other content types, this value will be the time in java.lang.System.currentTimeMillis() units and is relative to the start time of the Airing metadata which represents the currently loaded file. So for a current time display you should subtract the airing start time of the current media file from the returned value.- Returns:
- the current playback time of the MediaPlayer in milliseconds
-
GetRawMediaTime
public long GetRawMediaTime()
Gets the current playback time of the MediaPlayer. This is the current playback time relative to the start of the current playing file. For multiple segment files; this will be relative to the start of the currently playing segment. This is intended to be used by plugin developers for linking events with the media time in the file.- Returns:
- the current playback time of the MediaPlayer in milliseconds
- Since:
- 7.0
-
GetMediaDuration
public long GetMediaDuration()
Returns the duration of the currently loaded MediaFile in milliseconds.- Returns:
- the duration of the currently loaded MediaFile in milliseconds
-
GetCurrentMediaFile
public sage.MediaFile GetCurrentMediaFile()
Returns the MediaFile object that is currently loaded (or loading) by the MediaPlayer- Returns:
- the MediaFile object that is currently loaded (or loading) by the MediaPlayer
-
HasMediaFile
public boolean HasMediaFile()
Returns true if the MediaPlayer currently has a file that is loading or loaded.- Returns:
- true if the MediaPlayer currently has a file that is loading or loaded, false otherwise
-
DoesCurrentMediaFileHaveVideo
public boolean DoesCurrentMediaFileHaveVideo()
Returns true if the MediaPlayer has a file loading or loaded that has video content in it- Returns:
- true if the MediaPlayer has a file loading or loaded that has video content in it, false otherwise
-
IsCurrentMediaFileMusic
public boolean IsCurrentMediaFileMusic()
Returns true if the MediaPlayer has a file loading or loaded, and that file is a music file- Returns:
- true if the MediaPlayer has a file loading or loaded, and that file is a music file
-
IsCurrentMediaFileDVD
public boolean IsCurrentMediaFileDVD()
Returns true if the MediaPlayer has a file loading or loaded, and that file is a DVD- Returns:
- true if the MediaPlayer has a file loading or loaded, and that file is a DVD
-
IsCurrentMediaFileRecording
public boolean IsCurrentMediaFileRecording()
Returns true if the MediaPlayer has a file loading or loaded, and that file is currently being recorded- Returns:
- true if the MediaPlayer has a file loading or loaded, and that file is currently being recorded
-
IsPlaying
public boolean IsPlaying()
Returns true if the MediaPlayer is currently playing back content (i.e. content is fully loaded and not in the paused state)- Returns:
- true if the MediaPlayer is currently playing back content, false otherwise
-
IsShowingDVDMenu
public boolean IsShowingDVDMenu()
Returns true if the MediaPlayer currently has DVD content loaded and that content is showing a DVD menu that can have user interaction- Returns:
- true if the MediaPlayer currently has DVD content loaded and that content is showing a DVD menu that can have user interaction, false otherwise
-
GetCurrentPlaylist
public sage.Playlist GetCurrentPlaylist()
Returns the current Playlist that is being played back by the MediaPlayer. Playlists can be played back using the callStartPlaylist()
- Returns:
- the current Playlist that is being played back by the MediaPlayer, null otherwise
-
GetCurrentPlaylistIndex
public int GetCurrentPlaylistIndex()
Returns the 0-based index into the root Playlist that is currently being played back by the MediaPlayer. 0 is returned if no Playlist is currently being played back.- Returns:
- the 0-based index into the root Playlist that is currently being played back by the MediaPlayer. 0 is returned if no Playlist is currently being played back.
-
GetAvailableSeekingStart
public long GetAvailableSeekingStart()
Gets the earliest time that the current media can be seeked to using theSeek()
call. This will be in absolute time.- Returns:
- the earliest time that the current media can be seeked to in milliseconds
-
GetAvailableSeekingEnd
public long GetAvailableSeekingEnd()
Gets the latest time that the current media can be seeked to using theSeek()
call. This will be in absolute time.- Returns:
- the latest time that the current media can be seeked to in milliseconds
-
IsCorrectParentalLockCode
public boolean IsCorrectParentalLockCode(java.lang.String ParentalLockCode)
Returns true if the argument passed in matches the parental lock code in the system- Parameters:
ParentalLockCode
- the code to test- Returns:
- true if the specified ParentalLockCode matches the parental lock code SageTV is configured to use
-
SetVideoAlwaysOnTop
public void SetVideoAlwaysOnTop(boolean OnTop)
Sets the video portion of SageTV to always be on top of other windows in the desktop (Windows only).- Parameters:
OnTop
- true if the video window of SageTV should be on top of all other windows in the system, false otherwise
-
DVDChapterNext
public void DVDChapterNext()
Informs the MediaPlayer to start playback of the next chapter in the current DVD content.
-
DVDChapterPrevious
public void DVDChapterPrevious()
Informs the MediaPlayer to start playback of the previous chapter in the current DVD content.
-
DVDChapterSet
public void DVDChapterSet(int ChapterNumber)
Informs the MediaPlayer to start playback of the specified chapter in the current DVD content.- Parameters:
ChapterNumber
- the chapter number to start playback of in the current DVD
-
DVDEnter
public void DVDEnter()
Performs the 'Enter' operation when using a menu system in DVD content.
-
DVDMenu
public void DVDMenu()
Performs the 'Menu' operation when playing back a DVD which should bring up the root menu of the DVD
-
DVDTitleMenu
public void DVDTitleMenu()
Performs the 'Menu' operation when playing back a DVD which should bring up the title menu of the DVD
-
DVDReturn
public void DVDReturn()
Performs the 'Return' operation when playing back a DVD which should bring the user back to the last DVD menu they were at
-
DVDTitleNext
public void DVDTitleNext()
Informs the MediaPlayer to start playback of the next title in the current DVD content.
-
DVDTitlePrevious
public void DVDTitlePrevious()
Informs the MediaPlayer to start playback of the previous title in the current DVD content.
-
DVDSubtitleToggle
public void DVDSubtitleToggle()
Toggles the state for subtitle display in the DVD content being played back.
-
DVDSubtitleChange
public void DVDSubtitleChange(int SubtitleNum)
Sets the subtitle that should be displayed in the current DVD content. The names of the languages for the corresponding subtitles are obtained from a call toGetDVDAvailableSubpictures()
. If no arguments are given to this function then the currently displayed subtitle will be changed to the next one- Parameters:
SubtitleNum
- the 0-based index into the list of subtitles that should be displayed
-
DVDAudioChange
public void DVDAudioChange(int AudioNum)
Sets the audio language that should be used in the current DVD content. The names of the languages are obtained from a call toGetDVDAvailableLanguages()
. If no arguments are given to this function then the current audio language will be changed to the next available language- Parameters:
AudioNum
- the 0-based index into the list of audio languages that should be used
-
DVDAngleChange
public void DVDAngleChange(int AngleNum)
Sets the 'Angle' for playback of the current DVD content. The number of angels are obtained from a call toGetDVDNumberOfAngles()
. If no arguments are given to this function then the current angle will be changed to the next available angle- Parameters:
AngleNum
- the 1-based index that indicates which angle should be used for playback
-
ReloadCurrentFile
public void ReloadCurrentFile()
Reloads the current file that is loaded by the MediaPlayer. This is useful when changing configuration options for the MediaPlayer and then showing playback with those changes.
-
DirectPlaybackControl
public void DirectPlaybackControl(int Code, long Param1, long Param2)
Submits an explicit playback control request to the MediaPlayer if it supports it. (Only DVD-based media players support this call)- Parameters:
Code
- this is the value of the control command to be sent to the player, must be one of the following: MENU = 201; Param1 should be 1 for title, 2 for root TITLE_SET = 202; Param1 should be the title number CHAPTER_SET = 205; Param1 should be the chapter number CHAPTER_NEXT = 206; CHAPTER_PREV = 207; ACTIVATE_CURRENT = 208; RETURN = 209; BUTTON_NAV = 210; Param1 should be 1(up), 2(right), 3(down) or 4(left) MOUSE_HOVER = 211; Param1 should be x and Param2 should be y MOUSE_CLICK = 212; Param1 should be x and Param2 should be y ANGLE_CHANGE = 213; Param1 should be the angle number (1-based) SUBTITLE_CHANGE = 214; Param1 should be the subtitle number (0-based) SUBTITLE_TOGGLE = 215; AUDIO_CHANGE = 216; Param1 should be the audio number (0-based)Param1
- the first parameter for the control command (see above)Param2
- the second parameter for the control command (see above)
-
GetDVDCurrentTitle
public int GetDVDCurrentTitle()
Gets the current title number that is being played back for DVD content.- Returns:
- the current title number that is being played back for DVD content, 0 otherwise
-
GetBluRayTitleDescription
public java.lang.String GetBluRayTitleDescription(int TitleNum)
Returns a description of the specified title number if playing back a BluRay. This description will have the total unique duration of the specified title and an asterisk if it is considered to be the 'main' title.- Parameters:
TitleNum
- the title number (1-based) to retrieve a description of- Returns:
- a description of the specified title number if playing back a BluRay; the empty string otherwise
- Since:
- 7.0
-
GetDVDNumberOfTitles
public int GetDVDNumberOfTitles()
Gets the total number of titles in the current DVD content- Returns:
- the total number of titles in the current DVD content
-
GetDVDCurrentChapter
public int GetDVDCurrentChapter()
Gets the current chapter number that is being played back for DVD content.- Returns:
- the current chapter number that is being played back for DVD content
-
GetDVDNumberOfChapters
public int GetDVDNumberOfChapters()
Gets the total number of chapters in the current title in the current DVD content- Returns:
- the total number of chapters in the current title in the current DVD content
-
GetDVDCurrentDomain
public int GetDVDCurrentDomain()
Gets the current 'domain' that the DVD playback is in.- Returns:
- the current 'domain' that the DVD playback is in, uses the following values: 1 = DVD initialization, 2 = disc menus, 3 = title menus, 4 = playback, 5 = stopped
-
GetDVDCurrentAngle
public int GetDVDCurrentAngle()
Gets the current angle number that is being played back for DVD content- Returns:
- the current angle number that is being played back for DVD content
-
GetDVDNumberOfAngles
public int GetDVDNumberOfAngles()
Gets the total number of angles that are currently available to select from in the current DVD content- Returns:
- the total number of angles that are currently available to select from in the current DVD content
-
GetDVDCurrentLanguage
public java.lang.String GetDVDCurrentLanguage()
Gets the current audio playback language that is being used for the current DVD content- Returns:
- the current audio playback language that is being used for the current DVD content
-
GetDVDAvailableLanguages
public java.lang.String[] GetDVDAvailableLanguages()
Gets a list of all of the audio languages that are currently available in the current DVD content- Returns:
- a list of all of the audio languages that are currently available in the current DVD content
-
GetDVDCurrentSubpicture
public java.lang.String[] GetDVDCurrentSubpicture()
Gets the current subtitle that is being used for the current DVD content- Returns:
- the current subtitle that is being used for the current DVD content, null if subtitles are currently disabled
-
GetDVDAvailableSubpictures
public java.lang.String[] GetDVDAvailableSubpictures()
Gets a list of all of the subtitles that are currently available in the current DVD content- Returns:
- a list of all of the subtitles that are currently available in the current DVD content
-
GetMediaPlayerClosedCaptionState
public java.lang.String GetMediaPlayerClosedCaptionState()
Gets the current state that MediaPlayer close captioning is set to use. This can be either a localized version of "Captions Off" or one of the strings: "CC1", "CC2", "Text1", "Text2"- Returns:
- the current state that MediaPlayer close captioning is set to use
-
SetMediaPlayerClosedCaptionState
public void SetMediaPlayerClosedCaptionState(java.lang.String CCType)
Sets the current state that MediaPlayer close captioning should use. This can be one of the strings: "CC1", "CC2", "Text1", "Text2". If any other value is used then closed captioning will be turned off.- Parameters:
CCType
- the new state that MediaPlayer close captioning should use
-
IsMediaPlayerSignalLost
public boolean IsMediaPlayerSignalLost()
Returns true if the source the MediaPlayer is trying to playback from indicates a signal loss. This can happen when trying to watch digital TV stations.- Returns:
- true if the MediaPlayer detects signal loss from the source it's playing back, false otherwise
-
GetSubtitleDelay
public long GetSubtitleDelay()
Gets the delay in milliseconds that is applied to external subtitle files when they are used during playback (can be positive or negative)- Returns:
- the delay in milliseconds that is applied to external subtitle files when they are used during playback.
- Since:
- 6.6
-
SetSubtitleDelay
public void SetSubtitleDelay(long DelayMsec)
Sets the delay in milliseconds that is applied to external subtitle files when they are used during playback (can be positive or negative)- Parameters:
DelayMsec
- the delay in milliseconds that is applied to external subtitle files when they are used during playback- Since:
- 6.6
-
CanAdjustSubtitleTiming
public boolean CanAdjustSubtitleTiming()
Returns true if the subtitles for the currently loaded file can have their timing adjusted. This is true for subtitles that come from external files- Returns:
- true if the subtitles for the currently loaded file can have their timing adjusted; false otherwise
- Since:
- 6.6
-
ApplyRelativeSubtitleAdjustment
public long ApplyRelativeSubtitleAdjustment(int SubCount)
Adjusts the timing for subtitle display by increasing/decreasing the delay so that the sub at the relative SubCount position would be currently displayed.- Parameters:
SubCount
- the relative position from the current sub of the sub that should be displayed now- Returns:
- the value in milliseconds of the current subtitle delay (same as return from GetSubtitleDelay())
- Since:
- 6.6
-
GetRecentChannels
public sage.Channel[] GetRecentChannels()
Returns an array of recently viewed channels. This tracks channels viewed from any mechanism; live or DVR'd.- Returns:
- an array of the most recently viewed channels, most recently viewed are at the head of the array
- Since:
- 8.0
-
ClearRecentChannels
public void ClearRecentChannels()
Clears the list of recently viewed channels.- Since:
- 8.0
-
GetVideoSnapshot
public java.awt.image.BufferedImage GetVideoSnapshot()
Returns an image which is a frame grab of the currently rendered video frame. This is currently only supported on Windows when using VMR9 with 3D acceleration- Returns:
- a java.awt.image.BufferedImage which holds the last rendered video frame, or null if the call cannot be completed
-
-