Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

See the Image Decryption section in the roImagePlayer entry for details on displaying encrypted images.

Warning
titleImportant

The video player no longer accepts "{A|A}" AES encryption keys (i.e. where the top and bottom 64 bits of the key are identical).

SetViewMode(mode As

...

String) As Boolean 
Anchor
setviewmode
setviewmode

Sets the scaling of the video in relation to the video window. The passed integer string can be one of the following values:

  • 0"ScaleToFit": Scales the video to fill the window. The aspect ratio of the source video is ignored, so the video may appear stretched/squashed.
  • 1"LetterboxedAndCentered": Letterboxes and centers the window. The aspect ratio of the source window is maintained.
  • 2:(Default) "FillScreenAndCentered": Scales the video to fill the window. The aspect ratio is maintained, so the video may appear cropped. This is the default behavior.

...

  • "Centered": Centers the window.
Note
titleNote

View modes rely on correct aspect-ratio marking from video files, and

...

some files may be marked

...

incorrectly.

SetRectangle(r As roRectangle) As Void

Specifies the placement and dimensions of the video window using a passed roRectangle instance.

...

Applies one of eight transforms to the video plane. This method works equally well with all video sources (files, streams, HDMI input) and can be called separately on multiple roVideoPlayer instances. Calls to this method only take effect when the next file/source is played, and transitions to a transformed video do not take place seamlessly.

  • "identity": No transformation (default behavior)
  • "rot90": 90 degree clockwise rotation
  • "rot180": 180 degree rotation
  • "rot270": 270 degree clockwise rotation
  • "mirror": Horizontal mirror transformation
  • "mirror_rot90": Mirrored 90 degree clockwise rotation
  • "mirror_rot180": Mirrored 180 degree clockwise rotation
  • "mirror_rot270": Mirrored 270 degree clockwise rotation

...

  • Filename: The name/path of a file to be used for playback
  • Url: The URL of a video stream to be used for playback
  • FadeInLength: The length (in milliseconds) of fade-in at the beginning of the media
  • FadOutLength: The length (in milliseconds) of fade-out at the end of the media
  • Transform: The rotation of the video. See the the SetTransform() entry  entry for a list of applicable values.
  • Decoder: The friendly_name of the decoder that you wish to use to play the video.
  • LoopMode: The looping mode for media playback. See the the SetLoopMode()entry  entry for a list of applicable values.
  • ViewMode: The view mode of the video window. See the SetViewMode() entry for a list of applicable values.
  • StreamLatency: The amount of deviation (in milliseconds) from the default latency value: For example, a value of -500 will reduce the latency by half a second; a 500 value will increase the latency by half a second; and a 0 value will specify the default latency. Specifying a negative value will not change the buffer size; instead, it will give the buffer less time to fill up before playback begins. Usable values extend to approximately -750, though this value may differ depending on the network environment. Reducing the latency too much will result in obvious playback stutter.
  • StreamFadeIn: The length (in milliseconds) of audio/video fade-in for streams.
  • StreamLowLatency: Low-latency mode for RTSP streams. Setting this parameter to True will achieve the lowest possible latency for a stream, but at a reduced maximum bitrate.
  • StreamProbe: The stream probe type. This parameter can be set to "deep" (to include video dimensions, audio sample rate, etc.) or "shallow".
  • StreamMaxBitrate: The maximum initial bitrate (in bytes) for adaptive streaming.

...

Sets persistent properties for video playback. These properties can be temporarily overridden by the parameters in a PlayFile()  call. See the PlayFile()entry  entry for a list of available parameters.

...

Specifies the looping mode for media playback. If this method is passed True, a single media file will loop seamlessly if possible. If the video file cannot be looped seamlessly, then the video will loop with seams. Setting this method to False, which  This method can also accept one of the following strings:

  • "NoLoop": Looping is disabled in all cases. This is the default behavior,

...

  • allowing for playback of multiple files in a playlist—with noticeable gaps between the end and beginning of the file.

...

  • "AlwaysLoop": The video is looped seamlessly if possible; otherwise, it is looped with seams.

...

  • "SeamlessLoopOrNotAtAll": The video is looped seamlessly if possible; otherwise, it is not looped at all.

...

  • "LoopButNotSeamless": The video is looped with seams.

Alternatively, this method can accept a Boolean argument: 

  • true: A single media file will loop seamlessly if possible. If the video file cannot be looped seamlessly, then the video will loop with seams. 
  • false: Looping is disabled in all cases.

...

*or not specified.

  •  This is the default behavior, allowing for playback of multiple files in a playlist—with noticeable gaps between the end and beginning of the file.
Note
titleNote

Media End events are only sent if seamless looping is disabled, or if enable_ if _seamless is enabled and the the mode is set to "SeamlessLoopOrNotAtAll" and the file cannot be looped seamlessly.

...

Returns the amount of time the current file or IP stream has been playing (in milliseconds). If SetLoopMode() is set to True true, the value will not reset when playback loops. If looping playback or IP streaming continues uninterrupted for approximately 25 days, the value will wrap around and become negative.

...

ifAudioControl

See the roAudioPlayer  entry entry for documentation of ifAudioControl.

...

Code Block
v1=CreateObject("roVideoPlayer")
v1.SetViewMode(1"LetterboxedAndCentered")
r=CreateObject("roRectangle", 0, 0, 1920, 1080)
v1.SetRectangle(r)
v1.SetTransform("rot90")

aa1=CreateObject("roAssociativeArray")
aa1.MultiscreenWidth = 2
aa1.MultiscreenHeight = 1
aa1.MultiscreenX = 1
aa1.MultiscreenY = 0
aa1.Filename = "example.mp4"
v1.PlayFile(aa1)

...