|
|
|
|
|
- Overview
- Opening and playing a video in an Image control
- Opening a Video file
- Playing a video file
- Pausing or stopping the video
- Pausing the video
- Stop
- Controlling the volume
Playing a video with the MCI functions
MCI functions are used to easily handle media files. This help page presents the different operations that can be performed by the MCI functions. To easily handle a video in WINDEV, all you have to do is use an Image control. The following operations can be performed: - Open and play a video in an Image control,
- Pause or stop the video,
- Control the volume.
Opening and playing a video in an Image control Opening a Video file To open a video file, all you have to do is call MCIOpen. Most of the video files can be handled by the MCI functions. Example:
sFic is string
sFic = fSelect(SAI_FIC, "Sélectionnez un fichier vidéo...",...
"Fichiers vidéo (*.avi)"+ TAB + "*.avi" + CR + ...
"Fichiers vidéo MPEG (*.mpg)" + TAB + "*.mpg" + CR + ...
"Fichiers Quick Time (*.mov)" + TAB + "*.mov" + CR + ...
"Tous les fichiers (*.*)" + TAB + "*.*", ...
"*", fselOpen + fselExist)
IF sFic <> "" THEN
SAI_FIC = sFic
MCIClose("MaVidéo")
MCIOpen(SAI_FIC, "MaVidéo", MciStyleChild, IMG_VIDEO)
IF ErrorOccurred = True THEN
Error(ErrorInfo())
END
END
Playing a video file To play a video file, all you have to do is use MCIPlay. Note To play the AVI video in a loop, simply use the MCIExecute function, specifying the "play AVI repeat" command line:
MCIExecute("play AVI Repeat")
Pausing or stopping the video Pausing the video To pause the video, all you have to do is call MCIPause. Stop
MCIStopPlaying("MaVidéo")
Tip Don't forget to reposition the video at the beginning of the file. Therefore, the video will start from the beginning the next time it is played. To control the volume, all you have to do is call MCIVolume. The right volume, the left volume, the treble volume and the bass volume can be turned up and down.
Related Examples:
|
Unit examples (WINDEV): Play a video
[ + ] Playing a video from a WINDEV application: - Load a video - Playing a video - Pause a video - Stop a video
|
|
Complete examples (WINDEV): WD Multimedia
[ + ] This example shows how to play animations, audio and video files (MP3, WAV, AVI, MPEG, etc.) using the Multimedia control in WINDEV.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|