(function() { function createEmbed() { var parentContainer = document.getElementById('5hMVlQztNJLO'); if (parentContainer) { var styleElement = document.createElement('style'); styleElement.textContent = ` .h_iframe-mediacast_embed_frame { position: relative; margin:auto; } .h_iframe-mediacast_embed_frame .ratio { display: block; width: 100%; height: auto; } .h_iframe-mediacast_embed_frame iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border:0; border-radius:7px; overflow:hidden; } `; document.head.appendChild(styleElement); var embedContainer = document.createElement('div'); embedContainer.className = 'h_iframe-mediacast_embed_frame'; var spanElement = document.createElement('div'); spanElement.style.display = 'block'; spanElement.style.paddingTop = '56.25%'; var iframeElement = document.createElement('iframe'); iframeElement.src = 'https://stream.mediacast.ir/v/s/a0790b2c-db22-4fcf-89c7-45ad8b585ab7/3x58y5XV7zYOQxEv0TUrL7D5E3Rkd1co?signature=698b8f14e5dc3a5278119c721d958cf509d5b12df3a03b529ff607717b6ef8b4'; iframeElement.setAttribute('title', 'آموزش استفاده از جلسات آنلاین مدیاکست(دانشجو)'); iframeElement.setAttribute('allowFullScreen', true); iframeElement.setAttribute('webkitallowfullscreen', true); iframeElement.setAttribute('mozallowfullscreen', true); iframeElement.id = 'videoFrame_5hMVlQztNJLO'; embedContainer.appendChild(spanElement); embedContainer.appendChild(iframeElement); parentContainer.appendChild(embedContainer); window.Mediacast = window.Mediacast || {}; window.Mediacast.libraryMedias = window.Mediacast.libraryMedias || {}; window.Mediacast.libraryMedias['5hMVlQztNJLO'] = { drmTextApplied: false, api: { DRMText: function(config) { if (this.drmTextApplied) { console.warn('🚫 Forbidden. DRMText Protection already applied.'); return; } function sendMessage() { var iframe = document.getElementById('videoFrame_5hMVlQztNJLO'); if (iframe && iframe.contentWindow) { var iframeOrigin = new URL(iframe.src).origin; iframe.contentWindow.postMessage({ type: 'SET_WATERMARK', payload: config }, '*'); this.drmTextApplied = true; return true; } return false; } if (!sendMessage()) { var checkIframe = setInterval(() => { if (sendMessage.call(this)) { clearInterval(checkIframe); } }, 500); } } } }; } } window.addEventListener('load', createEmbed); })();