MC Altair Variable: defaultEndAction
The defaultEndAction variable defines what happens when a video stream (clip) reaches the end. This variable is available from version 0.6, and is only currently supported for progressive download files (i.e. not rtmp streaming).
|Variable Name||Possible Values||Additional options||Default|
|defaultEndAction||previewImage, pauseAtStart, pauseAtEnd, stop, repeat
By default, when a video stream reaches the end, it returns to the same (or similar) state as defined at startup. For example, if you use a preview image and have the First Play button showing, the player will return to that state. If you have no preview image defined, the player will return to the first frame.
To change the default settings, use one of these options:
defaultEndAction = 'pauseAtStart'; Return to the first frame of the video and pause there. This is the default if no preview image is defined.
defaultEndAction = 'pauseAtEnd'; Pause on the last frame of the video.
defaultEndAction = 'stop'; Clear the video stream completely (this was the default behavior in v0.5).
defaultEndAction = 'repeat'; Automatically repeat the file. Technically, all this does is turn on the autoRepeat function on when the player loads.
By default, users can turn off autoRepeat by clicking the button in the control panel. You can define an additional endAction that takes over if this happens. For example:
defaultEndAction = 'repeat,pauseAtStart';
In this case the player will repeat the file indefinitely until the user stops it or turns autoRepeat off. If autoRepeat is turned off, the next time the video reaches the end it will return to the start and then pause.
First Play Button
By default the First Play button is shown when the video ends (unless fpButtonOpacity is set to 0). To disable it, add the fpButton option after a comma, for example:
defaultEndAction = 'pauseAtStart,fpButton=off';
You can use the options above in any combination, e.g.:
defaultEndAction = 'repeat,stop,fpButton=off';