var check = false;
window.mobilecheck = function() {
// Check for mobile here
if (check === true) {
// Device is mobile
var videos = document.querySelectorAll('.video-js');
for (var i = 0; i
var sources = document.querySelectorAll('video#my-id source');
// Define the video object this source is contained inside
var video = document.querySelector('video#my-id');
for(var i = 0; i
if (window.matchMedia("(min-width: 640px)").matches) {
// do nothing
} else {
var videos = document.querySelectorAll('.video-js'),
videoFile;
for (var i = 0; i