Open topic with navigation

com.hp.lft.sdk.web

## Class MediaControlDescription

- java.lang.Object
- - com.hp.lft.sdk.internal.PropertiesDescriptionBase
  - - com.hp.lft.sdk.PropertiesDescription
    - - com.hp.lft.sdk.DescriptionBase
      - - com.hp.lft.sdk.web.WebBaseDescription
        - - com.hp.lft.sdk.web.WebElementDescription
          - - com.hp.lft.sdk.web.MediaControlDescription

- All Implemented Interfaces:
    CloneableObject, Description, com.hp.lft.sdk.internal.DescriptionWithVri, java.lang.Cloneable
  Direct Known Subclasses:
    AudioControlDescription, VideoControlDescription

      public abstract class MediaControlDescription
      extends WebElementDescription

  The description of a Web MediaControl (audio control or video control) test object.

- - ### Nested Class Summary

    Modifier and Type | Class and Description
    --- | ---
    `protected static class` | `MediaControlDescription.Init<T extends MediaControlDescription.Init<T>>` Helper class for derived Builder classes.

    - ### Nested classes/interfaces inherited from class com.hp.lft.sdk.web.WebElementDescription

      `WebElementDescription.Builder`

  - ### Field Summary

    - ### Fields inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase

      `properties`

  - ### Constructor Summary

    Modifier | Constructor and Description
    --- | ---
    `protected` | `MediaControlDescription()` Initializes a new instance of the MediaControlDescription class.
    `protected` | `MediaControlDescription(MediaControlDescription.Init<?> init)` Initializes a new instance of the MediaControlDescription class using the Builder pattern.

  - ### Method Summary

    Modifier and Type | Method and Description
    --- | ---
    `StringProperty` | `getCurrentSource()` Returns the URL of the media file currently selected in the browser window.
    `java.lang.Integer` | `getDuration()` Returns the length of the currently selected media file (in milliseconds).
    `java.lang.Double` | `getPlaybackRate()` Returns the speed of the media playback.
    `java.lang.Integer` | `getPlaybackTime()` Returns the current playback position in the media file (in milliseconds).
    `java.lang.String[]` | `getSources()` Returns the list of all media file source URLs.
    `java.lang.Double` | `getVolume()` Returns the volume used when playing the media file.
    `java.lang.Boolean` | `hasAutoPlay()` Indicates whether the media file starts playing as soon as it loads.
    `java.lang.Boolean` | `hasPlaybackControls()` Indicates whether the media player should display playback controls.
    `java.lang.Boolean` | `isMuted()` Indicates whether the media volume is muted.
    `java.lang.Boolean` | `isPlaying()` Indicates whether the media is currently playing.
    `java.lang.Boolean` | `isPlayInLoop()` Indicates whether the media file should start playing again from the beginning as soon as it finishes playing.
    `void` | `setAutoPlay(java.lang.Boolean hasAutoPlay)` Sets whether the media file starts playing as soon as it loads.
    `void` | `setCurrentSource(java.lang.String currentSource)` Sets the URL of the media file currently selected in the browser window.
    `void` | `setCurrentSource(StringProperty currentSource)` Sets the URL of the media file currently selected in the browser window.
    `void` | `setDuration(java.lang.Integer duration)` Sets the length of the currently selected media file (in milliseconds).
    `void` | `setMuted(java.lang.Boolean isMuted)` Sets whether the media volume is muted.
    `void` | `setPlaybackControls(java.lang.Boolean hasPlaybackControls)` Sets whether the media player should display playback controls.
    `void` | `setPlaybackRate(java.lang.Double playbackRate)` Sets the speed of the media playback.
    `void` | `setPlaybackTime(java.lang.Integer playbackTime)` Sets the current playback position in the media file (in milliseconds).
    `void` | `setPlaying(java.lang.Boolean isPlaying)` Sets whether the media is currently playing.
    `void` | `setPlayInLoop(java.lang.Boolean isPlayInLoop)` Sets whether the media file should start playing again from the beginning as soon as it finishes playing.
    `void` | `setSources(java.lang.String[] sources)` Sets the list of all media file source URLs.
    `void` | `setVolume(java.lang.Double volume)` Sets the volume used when playing the media file.

    - ### Methods inherited from class com.hp.lft.sdk.web.WebElementDescription

      `getAccessibilityName, getCSSSelector, getRole, getXPath, setAccessibilityName, setAccessibilityName, setCSSSelector, setCSSSelector, setRole, setRole, setXPath, setXPath`

    - ### Methods inherited from class com.hp.lft.sdk.web.WebBaseDescription

      `cloneTo, getAbsoluteLocation, getAttributes, getClassName, getId, getInnerHTML, getInnerText, getLocation, getName, getOuterHTML, getOuterText, getSize, getStyles, getTagName, getTitle, isVisible, setAbsoluteLocation, setAbsoluteLocation, setAbsoluteLocation, setAttributes, setClassName, setClassName, setId, setId, setInnerHTML, setInnerHTML, setInnerText, setInnerText, setLocation, setLocation, setLocation, setName, setName, setOuterHTML, setOuterHTML, setOuterText, setOuterText, setSize, setSize, setSize, setStyles, setTagName, setTagName, setTitle, setTitle, setVisible`

    - ### Methods inherited from class com.hp.lft.sdk.DescriptionBase

      `getIndex, getIndexType, getVRI, setIndex, setIndexType, setVRI, setVRI`

    - ### Methods inherited from class com.hp.lft.sdk.PropertiesDescription

      `clone`

    - ### Methods inherited from class com.hp.lft.sdk.internal.PropertiesDescriptionBase

      `getValueAs, getValueAsStringProperty, insertValue`

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

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

    - ### Methods inherited from interface com.hp.lft.sdk.CloneableObject

      `clone`

- - ### Constructor Detail

    - #### MediaControlDescription

          protected MediaControlDescription(MediaControlDescription.Init<?> init)

      Initializes a new instance of the MediaControlDescription class using the Builder pattern.
      Parameters:
        `init` - the Builder pattern.

    - #### MediaControlDescription

          protected MediaControlDescription()

      Initializes a new instance of the MediaControlDescription class.

  - ### Method Detail

    - #### setAutoPlay

          public void setAutoPlay(java.lang.Boolean hasAutoPlay)

      Sets whether the media file starts playing as soon as it loads.
      Parameters:
        `hasAutoPlay` - true if the media file starts playing as soon as it loads.

    - #### hasAutoPlay

          public java.lang.Boolean hasAutoPlay()

      Indicates whether the media file starts playing as soon as it loads.
      Returns:
        true, if the media file starts playing as soon as it loads.

    - #### setPlaybackControls

          public void setPlaybackControls(java.lang.Boolean hasPlaybackControls)

      Sets whether the media player should display playback controls.
      Parameters:
        `hasPlaybackControls` - true, if the media player should display playback controls.

    - #### hasPlaybackControls

          public java.lang.Boolean hasPlaybackControls()

      Indicates whether the media player should display playback controls.
      Returns:
        true, if the media player should display playback controls.

    - #### setCurrentSource

          public void setCurrentSource(StringProperty currentSource)

      Sets the URL of the media file currently selected in the browser window.
      Parameters:
        `currentSource` - a StringProperty(or RegExpProperty) representing the URL of the media file currently selected in the browser window.

    - #### setCurrentSource

          public void setCurrentSource(java.lang.String currentSource)

      Sets the URL of the media file currently selected in the browser window.
      Parameters:
        `currentSource` - the URL of the media file currently selected in the browser window.

    - #### getCurrentSource

          public StringProperty getCurrentSource()

      Returns the URL of the media file currently selected in the browser window.
      Returns:
        the URL of the media file currently selected in the browser window.

    - #### setPlayInLoop

          public void setPlayInLoop(java.lang.Boolean isPlayInLoop)

      Sets whether the media file should start playing again from the beginning as soon as it finishes playing.
      Parameters:
        `isPlayInLoop` - true, if the media file should start playing again from the beginning as soon as it finishes playing.

    - #### isPlayInLoop

          public java.lang.Boolean isPlayInLoop()

      Indicates whether the media file should start playing again from the beginning as soon as it finishes playing.
      Returns:
        true, if the media file should start playing again from the beginning as soon as it finishes playing.

    - #### setMuted

          public void setMuted(java.lang.Boolean isMuted)

      Sets whether the media volume is muted.
      Parameters:
        `isMuted` - true, if the media volume is muted.

    - #### isMuted

          public java.lang.Boolean isMuted()

      Indicates whether the media volume is muted.
      Returns:
        true, if the media volume is muted.

    - #### setPlaybackRate

          public void setPlaybackRate(java.lang.Double playbackRate)

      Sets the speed of the media playback. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.
      Parameters:
        `playbackRate` - the speed of the media playback. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.

    - #### getPlaybackRate

          public java.lang.Double getPlaybackRate()

      Returns the speed of the media playback. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.
      Returns:
        the speed of the media playback. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.

    - #### setPlaying

          public void setPlaying(java.lang.Boolean isPlaying)

      Sets whether the media is currently playing.
      Parameters:
        `isPlaying` - true, if the media is currently playing.

    - #### isPlaying

          public java.lang.Boolean isPlaying()

      Indicates whether the media is currently playing.
      Returns:
        true, if the media is currently playing.

    - #### setVolume

          public void setVolume(java.lang.Double volume)

      Sets the volume used when playing the media file. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.
      Parameters:
        `volume` - the volume used when playing the media file. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.

    - #### getVolume

          public java.lang.Double getVolume()

      Returns the volume used when playing the media file. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.
      Returns:
        the volume used when playing the media file. Possible values: Numbers with up to two decimal places. For example, 0.51 or 1.00.

    - #### setDuration

          public void setDuration(java.lang.Integer duration)

      Sets the length of the currently selected media file (in milliseconds).
      Parameters:
        `duration` - the length of the currently selected media file (in milliseconds).

    - #### getDuration

          public java.lang.Integer getDuration()

      Returns the length of the currently selected media file (in milliseconds).
      Returns:
        the length of the currently selected media file (in milliseconds).

    - #### setPlaybackTime

          public void setPlaybackTime(java.lang.Integer playbackTime)

      Sets the current playback position in the media file (in milliseconds).
      Parameters:
        `playbackTime` - the current playback position in the media file (in milliseconds).

    - #### getPlaybackTime

          public java.lang.Integer getPlaybackTime()

      Returns the current playback position in the media file (in milliseconds).
      Returns:
        the current playback position in the media file (in milliseconds).

    - #### setSources

          public void setSources(java.lang.String[] sources)

      Sets the list of all media file source URLs.
      Parameters:
        `sources` - the list of all media file source URLs.

    - #### getSources

          public java.lang.String[] getSources()

      Returns the list of all media file source URLs.
      Returns:
        the list of all media file source URLs.