Bitmovin-Player-Roku-SDK v1.0.0

Documentation for Bitmovin Player Roku SDK

Index

Properties

playerState

playerState: string

Contains a string value equal to the current state of the player (such as play or pause)

error

error: assocarray

Contains an associative array with the fields code and message

warning

warning: assocarray

Contains an associative array with the fields code and message

seek

seek: boolean

Always contains the value of true. Will notify the user when seek has been set to true again, to indicate the start of seeking

seeked

seeked: float

Contains a float representing the seeked position in the video and notifies the user when the seek operation has finished

BitmovinPlayerState

BitmovinPlayerState: assocarray

Always contains an associative array with values for the possible states of the player

Properties

  • PLAYING : playing

    Indicates that the video is currently playing

  • STALLING : stalling

    Indicates that the video is currently stalling

  • PAUSED : paused

    Indicates that the video is currently paused

  • FINISHED : finished

    Indicates that the video is finished playing

  • ERROR : error

    Indicates that the player is currently stopped due to an error

  • NONE : none

    The state of the player at the moment of component creation

  • SETUP : setup

    Indicates that the player has been successfully setup with the default config or a passed in config

  • READY : ready

    Indicates that the video is ready to be played, but is not currently playing

BitmovinFunctions

BitmovinFunctions: assocarray

Always contains an associative array with values for the possible API functions (to be called with callFunc)

Properties

  • SETUP : setup

  • PLAY : play

  • PAUSE : pause

  • PRELOAD : preload

  • SEEK : seek

  • MUTE : mute

  • UNMUTE : unmute

  • CAPTION_MODE : captionMode

  • IS_MUTED : isMuted

  • IS_PLAYING : isPlaying

  • IS_PAUSED : isPaused

  • IS_STALLED : isStalled

  • AVAILABLE_SUBTITLES : availableSubtitles

  • UNLOAD : unload

  • LOAD : load

BitmovinFields

BitmovinFields: assocarray

Always contains an associative array with the possible observable player fields (to be used with observeField)

Properties

  • PLAYER_STATE : playerState

  • ERROR : error

  • WARNING : warning

  • SEEK : seek

  • SEEKED : seeked

Methods

setup

  • setup(config: Object)
  • Setup function to give configuration object to player.

    since

    v1.0.0

    Parameters

    • config: Object

      Required config object.

      • playback: Object

        • autoplay: Boolean (optional) (default: true)

          Determines if videos should play immediately on load

        • muted: Boolean (optional) (default: false)

          Determines if videos should be initially muted

      • adaptation: Object

        • preload: Boolean (optional) (default: true)

          Determines if, on load, the video should immediately start to buffer

      • source: Object

        Object containing data pertaining to a specific video source

        • title: String (optional)

          Title of video source

        • dash: String (optional)

          Url to dash video source

        • hls: String (optional)

          Url to hls video source

        • smooth: String (optional)

          Url to smooth video source

        • progressive: String (optional)

          Url to progressive video source

        • subtitleTracks: Object[]

          Array of subtitle tracks to side load

          • url: String (optional)

            Url to subtitle track

          • language: String (optional)

            Language for subtitle track

        • drm: Object

          Object containing data relevant to DRM options

          • widevine: Object

            Object containing data specific to Widevine DRM

            • LA_URL: String (optional)

          • playready: Object

            Object containing data specific to Playready DRM

            • LA_URL: String (optional)

    Returns Void

play

  • play(param: Invalid)
  • Function called to play video by setting control on the video node to "play".

    since

    v1.0.0

    Parameters

    • param: Invalid

      invalid param, unused but due to nature, required to be passed in.

    Returns Void

pause

  • pause(param: Invalid)
  • Function called to play video by setting control on the video node to "pause".

    since

    v1.0.0

    Parameters

    • param: Invalid

      invalid param, unused but due to nature, required to be passed in.

    Returns Void

preload

  • preload(param: Invalid)
  • Function called to play video by setting control on the video node to "prebuffer".

    Parameters

    • param: Invalid

      invalid param, unused but due to nature, required to be passed in.

    Returns Void

seek

  • seek(newTime: Integer)
  • Function called to seek to new time, in seconds, on the video node. Also, handles seeking state.

    since

    v1.0.0

    Parameters

    • newTime: Integer

      time to seek to in seconds.

    Returns Void

mute

  • mute(param: Invalid)
  • Function called to mute current video.

    since

    v1.0.0

    Parameters

    • param: Invalid

      invalid param, unused but due to nature, required to be passed in.

    Returns Void

unmute

  • unmute(param: Invalid)
  • Function called to unmute current video.

    since

    v1.0.0

    Parameters

    • param: Invalid

      invalid param, unused but due to nature, required to be passed in.

    Returns Void

captionMode

  • captionMode(ccMode: String)
  • Function called to set captions mode on the video node. This effects global settings.
    ccModes: "On", "Off", "Instant Replay", "When Mute (Roku TV Only)"

    since

    v1.0.0

    Parameters

    • ccMode: String

      String to set captions to.

    Returns Void

isMuted

  • isMuted(param: Invalid)
  • Function to get current mute value.

    since

    v1.0.0

    Parameters

    • param: Invalid

      invalid param, unused but due to nature, required to be passed in.

    Returns Boolean

isPlaying

  • isPlaying(param: Invalid)
  • Function to get if player is currently playing

    since

    v1.0.0

    Parameters

    • param: Invalid

      invalid param, unused but due to nature, required to be passed in.

    Returns Boolean

isPaused

  • isPaused(param: Invalid)
  • Function to get if player is currently paused

    since

    v1.0.0

    Parameters

    • param: Invalid

      invalid param, unused but due to nature, required to be passed in.

    Returns Boolean

isStalled

  • isStalled(param: Invalid)
  • Function to get if player is currently buffering, referred to as "stalled" by Bitmovin API.

    since

    v1.0.0

    Parameters

    • param: Invalid

      invalid param, unused but due to nature, required to be passed in.

    Returns Boolean

availableSubtitles

  • availableSubtitles(param: Invalid)
  • Function to get the available subtitles on the current video.

    since

    v1.0.0

    Parameters

    • param: Invalid

      invalid param, unused but due to nature, required to be passed in.

    Returns Array

unload

  • unload(param: Invalid)
  • Function to unload video and stop observing fields.

    since

    v1.0.0

    Parameters

    • param: Invalid

      invalid param, unused but due to nature, required to be passed in.

    Returns Void

load

  • load(source: Object)
  • Function to load a source object into the video node, set up player states, and show video on the scene.

    since

    v1.0.0

    Parameters

    • source: Object

      Source object, formatted to conform to the Bitmovin API.

      • title: String (optional)

        Title of video source

      • dash: String (optional)

        Url to dash video source

      • hls: String (optional)

        Url to hls video source

      • smooth: String (optional)

        Url to smooth video source

      • progressive: String (optional)

        Url to progressive video source

      • subtitleTracks: Object[]

        Array of subtitle tracks to side load

        • url: String (optional)

          Url to subtitle track

        • language: String (optional)

          Language for subtitle track

      • drm: Object

        Object containing data relevant to DRM options

        • widevine: Object

          Object containing data specific to Widevine DRM

          • LA_URL: String (optional)

        • playready: Object

          Object containing data specific to Playready DRM

          • LA_URL: String (optional)

    Returns Void

Generated using TypeDoc