The Video Player widget enables playing videos from Youtube, Vimeo, Dailymotion, and external MP4 files.
- Identify the provider and auto-load the right player
- Enable and disable the controls bar
- Loop the video when it finishes
- Start the video on mute
- Auto-play the video when it is ready
- Define a poster image for external MP4 files
- Set a static URL and poster when dynamic data is not specified
- File hosted in Mendix Server cannot be played in the Safari browser
1.3 Demo App Project
For a demo app project that has been deployed with this widget, see here.
Place the widget inside or outside a context of an object that has a value attribute. If you do not place the widget inside a context, you need to provide a static URL; otherwise, the player will not render.
Configure the following properties:
2.1 Phonegap/Cordova Configuration
If your are building a hybrid mobile app, you need to add the following lines to enable access to YouTube, Vimeo, and Dailymotion videos as well as MP4 extensions through your Sprint in the Developer Portal > Mobile App > Custom Phonegap/Cordova Configuration:
<allow-navigation href="*://*youtube.com/*" /> <allow-navigation href="*://*youtu.be/*" /> <allow-navigation href="*://*ytimg.com/*" /> <allow-navigation href="*://*dailymotion.com/*" /> <allow-navigation href="*://*vimeo.com/*" /> <allow-navigation href="*://*noembed.com/*" /> <allow-navigation href="*://*.mp4" />
Noembed is the API used to request video sizes in order to calculate aspect ratios.