WesselKroos / youtube-ambilight

This browser extension adds ambient light to YouTube videos
MIT License
79 stars 8 forks source link

Automatically turning off extension when the YT tab is in background #174

Closed harsharora08 closed 1 year ago

harsharora08 commented 1 year ago

It is a great extension and it makes me want to use youtube a lot more because of the beautiful enhancements. However, here is a suggestion for you. Clearly, some of the settings are a little too resource-hungry for the system, so I think if the extension disables the light when the tab is in the background would help the resources to be utilized elsewhere. In short, I would like to suggest to implement the ability to the extension to automatically turn off the light when the tab has been in background for some 'x' seconds. x can either be something you think would be appropriate, or you can leave this to be user-specified.

WesselKroos commented 1 year ago

These optimizations are already implemented.

Because the light already pauses when it is not visible:

And the light already clears up after 3 seconds to release the used GPU memory in these situations:

Clearly, some of the settings are a little too resource-hungry for the system

Could you tell me how you have detected that the light is too resource-hungry for your system in those situations?

harsharora08 commented 1 year ago

the light already clears up after 3 seconds to release the used GPU memory in these situations Ah alright. Apologies for adding this to the issues then. I will be closing the issue after this reply.

Could you tell me how you have detected that the light is too resource-hungry for your system in those situations? Just after enabling some settings, like increasing the delay in time after which it readapts the colors, there is a bit of stutter in my pc.

Anyway, as I said earlier, this is an amazing extension that is one of my favorites now. Thank you so much for the extension, and the quick response to this issue. :)

WesselKroos commented 1 year ago

No worries.

Just after enabling some settings, like increasing the delay in time after which it readapts the colors, there is a bit of stutter in my pc.

Blending the video frames together requires little bit more GPU power. You could try to reduce the required GPU power by decreasing the resolution setting. That way you reduce the amount of pixels the GPU needs to blend.

harsharora08 commented 1 year ago

Yes I am aware that I can change the settings to make the extension use less resources. Thank you. :)