Update cookies preferences
Promotic

Play - method of the PmgVideo object

Description:
Play the media file according to set parameters.
Syntax:
Empty Play([String sParams])
Parameters:
sParams[optional] (String) List of string parameters that specify the playing type. Entries are in the KeyVal format, for example "from:0;to:-1;sound:yes;".
"from:xxx;" (optional) - Specifies, from which position (number of the shot) the animation is played.
0 (default) - The first shot of the played animation sequence
-1 - The last shot of the played animation sequence. It has sense if set reverse:yes, i.e. it is played from the last shot backwards.
1,2,3... - Numeric value specifies the shot number.
"to:xxx;" (optional) - Specifies, to which position (number of the shot) the animation is played.
0 - The first shot of the played animation sequence. It has sense if set reverse:yes, i.e. it is played from a shot backwards to the beginning.
-1 (default) - The last shot of the played animation sequence.
1,2,3... - Numeric value specifies the shot number.
"loop:xxx;" (optional) - Specifies whether the file is replayed repeatedly.
-1 (default) - the file is replayed repeatedly infinitely.
1,2,3... - Numeric value specifies the number of replays. Options 2,3,... are supported only if the "Playing type" configurator is set to Simple.
"reverse:xxx;" (optional) - Specifies whether the file is played backwards, i.e. from the end to the beginning.
yes - The file is played backwards, i.e. from the end to the beginning. The first and the last shot is specified by the from,to parameters.
The option is supported only if the "Playing type" configurator is set to Multimedia.
For some file types (encoded) the option doesn't need to be functional.
no (default) - The file is played from beginning to the end. The first and the last shot is specified by the from,to parameters.
"sound:xxx;" (optional) - Specifies whether the file is played with the sound if it contains the audio track.
yes (default) - The file is played with the sound.
The option is supported if the "Playing type" configurator is set to Multimedia.
no - The file is played without the sound.
Note:
This method is also functional in Web panels. The additional specification by the sParams parameter is not functional for the Web.
See also:
- PmgVideo.Stop (method)
Example1:
The following example either starts unlimited playing of the animation or stops the played animation.
JavaScriptVBScriptSelect and copy to clipboard

var bPlay;
var oAnimate = pMe.Items("/WAnimate");
// ... Setting bPlay variable
if (bPlay)
{
oAnimate.Play();
}
else
{
oAnimate.Stop();
}
Example2:
The example starts playing the animation from 10th to 30th shot with the sound. The file is played only once. The sound is played only if the "Playing type" configurator is set to Multimedia.
JavaScriptVBScriptSelect and copy to clipboard

oAnimate.Play("from:9;to:29;loop:1;");
Example3:
The example starts playing the animation from 10th shot to the end without the sound. The file is played 5-times (the "Playing type" configurator must be set to Simple).
JavaScriptVBScriptSelect and copy to clipboard

oAnimate.Play("from:9;to:-1;loop:5;sound:no;");
Example4:
The example runs the animation playback backwards from the end to 10th frame. The playback is looped.
JavaScriptVBScriptSelect and copy to clipboard

oAnimate.Play("from:-1;to:9;loop:-1;reverse:yes;");
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.