Mouse pointer present during playback
Closed this issue · 7 comments
I manually fixed this with the earlier version by editing one of the js files but it should really be done here once and for all. I can look up that old edit but you guys should know where it is by heart.
Also it used to be only in fullscreen view but now the pointer is there even in window.
I was under the impression that a bug in Chrome browser prevented the cursor from hiding. Can you share the edit you made?
There used to be a file called mep-feature-fullscreen.js (at least that's the name of the copy I saved locally) and I added a few lines there. This file is not present in new version and I'm not sure yet where I can insert a similar edit.
Here's modified part of that old file, from the beginning:
$.extend(mejs.MepDefaults, {
usePluginFullScreen: true,
newWindowCallback: function() { return '';},
fullscreenText: mejs.i18n.t('Fullscreen')
});
$.extend(MediaElementPlayer.prototype, {
isFullScreen: false,
isNativeFullScreen: false,
docStyleOverflow: null,
isInIframe: false,
buildfullscreen: function(player, controls, layers, media) {
if (!player.isVideo)
return;
player.isInIframe = (window.location != window.parent.location);
// native events
if (mejs.MediaFeatures.hasTrueNativeFullScreen) {
// chrome doesn't alays fire this in an iframe
var func = function(e) {
if (mejs.MediaFeatures.isFullScreen()) {
player.isNativeFullScreen = true;
// reset the controls once we are fully in full screen
player.setControlsSize();
//------------------ Hide Cursor -----------//
var idleMouseTimer;
var forceMouseHide = false;
$("body").css('cursor', 'none');
$("#main").mousemove(function(ev) {
if(!forceMouseHide) {
$("body").css('cursor', '');
clearTimeout(idleMouseTimer);
idleMouseTimer = setTimeout(function() {
$("body").css('cursor', 'none');
forceMouseHide = true;
setTimeout(function() {
forceMouseHide = false;
}, 200);
}, 2000);
}
});
//----------- end of Hide Cursor -----------//
} else {
player.isNativeFullScreen = false;
// when a user presses ESC
// make sure to put the player back into place
player.exitFullScreen();
}
};
....
The problem in Chrome is that when you set cursor to 'none', it isn't
applied until the user moves the mouse. If he moves the mouse (after 200
milliseconds), then it appears again as cursor is set to '' as per your
code. I tried more or less
the same thing but it didn't work no matter what I tried. Then I came
across the chrome bug. It's been a bug for a looong time, so I don't think
google considers it to be a bug.
On Fri, Sep 2, 2016 at 7:39 PM, Stangoesagain notifications@github.com
wrote:
There used to be a file called mep-feature-fullscreen.js (at least that's
the name of the copy I saved locally) and I added a few lines there. This
file is not present in new version and I'm not sure yet where I can insert
a similar edit.Here's modified part of that old file, from the beginning:
$.extend(mejs.MepDefaults, {
usePluginFullScreen: true,
newWindowCallback: function() { return '';},
fullscreenText: mejs.i18n.t('Fullscreen')
});$.extend(MediaElementPlayer.prototype, {
isFullScreen: false, isNativeFullScreen: false, docStyleOverflow: null, isInIframe: false, buildfullscreen: function(player, controls, layers, media) { if (!player.isVideo) return; player.isInIframe = (window.location != window.parent.location); // native events if (mejs.MediaFeatures.hasTrueNativeFullScreen) { // chrome doesn't alays fire this in an iframe var func = function(e) { if (mejs.MediaFeatures.isFullScreen()) { player.isNativeFullScreen = true; // reset the controls once we are fully in full screen player.setControlsSize();
//------------------ Hide Cursor -----------//
var idleMouseTimer;
var forceMouseHide = false;$("body").css('cursor', 'none');
$("#main").mousemove(function(ev) {
if(!forceMouseHide) {
$("body").css('cursor', '');clearTimeout(idleMouseTimer); idleMouseTimer = setTimeout(function() { $("body").css('cursor', 'none'); forceMouseHide = true; setTimeout(function() { forceMouseHide = false; }, 200); }, 2000);
}
});
//----------- end of Hide Cursor -----------//
} else { player.isNativeFullScreen = false; // when a user presses ESC // make sure to put the player back into place player.exitFullScreen(); } };
....
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#67 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHkl-h3HjOGuXP37xvMDetmgwzmh4ZQXks5qmC4sgaJpZM4Jx2WZ
.
I didn't know it was a bug, I just found some code, incidentally here on
Github, and pasted it in. Is it possible to do something similar with the
new version?
On Sat, Sep 3, 2016 at 12:47 AM, Vivek Kannan notifications@github.com
wrote:
The problem in Chrome is that when you set cursor to 'none', it isn't
applied until the user moves the mouse. If he moves the mouse (after 200
milliseconds), then it appears again as cursor is set to '' as per your
code. I tried more or less
the same thing but it didn't work no matter what I tried. Then I came
across the chrome bug. It's been a bug for a looong time, so I don't think
google considers it to be a bug.On Fri, Sep 2, 2016 at 7:39 PM, Stangoesagain notifications@github.com
wrote:There used to be a file called mep-feature-fullscreen.js (at least that's
the name of the copy I saved locally) and I added a few lines there. This
file is not present in new version and I'm not sure yet where I can
insert
a similar edit.Here's modified part of that old file, from the beginning:
$.extend(mejs.MepDefaults, {
usePluginFullScreen: true,
newWindowCallback: function() { return '';},
fullscreenText: mejs.i18n.t('Fullscreen')
});$.extend(MediaElementPlayer.prototype, {
isFullScreen: false,
isNativeFullScreen: false,
docStyleOverflow: null,
isInIframe: false,
buildfullscreen: function(player, controls, layers, media) {
if (!player.isVideo)
return;player.isInIframe = (window.location != window.parent.location);
// native events
if (mejs.MediaFeatures.hasTrueNativeFullScreen) {// chrome doesn't alays fire this in an iframe
var func = function(e) {if (mejs.MediaFeatures.isFullScreen()) {
player.isNativeFullScreen = true;
// reset the controls once we are fully in full screen
player.setControlsSize();//------------------ Hide Cursor -----------//
var idleMouseTimer;
var forceMouseHide = false;$("body").css('cursor', 'none');
$("#main").mousemove(function(ev) {
if(!forceMouseHide) {
$("body").css('cursor', '');clearTimeout(idleMouseTimer);
idleMouseTimer = setTimeout(function() {
$("body").css('cursor', 'none');forceMouseHide = true;
setTimeout(function() {
forceMouseHide = false;
}, 200);
}, 2000);
}});
//----------- end of Hide Cursor -----------//
} else {
player.isNativeFullScreen = false;
// when a user presses ESC
// make sure to put the player back into place
player.exitFullScreen();
}
};....
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#67
issuecomment-244385262>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHkl-
h3HjOGuXP37xvMDetmgwzmh4ZQXks5qmC4sgaJpZM4Jx2WZ>
.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#67 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/ARzrYl18fEuYSosV6AaQ7TrsyBo6vf4rks5qmGFJgaJpZM4Jx2WZ
.
As far as I know, nope. Again, some really, really nasty code might
work....but I am not willing to go that far. I will keep looking for
solutions.
On Wed, Sep 7, 2016 at 6:41 PM, Stangoesagain notifications@github.com
wrote:
I didn't know it was a bug, I just found some code, incidentally here on
Github, and pasted it in. Is it possible to do something similar with the
new version?On Sat, Sep 3, 2016 at 12:47 AM, Vivek Kannan notifications@github.com
wrote:The problem in Chrome is that when you set cursor to 'none', it isn't
applied until the user moves the mouse. If he moves the mouse (after 200
milliseconds), then it appears again as cursor is set to '' as per your
code. I tried more or less
the same thing but it didn't work no matter what I tried. Then I came
across the chrome bug. It's been a bug for a looong time, so I don't
think
google considers it to be a bug.On Fri, Sep 2, 2016 at 7:39 PM, Stangoesagain notifications@github.com
wrote:There used to be a file called mep-feature-fullscreen.js (at least
that's
the name of the copy I saved locally) and I added a few lines there.
This
file is not present in new version and I'm not sure yet where I can
insert
a similar edit.Here's modified part of that old file, from the beginning:
$.extend(mejs.MepDefaults, {
usePluginFullScreen: true,
newWindowCallback: function() { return '';},
fullscreenText: mejs.i18n.t('Fullscreen')
});$.extend(MediaElementPlayer.prototype, {
isFullScreen: false,
isNativeFullScreen: false,
docStyleOverflow: null,
isInIframe: false,
buildfullscreen: function(player, controls, layers, media) {
if (!player.isVideo)
return;player.isInIframe = (window.location != window.parent.location);
// native events
if (mejs.MediaFeatures.hasTrueNativeFullScreen) {// chrome doesn't alays fire this in an iframe
var func = function(e) {if (mejs.MediaFeatures.isFullScreen()) {
player.isNativeFullScreen = true;
// reset the controls once we are fully in full screen
player.setControlsSize();//------------------ Hide Cursor -----------//
var idleMouseTimer;
var forceMouseHide = false;$("body").css('cursor', 'none');
$("#main").mousemove(function(ev) {
if(!forceMouseHide) {
$("body").css('cursor', '');clearTimeout(idleMouseTimer);
idleMouseTimer = setTimeout(function() {
$("body").css('cursor', 'none');forceMouseHide = true;
setTimeout(function() {
forceMouseHide = false;
}, 200);
}, 2000);
}});
//----------- end of Hide Cursor -----------//
} else {
player.isNativeFullScreen = false;
// when a user presses ESC
// make sure to put the player back into place
player.exitFullScreen();
}
};....
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#67
issuecomment-244385262>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AHkl-
h3HjOGuXP37xvMDetmgwzmh4ZQXks5qmC4sgaJpZM4Jx2WZ>
.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#67
issuecomment-244442839>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/
ARzrYl18fEuYSosV6AaQ7TrsyBo6vf4rks5qmGFJgaJpZM4Jx2WZ>
.—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#67 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHkl-jd6313n5PZcBRPsa3M8LGkDWyXsks5qnrfqgaJpZM4Jx2WZ
.
Closing this as a wontFix bug. Will keep looking for solutions.
I was wrong! Automatically started working somehow. Will be a part of 1.14.0.