Page History: Video Player Element
Compare Page Revisions
Page Revision: 2014/11/06 05:01
|
Video Player Element
|
Info |
Category: |
Multimedia |
|
AddIn: |
Base Elements |
Creator: |
OkazoLab Team |
|
Scope: |
Parent Event |
Owns Snippets: |
no |
|
Usage: |
Runtime Screen,Snippets |
Video element is capable to show videos in experiments.
Description
Video Player element allows the playback of video clips that are stored in the
Material Library. Different video formats are supported depending on installed codecs. The element provides all playback controls, time audit and various rendering options.
Multiple clips can be loaded into element's list in order to form a stimulus set.
Snapshots
Practical Use
The selected clip will be shown inside of a rectangular area on the screen and its appearance can be modified with properties values that you define for the Video element. For example, you can apply the visual effects for all video frames or adjust the size and rotation angle of the video window.
Video element also can work with a list of video clips loaded from the experiment Library. It's handy for experimental scenarios where you need to present a random video clip at the same position on the screen. For example, you can define which video resources in the Library have to be in the element's resource list and choose an appropriate list index in the Video element at the start of each trial. All video clips will be rendered at the same position with the same size and visual properties that you have defined for the given Video element.
Video element gives you a full control on the playback process: you can stop the playback, re-run it and rewind a video clip to the certain playback position.
Adding a video to an event
- Find the video clip that you wish to play and add it to the Material Library.
- On an event, click on "add element". From the 'MULTIMEDIA' category, select the Video player element
- Drag the media item from the material library onto the video player element in the left element plane. (Not onto the square on the event surface)
- Now you may adjust the size of the player by dragging the corners and you can adjust the relevant properties. (e.g Play back mode etc...)
Notes
- By default, the playback start in Video element is synchronized with the activation of the parent event. You can use multiple Video elements in the same event but, in this case, they will be started one by one, usually with a neglible delay.
- Rendering of video clip frames is synchronized both with clip's timeline and the settings in your experiment. If you have enabled the synchronization with vertical monitor retraces in your experiment, each video frame will be also synchronized with it. The accurate timing of a video playback is not guaranteed and depends on a current computer load. However, you can always measure the actual duration of each frame in a playing video clip. Each time the new video frame is about to be rendered EventIDE calls OnPreparing snippet of the parent event. Checking the current time (e.g., by reading the Elapsed Time property of the parent event) inside of this snippet and comparing it with the previous call of the same snippet will give you a quite accurate measure of a single frame duration. If multiple video clips are shown simultaneously, then the same OnPreparing call can be made before rendering several frames in parallel.
Synchronized Internal Actions
Experiment Start | Parent Event Onset | Status change between Onset/Offset | Parent Event Offset | Experiment End |
---|
| If playback mode is set to 'single' or 'looped' playback, then start playback upon onset. | 1) Elements are triggered when the clip is finished playing. 2) For every frame, the parent's redrawing snipped is called. | All playback is aborted. | |
Generic Properties
Name | Description | Constraints | Value Type | Upon Runtime Change |
---|
Control |
Playback Mode | Defines how the clip is played. 0 - manual playback. 1 - Single playback on the event onset (default, i.e clip is automatically played). 2 Looped playback on event onset. | , | stPlayMethod, Int32 | |
Is Playing | At the runtime indicates if the current video clip is playing at the given moment of time. While the clip is playing, you can set this property to false to make a pause in a playback. If the playback has finished, setting this property to true will initiate the playback again. | | Boolean | Upon changing to false, the video will stop playing. Similarly for true. |
Playback |
Volume | Volume of the audio playback, from the ground (0) to full (100) | , | Int32 | |
Balance | Stereophonic balance of the audio playback, from -100 (left) to 100 (right). Zero is default center. | , | Int32 | |
Position | The current position of the playback, in percents. The property can be used for the adjustment of the playback position at the runtime. If the property value is set to non-zero at the design time, then the playback in an experiment will start from the set position. | , | float | Playback position is shifted, (e.g Rewinding) |
Current Frame | Describes the current playback position defined by a number of video frame. While a clip is playing, the frame number can be retrieved or adjusted to rewind the clip | | Int32 | |
Current Position | Describes the current playback position defined in percentages to the total duration of the current video clip. While a clip is playing, the position can be retrieved or adjusted to rewind the clip | | Double | |
+=== Properties inherited from clVisualElement ===
Name | Description | Constraints | Value Type | Upon Runtime Change |
---|
VISUAL APPEARANCE |
Alpha Masking | Defines whether the visual content rendered by this element will be used as an opacity mask which is applied onto the given event surface. The active opacity mask allows one to expose pixels of the parent event surface through a solid background of the given event. If the value is true, the darker pixels of the content will make more transparent holes on the entire event surface. | | Boolean | |
AntiAliasing | If true, the rendered content will be anti-aliased for smoother visual appearance. If false, rendering will be authentic to its source, e.g. a bitmap. | | Boolean | |
Position | Defines the position of the element viewport on the screen. The position can be set in any of three coordinate systems: a) pixels, b) polar, c) central. | | clPoint | |
Size | Defines the size of the element viewport on the screen. The size can be set in any of three coordinate systems: a) pixels, b) visual degrees, c) 'relative-to-screen' size. | | clSize | |
Z Order | Indicates the current depth order of the element viewport on the surface of the parent event. The greatest number corresponds to the top position. The order can be changed by moving the element up and down in the element list. | | Int32 | |
Pivot Point | Defines the pivot point (coordinate and the rotation centers) within the element viewport. | | stAlignment or Int32 | |
Visible | Defines whether the element is currently visible on the event surface. The property is convenient for switching visual content on and off. | | Boolean | |
Rotation | Defines the rotation angle (in degrees) of element viewport relative to the its pivot point. | | Double in the range 0..360 | |
EFFECTS |
Transparent Color | The color of the original pixels of rendered content that will be set as transparent. | | stColor | |
Transparency Tolerance | Tolerance ratio for choosing colors that become transparent. Zero means that effect is not applied, 1 denotes that all colors will become trasparent. | | Int32, range (0..100) | |
Color Mask | Produces a multiplicative combination of the original pixels and the selected mask color (except the alpha channel). The effect emulates a look through a colored glass. White or transparent mask color doesn't change the original pixels. | | stColor | |
Opacity | Opacity of the rendered content. | | Int32, range (0..100) | |
Contrast | Contrast of the rendered content. | | Int32, range (-100..100) | |
Brightness | Defines the brighness of the rendered content. | | Int32, range (-100..100) | |
Saturation | Saturation of the rendered content. | | Double | |
Pixelation | Defines the pixel scale of the rendering. | | Int32, range (0..100) | |
Blurring | The radius used in the gaussian blur of rendered content, as a pixel-based factor. The default is 0 which means no blurring. | | Int32 | |
POSITIONAL JITTER |
Reset Jitter | Set to true at runtime to reset the current positional jitter. | | Boolean, set true for action | |
Current Jitter | Jitter range, in pixels (non inclusive). | . | clSize | |
Jitter Range | Jitter range, centered at the original position of the element. | . | clSize | |
+=== Properties inherited from clElement ===
Inherited properties of clElement
Name | Description | Constraints | Value Type | Upon Change |
---|
Control |
Is Enabled | If set to false the element is completely omitted when the experiment is run. | | Boolean |
|
Title | Title of the element. | | String |
|