What is it?
The VideoPlayer widget allows you to include uploaded videos in your AppFurnace apps, and control the way that they’re displayed to users.
How do I use it?
In the Layout Tab, click the Video tab in the widget panel, then drag the thumbnail of the VideoPlayer widget onto the canvas area in the centre of the screen. If you want more information about the widget, click the “i” symbol on the tab.
Once you’ve put a VideoPlayer widget onto the canvas, you can move and resize it.
The most important part of the VideoPlayer widget is the “video” setting - which is where you set which video will be played when a user taps the video. You’ll need to upload a video file using the Files tab before you can use the VideoPlayer widget, but once you have, click the drop down and select your video file.
What properties does it have?
The VideoPlayer widget has several properties that are unique, allowing you to customize the way that your video appears to your users.
The video file to play when a user clicks on the widget.
The image to display when a video is not playing - if you are also using the play button setting, that image will appear in front of the poster image
On by default. If unchecked, when the video plays, users will not be able to scrub or exit the video until it has finished playing. Use this for when video content is compulsory to play through.
NOTE: Be aware that users may not actually watch or listen to the video content, even if they have to wait for it to finish before continuing, so you should make any information in the video, that is necessary for users to have a pleasant experience, available in a help or instructions page.
You can select a specific image to use for the “Play Button”, which is displayed when the video is not playing. This image will be displayed in front of the Poster image, so making use of transparent PNGs is recommended for play buttons with rounded corners.
If you are not using a poster image, the background color set here will be displayed
How can I use it in code?
If you’d like to use your video widgets programmatically, you can access the video in code to manipulate their attributes outlined above, though we should make the distinction between the VideoPlayer widget we’ve been talking about here, and the AppFurnace Video object.
- The VideoPlayer widget is the easiest way to add videos to your app, as you can simply drag and drop it onto your canvas, and users can start and stop the video as they’d expect to.
- The Video object however is a program-lead way of including videos in your app, and provides more specific controls to manipulate how and when your video is shown, so is a much better idea for more complex video-based apps that need an extra level of control.
See the Code API: VideoPlayer for more information on these functions.