ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Controls, pages and windows / Multimedia functions
  • Using the MultimediaPlay function
  • Android specific features
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
MultimediaPlay (Function)
In french: MultimédiaJoue
Plays a multimedia file in a Multimedia control.
WEBDEV - Browser code Remark: Depending on the video type and on the browser configuration, this function may not be supported. In this case, its use will have no effect but no error will be triggered.
Example
WINDEVReports and QueriesUniversal Windows 10 AppUser code (UMC)
MyFile is string = "C:\My music\mysong.mp3"
IF MultimediaPlay(MM_Multimedia1, MyFile) = False THEN
Error("Error while playing the file")
END
Syntax
<Result> = MultimediaPlay(<Multimedia control> [, <File to play> [, <Options>]])
<Result>: Boolean
  • True if the file was successfully played,
  • False otherwise. To get more details on the error, use ErrorInfo.
WEBDEV - Browser code Remark: ErrorInfo is not available.
<Multimedia control>: Control name
Name of Multimedia control used to play the media file.
<File to play>: Optional character string
Name and path of the media file to play.
If this parameter is specified, the media file is loaded in memory and played. The media file is always played from the beginning.
If this parameter is not specified or if it corresponds to an empty string (""), the file associated with the control (by MultimediaOpen for example) is automatically used.
WEBDEV - Browser code This parameter is not available. The file associated with the control is automatically used.
Android Corresponds to:
  • the name and path of media file to play.
  • a URL (to play the video in streaming).
  • a resource name (file name + extension) added to the application via the generation wizard.
iPhone/iPad Corresponds to:
  • the name and path of media file to play.
  • a video URL on a server. Remark: the YouTube videos cannot be played.
  • a resource name (file name + extension) added to the application via the generation wizard.
<Options>: Integer constant
Android Option for reading the file:
MultimediaNonBlockingThe loading of the multimedia file is a non-locking operation.
Remarks

Using the MultimediaPlay function

MultimediaPlay can be used:
  • to load a multimedia file in memory and to play this file.
  • to play a media file loaded by MultimediaOpen.
  • to restart a file paused by MultimediaPause.
    Remark: To pause the playback of a media file, it must have been started via MultimediaOpen followed by MultimediaPlay, specifying only the name of the control.
iPhone/iPad Several Multimedia controls can be created in the same window. However, multiple videos cannot be played simultaneously with MultimediaPlay.
Android

Android specific features

  • By default, MultimediaPlay is a blocking function until the control is ready to play the file.
  • The MultimediaNonBlocking constant is used to perform a non-locking load operation. In this case, the call to a Multimedia function (MultimediaPosition, ...) will fail as long as the media file is not loaded by the control.
  • The non-locking load operations are recommended when using media files not found on the device (online video for example).
  • If <File to play> is the URL of a video on a "https" web server, the "android.permission.INTERNET" permission must be added in the application generation wizard.
  • In Android, all the formats supported by the OS can be played (wav, mp3, 3gp, ogg, ...). A summary of the supported audio and video files is available from the following address: http://developer.android.com/guide/appendix/media-formats.html. Remark: Android does not support 32-bit wav files.
Component: wd290obj.dll
Minimum version required
  • Version 12
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 05/26/2022

Send a report | Local help