Luxup

instream rsya autorefresh

Sep 29th, 2025
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. <div id="video-wrapper_%SITE_AREA_ID%_%DIV_SUB_ID%" style="width: 100%; height: 300px; position: relative; background-color: #000;">
  2. <div id="main-player-container_%SITE_AREA_ID%_%DIV_SUB_ID%" style="width: 100%; height: 100%; position: absolute; top: 0; left: 0;"></div>
  3. <div id="ad-container_%SITE_AREA_ID%_%DIV_SUB_ID%" style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; display: none; z-index: 1001; background-color: #000;"></div>
  4. <div id="fallback-ad-container_%SITE_AREA_ID%_%DIV_SUB_ID%" style="display: none; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-color: #fff; z-index: 1002; overflow: hidden;"></div>
  5. </div>
  6.  
  7. <script>
  8. const playerIdSuffix = '%SITE_AREA_ID%_%DIV_SUB_ID%';
  9.  
  10. function reloadPlayer() {
  11. const mainContainer = document.getElementById('main-player-container_' + playerIdSuffix);
  12. const adContainer = document.getElementById('ad-container_' + playerIdSuffix);
  13. const fallbackContainer = document.getElementById('fallback-ad-container_' + playerIdSuffix);
  14.  
  15. if (mainContainer) mainContainer.innerHTML = '';
  16. if (adContainer) adContainer.innerHTML = '';
  17. if (fallbackContainer) fallbackContainer.innerHTML = '';
  18.  
  19. createYaPlayer(playerIdSuffix, {
  20. playerSource: 'https://runtime.video.cloud.yandex.net/player/video/vplvkqrlcvjenxuiiakf',
  21. partnerId: 16262233,
  22. category: 0,
  23. adImpIds: {
  24. preroll: 1,
  25. midroll: 2
  26. },
  27. adConfigSettings: {
  28. midrollPoints: [10]
  29. },
  30. fallbackConfig: {
  31. duration: 5000,
  32. scriptUrl: '//s.luxcdn.com/t/194050/360_light.js',
  33. wrapperId: '726648',
  34. pubId: '_194050',
  35. blockId: '_726648'
  36. }
  37. });
  38. }
  39.  
  40. (function() {
  41. var script = document.createElement('script');
  42. script.type = 'text/javascript';
  43. script.src = 'https://account.luxupnetwork.com/public/demo/rsya/player-rsya.fixed.clean.js';
  44. script.onload = function() {
  45. reloadPlayer();
  46.  
  47. setInterval(reloadPlayer, 30000); // авторефреш через 30 секунд
  48. };
  49. document.head.appendChild(script);
  50. })();
  51. </script>
Advertisement
Add Comment
Please, Sign In to add comment