(function() { function createEmbed() { var parentContainer = document.getElementById('5nRSutlZvM2n'); 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/a024bd6e-3351-4fa7-9c80-ad8e8e91b6d3/pl2nJzm36f8usxWmS2CZQSqRgHQP4ITl?signature=738bea72b12b715ea219575941529c48f8e290654881548f60a592803dadfbd1'; iframeElement.setAttribute('title', 'تبلیغ ویدیویی'); iframeElement.setAttribute('allowFullScreen', true); iframeElement.setAttribute('webkitallowfullscreen', true); iframeElement.setAttribute('mozallowfullscreen', true); iframeElement.id = 'videoFrame_5nRSutlZvM2n'; embedContainer.appendChild(spanElement); embedContainer.appendChild(iframeElement); parentContainer.appendChild(embedContainer); window.Mediacast = window.Mediacast || {}; window.Mediacast.libraryMedias = window.Mediacast.libraryMedias || {}; window.Mediacast.libraryMedias['5nRSutlZvM2n'] = { drmTextApplied: false, api: { DRMText: function(config) { if (this.drmTextApplied) { console.warn('🚫 Forbidden. DRMText Protection already applied.'); return; } function sendMessage() { var iframe = document.getElementById('videoFrame_5nRSutlZvM2n'); 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); })();