What our clients say
Watch this video to see how our tailored safeguarding consultancy helped the Royal Northern College of Music and Ark Kings Academy.
';
$('#' + videoIframeId).html(iframe);
// hide the iframe
$('#' + videoIframeId + 'Iframe').css({ 'display': 'none' });
// add consent widget
$('#' + videoIframeId + 'Iframe').after("
");
$('.youtube--widget').load(window.location.protocol + "//" + window.location.host + "/consentplaceholders/consent-placeholder-youtube.html");
}
}
function InsertVideoIframe(videoUrl, videoIframeId, videoTitle) {
let iframe = '';
if (videoUrl.includes('vimeo')) {
iframe = '
';
$('#' + videoIframeId).html(iframe);
} else if (videoUrl.includes('youtube')) {
videoUrl = videoUrl.replace('/watch?v=', '/embed/'); // change watch to embed to allow external requests
if (typeof OnetrustActiveGroups != 'undefined' && OnetrustActiveGroups.includes("C0004")) { // youtube cookies accepted
iframe = '
';
$('#' + videoIframeId).html(iframe);
}
else {
//there are no targeted cookie consent given
//insert the iframe
iframe = '
';
$('#' + videoIframeId).html(iframe);
// hide the iframe
$('#' + videoIframeId + 'Iframe').css({ 'display': 'none' });
// add consent widget
$('#' + videoIframeId + 'Iframe').after("
");
$('.youtube--widget').load(window.location.protocol + "//" + window.location.host + "/consentplaceholders/consent-placeholder-youtube.html");
}
}
}
function youtube_parser(url) {
var regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/;
var match = url.match(regExp);
return (match && match[7].length == 11) ? match[7] : false;
}