Hello!
I recently had the same question. On the homepage of a website of mine, I had a video background using a Vimeo link. I wanted that video to switch randomly with other Vimeo videos on refresh. I succeeded by using the script below, which you need to paste into the header section of code injection. Change the provisional videoIDs (000000001 and 000000002) with the videoIDs of the Vimeo videos you want to target, and feel free to add more after the comma. Under fallbackVideo, you can specify a fallback video in the same way.
Good luck.
<!-- VIDEO BACKGROUND -->
<script>
window.onload = function() {
var videoIDs = ['000000001', '000000002'];
var fallbackVideo = '000000000';
var randomID = videoIDs[Math.floor(Math.random() * videoIDs.length)];
var vimeoPlayer = document.getElementById('vimeoplayer');
vimeoPlayer.onerror = function() {
vimeoPlayer.src = '//player.vimeo.com/video/' + fallbackVideo + '?api=1&background=1';
}
vimeoPlayer.src = '//player.vimeo.com/video/' + randomID + '?api=1&background=1';
}
</script>