async function validateMediaFile(mediaFileUrl) {
        if (!mediaFileUrl) {
            return false;
        }
        try {
            const response =  await fetch(mediaFileUrl);
            if (!response.ok || response.headers.get('content-type').indexOf('video') === -1) {
                return false;
            }
            const videoElement = document.createElement('video');
            videoElement.src = mediaFileUrl;
            const canPlay = await videoElement.canPlayType(response.headers.get('content-type'));
            return canPlay !== "";
        } catch (error) {
            console.error('Failed to load media file:', error);
            return false;
        }
    }
Validate Media File to check if videos play

@param {mediaFileUrl}