HTML5/Youtube Fullscreen

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
gaberad
New User
Posts: 3
Joined: Sat Jan 30, 2016 3:33 am

HTML5/Youtube Fullscreen

Postby gaberad » Mon Feb 01, 2016 9:25 am

Hi,

just wondering if it was possible to have a window profile be able to detect fullscreen Youtube/HTML5 videos? I'm wanting to be able to scroll up/down to change the system volume while they're fullscreen.

I tried doing something with regex on the window caption (adding 'VideoFullscreen' to the window title via a userscript), but that was only working if you alt+tab from the fullscreen video to the different window then alt-tabbing back.

cheers

User avatar
phil
Site Admin
Posts: 4726
Joined: Sun Apr 06, 2003 11:12 pm

Re: HTML5/Youtube Fullscreen

Postby phil » Tue Feb 02, 2016 2:06 am

Yes its possible. The easiest way is as follows:

Add a new profile,
Press the specific window button,
Tick the Hover check box
Turn off CAPS LOCK if it is on
Open youtube and make it full screen
Make sure the mouse if over the bit of the window you want to control
Turn on CAPS LOCK - this will lock in the window profile details
Minimize You Tube
Turn off hover mode and press OK.

That profile *should* work when youtube is full screen, so configure your buttons/wheel for it and see how you get on.

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

gaberad
New User
Posts: 3
Joined: Sat Jan 30, 2016 3:33 am

Re: HTML5/Youtube Fullscreen

Postby gaberad » Tue Feb 02, 2016 11:35 am

Unfortunately that didn't work. Unless I'm missing something, all it's doing is registering the brower window, and not differentiating between the fullscreen html5 video and the browser. That's why I was playing around with caption regex, but found that to be inconsistant in its execution.

Would it be possible to have a 'Fullscreen' checkbox, to detect when a program is in fullscreen mode?

User avatar
phil
Site Admin
Posts: 4726
Joined: Sun Apr 06, 2003 11:12 pm

Re: HTML5/Youtube Fullscreen

Postby phil » Wed Feb 03, 2016 2:09 am

OK maybe its the way html5 works. I will have ti investigate.
And no, I dont think a fullscreen type option will be possible because any app that can go full screen would be different.

The problem is that there is no difference between an HTML5 player and any web page - the caption (firefox) does not change - so it looks like its going to be VERY difficult, if not impossible to detect :(
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

gaberad
New User
Posts: 3
Joined: Sat Jan 30, 2016 3:33 am

Re: HTML5/Youtube Fullscreen

Postby gaberad » Wed Feb 03, 2016 4:38 am

Yeah, I used the following code to in the userscript to add FirefoxFullscreen to the firefox window caption which works:

document.addEventListener("mozfullscreenchange", function () {
if(document.mozFullScreen){
document.title += "FirefoxFullscreen";
}
else {
document.title = document.title.replace("FirefoxFullscreen", "");
}
}, false);

and used regex caption box .*FirefoxFullscreen.*, but it seems like XMBC isn't picking up the caption change until you defocus/refocus the browser window i.e. alt-tab, then alt-tab back again.


So I was thinking, if a fullscreen mode can't be consistantly detected across apps, what about detecting the current window size, and having an option to trigger if the window dimensions equals/is greater than/is less than a specified size? Or would that be too much work?

User avatar
phil
Site Admin
Posts: 4726
Joined: Sun Apr 06, 2003 11:12 pm

Re: HTML5/Youtube Fullscreen

Postby phil » Wed Feb 03, 2016 10:54 am

Yes your right about the detection based on the caption - it only checks the caption when focus changes to save time. that is a problem for other reasons too - and maybe I need to come up with a better check for that (like a timer that fires occasionally but not too often - and in a separate thread.... that might work.

It might be possible to do it based on window size I suppose - how reliable that will be (esp. on multi monitor where the window may stretch across multiple displays but not be full screen) could be problematic.

I'll have a think.
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)

Irfy
New User
Posts: 1
Joined: Wed Mar 08, 2017 11:31 am

Re: HTML5/Youtube Fullscreen

Postby Irfy » Wed Mar 08, 2017 11:37 am

Just wanted to bump this thread, as I ran into the same issue as OP.

In my case I remapped the scroll wheel to up and down buttons, so that I can manipulate youtube window's volume independently from system volume. Alas, my scroll wheel has been remapped for all Chrome windows, regardless of how I tinker with the "Specific Window" options. Which I can live with, but it's less optimal compared to a true scroll: I regularly mess up radio buttons and multi-select boxes due to this mapping.

User avatar
phil
Site Admin
Posts: 4726
Joined: Sun Apr 06, 2003 11:12 pm

Re: HTML5/Youtube Fullscreen

Postby phil » Wed Mar 08, 2017 3:57 pm

The problem with HTML5 video is that there is no differentiation between that and any other HTML content, that is, there is nothing XMBC can see to know if it is a video or not.

So I dont think there is all that much I can do about it :(
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-6600k, Asus 170-A, 16GB DDR4,
nVidia GeForce GTX 970, 2xEvo 850 (RAID 0), 2x2TB WD Black (RAID1)


Return to “XMouse Button Control”

Who is online

Users browsing this forum: No registered users and 2 guests