mediaElement.currentTime = 0;   
    }
    if (type == "youtube") {
        const mediaElement = document.querySelector(`#${ objectid } iframe`);
        const message = JSON.stringify({ event: 'command', func: 'pauseVideo', args: '' });
        mediaElement.contentWindow.postMessage(message, '*');
    }
    if (type == "vimeo") {
        const mediaElement = document.querySelector(`#${ objectid } iframe`);
        mediaElement.contentWindow.postMessage('{"method":"pause"}', '*');
    }
} 
</script>