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

Started on the old forum in October 2014 · view the original in the archive · old links redirect here

No replies · 57 views · started 12 years ago · 1 min read

GumSlone Administrator Principal · 1,690 posts #1

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:

<div id="video_embed" class="video_embed">

replace with:

<div id="video_embed" class="video_embed" style="position: relative;z-index: 80;">

find:

<div class="video_embed">

replace with:

<div class="video_embed" style="position: relative;z-index: 80;">

add before:

<div class="video_date">

this 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

External image (may be gone)

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close