{"action":"created","issue":{"url":"https://api.github.com/repos/schomery/youtube-hover/issues/7","repository_url":"https://api.github.com/repos/schomery/youtube-hover","labels_url":"https://api.github.com/repos/schomery/youtube-hover/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/schomery/youtube-hover/issues/7/comments","events_url":"https://api.github.com/repos/schomery/youtube-hover/issues/7/events","html_url":"https://github.com/schomery/youtube-hover/issues/7","id":197160984,"number":7,"title":"Loading gif is a resource drain","user":{"login":"narcolepticinsomniac","id":14100003,"avatar_url":"https://avatars.githubusercontent.com/u/14100003?v=3","gravatar_id":"","url":"https://api.github.com/users/narcolepticinsomniac","html_url":"https://github.com/narcolepticinsomniac","followers_url":"https://api.github.com/users/narcolepticinsomniac/followers","following_url":"https://api.github.com/users/narcolepticinsomniac/following{/other_user}","gists_url":"https://api.github.com/users/narcolepticinsomniac/gists{/gist_id}","starred_url":"https://api.github.com/users/narcolepticinsomniac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narcolepticinsomniac/subscriptions","organizations_url":"https://api.github.com/users/narcolepticinsomniac/orgs","repos_url":"https://api.github.com/users/narcolepticinsomniac/repos","events_url":"https://api.github.com/users/narcolepticinsomniac/events{/privacy}","received_events_url":"https://api.github.com/users/narcolepticinsomniac/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-12-22T12:08:07Z","updated_at":"2016-12-23T08:35:25Z","closed_at":null,"body":"When I first tested \"Turn off the lights\" it wasn't working. I remembered that I made a userstyle for the iframe. I gave it a black background and lightgray box-shadow. You're doing the \"lights off\" with box-shadow, so mine was overriding it. The code I was using was:\r\n\r\n```\r\n.ihvyoutube{\r\nbackground:hsla(0,0%,0%,.95)!important;\r\nbox-shadow:hsla(0,0%,40%,.9) 1px 1px 5px!important;}\r\n```\r\n\r\nI had made the conscious decision to use background instead of background-color because I've run into a lot of loading gifs that constantly waste CPU in the background. Anyway, while fixing the style to:\r\n\r\n```\r\n.ihvyoutube{background:hsla(0,0%,0%,.95)!important;}\r\n\r\n.ihvyoutube:not([data-dark=\"true\"]){box-shadow:hsla(0,0%,40%,.9) 1px 1px 5px!important;}\r\n```\r\nI figured I'd check using background-color instead. I have a fairly old lower-end AMD quad, probably the equivalent of an i3 if I had to guess. The gif uses about 20% CPU the entire time the iframe is present, which is more than the videos use on their own.\r\n\r\nThe gif is a pretty cool looking one, so instead of changing it, maybe just remove it once it's no longer visible?"},"comment":{"url":"https://api.github.com/repos/schomery/youtube-hover/issues/comments/268956836","html_url":"https://github.com/schomery/youtube-hover/issues/7#issuecomment-268956836","issue_url":"https://api.github.com/repos/schomery/youtube-hover/issues/7","id":268956836,"user":{"login":"narcolepticinsomniac","id":14100003,"avatar_url":"https://avatars.githubusercontent.com/u/14100003?v=3","gravatar_id":"","url":"https://api.github.com/users/narcolepticinsomniac","html_url":"https://github.com/narcolepticinsomniac","followers_url":"https://api.github.com/users/narcolepticinsomniac/followers","following_url":"https://api.github.com/users/narcolepticinsomniac/following{/other_user}","gists_url":"https://api.github.com/users/narcolepticinsomniac/gists{/gist_id}","starred_url":"https://api.github.com/users/narcolepticinsomniac/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narcolepticinsomniac/subscriptions","organizations_url":"https://api.github.com/users/narcolepticinsomniac/orgs","repos_url":"https://api.github.com/users/narcolepticinsomniac/repos","events_url":"https://api.github.com/users/narcolepticinsomniac/events{/privacy}","received_events_url":"https://api.github.com/users/narcolepticinsomniac/received_events","type":"User","site_admin":false},"created_at":"2016-12-23T08:35:25Z","updated_at":"2016-12-23T08:35:25Z","body":"Hey, off-topic, but somewhat related question. Is there a javascript solution to forcing a pre-buffer limit on html5 videos? Chrome usually does this by default, but one site in particular, vk.com, recently changed something that is making videos speed buffer the entire video. The increase in CPU is ludicrous.\r\n\r\nI've even tried in Firefox where there's an about:config setting for setting a hard media readahead limit. It works well for other sites, but not on VK either. \r\n\r\nMaybe you know some generic code I could try in a userscript. To actually play videos there, I think you have to be a member. I'd also happily let you use my logon if you were inclined to take a look.\r\n\r\nMore than anything, I'd like to know if you think it's possible. If so, I could always keep asking around till someone takes pity on my poor CPU."}}
{"actor":{"display_login":"narcolepticinsomniac"}}