MoSync 3.3
Video View properties

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.

Detailed Description

The available widget properties for a MAW_VIDEO_VIEW. See Widget properties for more properties.


Define Documentation

#define MAW_VIDEO_VIEW_PATH   "path"

Sets the video path. Note: available on Android and Windows Phone.

Valid values
Any valid path.
Operations
Set only.
Example
        // Set the video path.
        maWidgetSetProperty(videoViewHandle, MAW_VIDEO_VIEW_PATH, "\data\Video1.wav");
#define MAW_VIDEO_VIEW_URL   "url"

Sets the video url.

Valid values
Any valid streaming url.
Operations
Set only.
Example
        // 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.

Valid values
MAW_VIDEO_WIDGET_ACTION_PLAY, MAW_VIDEO_WIDGET_ACTION_PAUSE or MAW_VIDEO_WIDGET_ACTION_STOP constants.
Operations
Set only.
Example
        // 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.

Valid values
A valid integer for milliseconds.
Operations
Set only.
Example
        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.

Valid values
An integer representing the total media duration in milliseconds.
Operations
Get only.
Example
        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.

Valid values
An int.
Operations
Get only.
Example
        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.

Valid values
An integer representing the current media position in seconds.
Operations
Get only.
Example
        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.

Valid values
"true" show the video control, "false" hide the video control.
Operations
Set and get.
Example
        char buf[BUFFER_SIZE];
        maWidgetGetProperty(videoViewHandle, MAW_VIDEO_VIEW_CONTROL, buf, BUFFER_SIZE);
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines