var pmc_floating_player={};(function(){pmc_floating_player={player_instance:null,player_selector:"[id ^=jwplayer_][id $=_div]",init:function(){var el=document.querySelector(this.player_selector);if(!el){return false}this.player_instance=pmc_jwplayer(el.id);this.player_instance.on("ready",function(){if("object"!==typeof pmcFloatingVideoOptions){return}var floatingCssClasses=["jw-floating-top-full-width","jw-floating-bottom-right","jw-floating-bottom-stripe","jw-floating-top-left","jw-floating-top-right"];var currentFloatingPostion=parseInt(pmcFloatingVideoOptions.jwplayer_floating_placement,10);var player_container=pmc_floating_player.player_instance.getContainer();if(null!==currentFloatingPostion&&floatingCssClasses[currentFloatingPostion]&&null!==player_container){player_container.classList.add(floatingCssClasses[currentFloatingPostion])}});this.player_instance.on("resize",function(data){var ad_div=document.querySelector(".mobile-bottom-sticky-ad");if("object"===typeof pmc_meta&&("desktop"===pmc_meta.env&&230>data.height||"mobile"===pmc_meta.env&&90===data.height)&&"undefined"===typeof pmc_floating_player.floating_check){var player_close_btn=document.querySelector(".jw-controls .jw-svg-icon-close");player_close_btn.style.display="none";if(null!==ad_div){ad_div.remove()}if(null!==ad_div&&"object"===typeof pmc_adm_gpt&&pmc_adm_gpt.auto_ad_refresh_timers&&ad_div.id in pmc_adm_gpt.auto_ad_refresh_timers){pmc_adm_gpt.auto_ad_refresh_timers[ad_div.id]={}}if("object"===typeof blogherads&&"object"===typeof blogherads.getSlotById("skm-ad-bottom")){blogherads.destroySlots(["skm-ad-bottom"])}pmc_floating_player.floating_check=true;setTimeout(function(){player_close_btn.style.display="block"},5e3)}});if("undefined"!==typeof pmc&&"undefined"!==typeof pmc.hooks&&"undefined"!==typeof pmc.hooks.add_action){pmc.hooks.add_action("pmc_adm_dfp_direct_sold",this.dismiss_floating_player)}},dismiss_floating_player:function(){var floating_container=document.querySelector(".jw-flag-touch .jw-wrapper");if(null!==floating_container){floating_container.classList.add("pmc-jw-disable-floating");pmc_floating_player.player_instance.pause()}}};pmc_floating_player.init()})();