turn lights off around the video player on video view page SE4 Video Plugin

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    how to turn lights off around the video player on video view page SE4 Video Plugin

    this mod turns the lights off around video player after 15 seconds of user inactivity.
    open:
    /application/modules/Video/views/scripts/index/view.tpl
    find:
    HTML Code:
    <div id="video_embed" class="video_embed">
    replace with:
    HTML Code:
    <div id="video_embed" class="video_embed" style="position: relative;z-index: 80;">
    find:
    HTML Code:
    <div class="video_embed">
    replace with:
    HTML Code:
    <div class="video_embed" style="position: relative;z-index: 80;">
    add before:
    HTML Code:
    <div class="video_date">
    this code:
    HTML Code:
    <script type="text/javascript">
    var mousemove_timer = 0;
    var timer_func = function() {
        mousemove_timer += 1;
        if(mousemove_timer==15)
        {
            var scroll = $('global_page_video-index-view').getScrollSize();
            $('shadow').style.display = 'block';
            $('shadow').fade('hide');
            $('shadow').setStyle('height', scroll.y);
            $('shadow').set('tween', {duration: 5000}).fade('in');
        }
    };
    timer_func.timer = timer_func.periodical(1000);
     
    function reset_timer_func()
    {
            mousemove_timer = 0;
            $('shadow').set('tween', {duration: 2000}).fade('hide');
            $clear(timer_func.timer);
            timer_func.timer = timer_func.periodical(1000);
          
    }
     
    (function() {
        document.addEvent('mousemove', function(e) {
            reset_timer_func();
        });
        document.addEvent('keydown', function(e) {
            reset_timer_func();
        });
      
    })();
    </script>
    <div id="shadow" style="background-color:rgba(0, 0, 0, 0.9); position:absolute; left:0; top:0; width:100%; height:100%;  z-index:10;display: none;" onClick="$('shadow').style.display = 'none';"></div>
    Done!
    Advertise your mobile site for FREE with AdTwirl

Working...
X