Unfortunately my version of Xara uses a quite old version of the media element player. This didn't allow stretching.
So what I did in V12 is:
Dragged an MP4 video to an empty website project.
Clicked 'Autostart'. (That ended in an incomplete placeholder.)
Saved the project somewhere. (Xara created a support folder along with it.)
Downloaded the files:
https://raw.githubusercontent.com/mediaelement/mediaelement/master/build/mediaelement-and-player.min.js
https://raw.githubusercontent.com/mediaelement/mediaelement/master/build/mediaelementplayer.min.css
Copied the files to the support folder.
Edited the placeholder code:
- Changed class to xar_meplayer_edit so that Xara doesn't initialize the player on startup and leave it to us so that we can add our own options.
- Removed the controls attribute.
- Added loop and muted attributes. (Muted is reuired sometimes for autostart because modern browsers might not autostart videos with sound.)
- Added some extra code and CSS:
Code:
<style>div.mejs__controls,div.mejs__layers{visibility:hidden !important;}</style>
<script>$(function(){$(".xar_meplayer_edit").mediaelementplayer({clickToPlayPause:false,stretching:"fill"});});</script>
Changed placeholder to stretch to full width (Scale origin centre)
Saved changes. (Somewhen the placeholder changed to a black rectangle...)
Exported to HTML to somewhere and tested.
The result played fine in FireFox, Opera and Chrome. In Vivaldi it only autoplayed after I hit F5. In IE9 it didn't play correctly, only a very small video played and also the sound was played. The following note was taken from https://github.com/mediaelement/mediaelement
In general, MediaElement.js supports IE11+, MS Edge, Chrome, Firefox, Safari, iOS 8+ and Android 4.0+.
Mobile devices you would have to test yourself if the result for the desktop browsers is accaptable anyway.
Bookmarks