UserGuide

Web Movie Player

From Xojo Documentation

The Movie Player plays a video in a Web Page. The movie URL can be specified in the Inspector or via code.

The Movie Player control uses the browser’s native HTML5 video capabilities.

Two interesting properties can be set in the Inspector. The AllowFullScreen property displays the widget that toggles between full-screen and the size of the control in the app. The AllowAutoPlay property starts the movie automatically when the control is displayed.

Commonly used properties and methods are listed below. Refer to WebMoviePlayer in the Language Reference for the complete list.

Properties

AllowFullScreen

When True, displays a button on the movie to allow the user to have it display using the full screen.

AllowAutoPlay

When True, the movie begins playing when the control is displayed, if the browser's security/privacy settings allow it.

MovieURL

Specifies the URL for the movie.

Duration

The duration (length) of the movie in seconds.

Position

The play position of the movie in seconds.

Methods

Play

Starts playing the movie.

Pause

Pauses playing the movie.

Usage

This sets the movie in code:

MoviePlayer1.MovieURL = "http://www.test.com/mymovie-large.m4v"

The URLs must be actual URLs that would also work in a web browser. They cannot be local file URLs from a FolderItem.

See Also

WebMoviePlayer class; UserGuide:Web UI topic