Class MediaControlDescription

All Implemented Interfaces:
CloneableObject, Description, com.hp.lft.sdk.internal.DescriptionWithVri, 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.
  • Constructor Details

    • 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 Details

    • setAutoPlay

      public void setAutoPlay(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 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(Boolean hasPlaybackControls)
      Sets whether the media player should display playback controls.
      Parameters:
      hasPlaybackControls - true, if the media player should display playback controls.
    • hasPlaybackControls

      public 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(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(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 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(Boolean isMuted)
      Sets whether the media volume is muted.
      Parameters:
      isMuted - true, if the media volume is muted.
    • isMuted

      public Boolean isMuted()
      Indicates whether the media volume is muted.
      Returns:
      true, if the media volume is muted.
    • setPlaybackRate

      public void setPlaybackRate(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 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(Boolean isPlaying)
      Sets whether the media is currently playing.
      Parameters:
      isPlaying - true, if the media is currently playing.
    • isPlaying

      public Boolean isPlaying()
      Indicates whether the media is currently playing.
      Returns:
      true, if the media is currently playing.
    • setVolume

      public void setVolume(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 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(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 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(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 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(String[] sources)
      Sets the list of all media file source URLs.
      Parameters:
      sources - the list of all media file source URLs.
    • getSources

      public String[] getSources()
      Returns the list of all media file source URLs.
      Returns:
      the list of all media file source URLs.