DisplayAddObject: video |
Top Previous Next |
Message
DisplayAddObject <docname> <objectname> video <x> <y> <filename> [-loop | -noloop] [-wait | -playimmediate | -playwhenvisible] [-width x] [-height y] [-audio | -noaudio] [-top | -middle | -bottom] [-left | -centre | -right] [-backcolour <red> <green> <blue>]
Originator
Client
Response
General: SyntaxError: insufficient parameters to DisplayAddObject SyntaxError: invalid parameters to DisplayAddObject Error: document docname not found by DisplayAddObject Error: unknown object type
Video: SyntaxError: insufficient parameters to DisplayAddObject / video SyntaxError: invalid parameters to DisplayAddObject / video SyntaxError: Video given invalid size (DisplayAddObject/bitmap) Error: DisplayAddObject not possible, would create too many video views for document, use fewer or reconfigure WhiskerServer Error: DisplayAddObject not possible, current views for document don't support video, reconfigure WhiskerServer Error: failed to create video object Error: failed to load video file "filename" Info: added video "filename" to display document docname
Response (immediate socket)
Success Failure
Details
Adds a video object.
Defaults: -noloop -wait -width -1 -height -1 -audio -left -top
Restrictions on looping with very short videos
When a looping video ends, the main (GUI) thread restarts it. For very brief or single-frame videos, this causes excessive load on the GUI thread, so WhiskerServer appears to grind to a halt. The load is arbitrarily high: the video is started, stops immediately, says "restart me...", and so all spare GUI thread time is consumed. Therefore, Whisker will disable looping on any video shorter than (arbitrarily) 0.5 s.
What could you do instead? Well, you could (a) use a still image, if you're trying to use a single-frame video as a still image; (b) edit your video file yourself, repeating it until it's at least at the threshold length, and then Whisker will loop it happily.
Revision history
Looping restriction in WhiskerServer v4.5. Implemented in WhiskerServer version 4.0. Vertical/horizontal alignment options added in v4.2.1. Background colour option added in v4.6.1.
See also
|