|
MoSync 3.3
|
Defines | |
| #define | MAW_VIDEO_VIEW_PATH "path" |
| Sets the video path. Note: available on Android and Windows Phone. | |
| #define | MAW_VIDEO_VIEW_URL "url" |
| Sets the video url. | |
| #define | MAW_VIDEO_VIEW_ACTION "action" |
| Start,pause or stop the video playback. | |
| #define | MAW_VIDEO_VIEW_SEEK_TO "seekTo" |
| Seeks into the video. | |
| #define | MAW_VIDEO_VIEW_DURATION "duration" |
| Gets the video file duration. | |
| #define | MAW_VIDEO_VIEW_BUFFER_PERCENTAGE "bufferPercentage" |
| Gets the buffer percentage of the played video file. | |
| #define | MAW_VIDEO_VIEW_CURRENT_POSITION "currentPosition" |
| Gets the current position in the video file. | |
| #define | MAW_VIDEO_VIEW_CONTROL "control" |
| Show/hide video control. Default value is "true"(video control is shown). Platform: iOS. | |
The available widget properties for a MAW_VIDEO_VIEW. See Widget properties for more properties.
| #define MAW_VIDEO_VIEW_PATH "path" |
Sets the video path. Note: available on Android and Windows Phone.
// Set the video path. maWidgetSetProperty(videoViewHandle, MAW_VIDEO_VIEW_PATH, "\data\Video1.wav");
| #define MAW_VIDEO_VIEW_URL "url" |
Sets the video url.
// Set the video path. maWidgetSetProperty(videoViewHandle, MAW_VIDEO_VIEW_URL, "www.example.com/play.m3u8");
| #define MAW_VIDEO_VIEW_ACTION "action" |
Start,pause or stop the video playback.
// Start the playback. maWidgetSetProperty(videoViewHandle, MAW_VIDEO_WIDGET_ACTION, toString(MAW_VIDEO_WIDGET_ACTION_PLAY));
| #define MAW_VIDEO_VIEW_SEEK_TO "seekTo" |
Seeks into the video.
maWidgetSetProperty(videoViewHandle, MAW_VIDEO_VIEW_SEEK_TO, "10000");
| #define MAW_VIDEO_VIEW_DURATION "duration" |
Gets the video file duration.
NOTE: On Android this value can be retrieved after MAW_VIDEO_VIEW_STATE_SOURCE_READY is received. On iOS this value can be retrieved after MAW_VIDEO_STATE_PLAYING is received.
char buf[BUFFER_SIZE]; maWidgetGetProperty(videoViewHandle, MAW_VIDEO_VIEW_DURATION, buf, BUFFER_SIZE); // Do something with the duration.
| #define MAW_VIDEO_VIEW_BUFFER_PERCENTAGE "bufferPercentage" |
Gets the buffer percentage of the played video file.
char buf[BUFFER_SIZE]; maWidgetGetProperty(videoViewHandle, MAW_VIDEO_VIEW_BUFFER_PERCENTAGE, buf, BUFFER_SIZE); // Do something with the percentage.
| #define MAW_VIDEO_VIEW_CURRENT_POSITION "currentPosition" |
Gets the current position in the video file.
char buf[BUFFER_SIZE]; maWidgetGetProperty(videoViewHandle, MAW_VIDEO_VIEW_CURRENT_POSITION, buf, BUFFER_SIZE); // Do something with the position.
| #define MAW_VIDEO_VIEW_CONTROL "control" |
Show/hide video control. Default value is "true"(video control is shown). Platform: iOS.
char buf[BUFFER_SIZE]; maWidgetGetProperty(videoViewHandle, MAW_VIDEO_VIEW_CONTROL, buf, BUFFER_SIZE);