com.samsung.multiscreen

## Class VideoPlayer

- java.lang.Object
- - com.samsung.multiscreen.Player
  - - com.samsung.multiscreen.VideoPlayer

-     public class VideoPlayer
      extends Player

  The `VideoPlayer` class allows control Video Player on TV side. It extends Player class and defines video player functionality.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static interface` | `VideoPlayer.OnVideoPlayerListener` Public Listener Interface for Video Player Notice events

    - ### Nested classes/interfaces inherited from class com.samsung.multiscreen.Player

      `Player.RepeatMode`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addOnMessageListener(VideoPlayer.OnVideoPlayerListener listener)` Add a listener for messages of video player.
    `void` | `addToList(List<Map<String,String>> videoList)` public API to add content to list.
    `void` | `addToList(Uri ContentUri)` public API to add content to list.
    `void` | `addToList(Uri uri, String title, Uri thumbUri)` public API to add content to list.
    `void` | `clearList()` public API to delete whole queue.
    `void` | `forward()` Forward Content
    `void` | `getList()` public API to fetch the queue.
    `void` | `playContent(Uri contentUrl, Result<Boolean> result)` public API to play video content
    `void` | `playContent(Uri contentUrl, String title, Uri thumbnailUrl, Result<Boolean> result)` public API to play video content
    `void` | `removeFromList(Uri uri)` public API to delete content from queue.
    `void` | `repeat()` toggles repeat mode on/off
    `void` | `rewind()` Rewind Content
    `void` | `seekTo(int time, TimeUnit timeUnit)` seeks video to specified time position.
    `void` | `setRepeat(Player.RepeatMode mode)` sets repeat mode to ON or OFF

    - ### Methods inherited from class com.samsung.multiscreen.Player

      `disconnect, disconnect, disconnect, getControlStatus, isConnected, isDebug, mute, next, pause, play, previous, removePlayerWatermark, resumeApplicationInForeground, setDebug, setOnClientConnectListener, setOnClientDisconnectListener, setOnConnectListener, setOnDisconnectListener, setOnErrorListener, setOnReadyListener, setPlayerWatermark, setVolume, standbyConnect, standbyConnect, standbyConnect, standbyConnect, stop, unMute, volumeDown, volumeUp`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### playContent

          public void playContent(Uri contentUrl,
                                  Result<Boolean> result)

      public API to play video content
      Parameters:
        `contentUrl` - uri of the video to be played
        `result` - callback

    - #### playContent

          public void playContent(Uri contentUrl,
                                  String title,
                                  Uri thumbnailUrl,
                                  Result<Boolean> result)

      public API to play video content
      Parameters:
        `contentUrl` - uri of the video to be played
        `title` - title of the video
        `thumbnailUrl` - thumbnail url
        `result` - callback

    - #### forward

          public void forward()

      Forward Content

    - #### rewind

          public void rewind()

      Rewind Content

    - #### seekTo

          public void seekTo(int time,
                             TimeUnit timeUnit)

      seeks video to specified time position.
      Parameters:
        `time` - the offset in specified time units from the start to seek to
        `timeUnit` - unit of time in which time is specified.

    - #### repeat

          public void repeat()

      toggles repeat mode on/off

    - #### setRepeat

          public void setRepeat(Player.RepeatMode mode)

      sets repeat mode to ON or OFF
      Parameters:
        `mode` - repeatOff : repeat OFF repeatSingle : repeat Single repeatAll : repeat All

    - #### getList

          public void getList()

      public API to fetch the queue.

    - #### clearList

          public void clearList()

      public API to delete whole queue.

    - #### removeFromList

          public void removeFromList(Uri uri)

      public API to delete content from queue.
      Parameters:
        `uri` - the uri of the content

    - #### addToList

          public void addToList(Uri ContentUri)

      public API to add content to list.
      Parameters:
        `ContentUri` - the uri of the content

    - #### addToList

          public void addToList(Uri uri,
                                String title,
                                Uri thumbUri)

      public API to add content to list.
      Parameters:
        `uri` - the uri of the content
        `title` - the title of the content
        `thumbUri` - the thumbnail image url related to the content

    - #### addToList

          public void addToList(List<Map<String,String>> videoList)

      public API to add content to list.
      Parameters:
        `videoList` - List of Maps of audio lists.

    - #### addOnMessageListener

          public void addOnMessageListener(VideoPlayer.OnVideoPlayerListener listener)

      Add a listener for messages of video player.
      Parameters:
        `listener` - the message listener to invoke when a message is received with the specified event