• Hey, guest user. Hope you're enjoying NeoGAF! Have you considered registering for an account? Come join us and add your take to the daily discourse.

NeoGAF, welcome to .webm - the FUTURE (of burning out your CPU)

Triple U

Banned
BS that pomf.se is gtting the most of he love which is blocked for me. :>

Guess I'll check this out in a few hours.
 

ekim

Member
60-70% CPU usage, lmao

I'm using the Firefox extension and it really needs to be 'click to play' instead of autoloading.
WebM for NeoGAF FireFox Addon 0.3

New:
Only preloads metadata data and should save bandwidth as well as CPU load. There is a dummy Autoplay property within the addon preferences which does nothing at the moment.

It looks like this:
untitledqis2w.png
 

hesido

Member
WebM for NeoGAF FireFox Addon 0.3

New:
Only preloads metadata data and should save bandwidth as well as CPU load. There is a dummy Autoplay property within the addon preferences which does nothing at the moment.

It looks like this:
untitledqis2w.png

Nice touch with the non-auto download. I modified the Chrome user.js linked here to set the preload property to "metadata" but it doesn't seem to honor that. Dunno why.
 

also

Banned
WebM for NeoGAF FireFox Addon 0.3

New:
Only preloads metadata data and should save bandwidth as well as CPU load. There is a dummy Autoplay property within the addon preferences which does nothing at the moment.

It looks like this:
untitledqis2w.png

Can you add adjustable height and width? The current size is too small, so I'll be sticking with the non-autoplay script for the time being.
Could you also add the option to auto-play files smaller than X MB?
 

hesido

Member
Nice touch with the non-auto download. I modified the Chrome user.js linked here to set the preload property to "metadata" but it doesn't seem to honor that. Dunno why.

Oh, OK, Chrome doesn't seem to use the preload="metadata" property, but it does listen to "none". But when doing this, it shows no video thumbnail at all. :\

I'm setting mine to preload="none", tho. Hope they fix Chrome's behaviour, or maybe neogaf can support a custom video tag with custom thumbnail support. But that's too tedious work anyway..
 

ekim

Member
Can you add adjustable height and width? The current size is too small, so I'll be sticking with the non-autoplay script for the time being.
Could you also add the option to auto-play files smaller than X MB?

Adjustable video height/width is on the list.

Memory size of the video doesn't seem to be in the metadata so I don't think I can do this. :(
 

Techies

Member
https://addons.mozilla.org/de/firefox/addon/webmneogaf/

New version with controls enabled which allows you to toggle audio and click to stop/play the video.

Do you think it would be possible to make it so that when you right click to save video that is doesn't go and download the whole video again.

I found that by default when it opens in another window, and click save video, it saves the video directly to your hard drive with re-downloading it.

But as soon as try it with your add-on enabled, it re-downloads the video.
 

ekim

Member
Do you think it would be possible to make it so that when you right click to save video that is doesn't go and download the whole video again.

I found that by default when it opens in another window, and click save video, it saves the video directly to your hard drive with re-downloading it.

But as soon as try it with your add-on enabled, it re-downloads the video.

It's probably because I disabled preloading in the latest version. If not, I'm just using the standard HTML5 functions and properties right now. I'm not really experienced with JS & the FF Addon API - this was just a quick port.

edit:
I don't have any more time today to work on this - if someone wants to continue working on it, go on. :)

Code:
main.js

var self = require("sdk/self");
var pageMod = require("sdk/page-mod");

pageMod.PageMod({
  include: "*.neogaf.com",
  contentScriptFile: self.data.url("webm.js")
});

Code:
webm.js


	var videos = document.querySelectorAll('.post a'),
	  link, video;

	
	for (var i = 0; i < videos.length; i++) {
	  link = videos[i].href;
	  if (link.indexOf('.webm') === link.length - 5) {
		video = document.createElement('video');
		video.src = link;
		video.autoplay = false;
		video.preload = "metadata";
		video.loop = true;
		video.muted = true;
		video.width = '500';
		video.controls=true;
		videos[i].parentNode.replaceChild(video, videos[i]);
	  }
	}

Code:
preference within package.json / needs to be implemented yet - use workers to post the value to the contentScriptFile

  "preferences": [{
        "name": "Autoplay",
        "title": "Autoplay",
        "description": "Defines whether a WebM video should be played immediately or on demand without getting preloaded",
        "type": "bool",
        "value": false
    }
]
 

also

Banned
Adjustable video height/width is on the list.

Memory size of the video doesn't seem to be in the metadata so I don't think I can do this. :(
Thanks!

Is it possible to make this extension work on other sites too? Like with Greasemonkey where users can simply make a list of websites that the script should run on.
 

ekim

Member
Thanks!

Is it possible to make this extension work on other sites too? Like with Greasemonkey where users can simply make a list of websites that the script should run on.

Sure - but I thought most other sites have their HTML5 videos embedded already. :p
 
The Mozilla Plugin works great on my MacBook.
When I play two big webms at the same time CPU usage is about 50%
If I stop them its 98% idle immediately.
 

LiquidMetal14

hide your water-based mammals
It's cool and really does make your CPU work. A good and a bad thing when I just want to browse regularly. I think GIF's won't be getting replaced anytime soon due to the HW requirements alone.

It does auto DL everything and while I don't have a bandwidth cap it's still annoying to see something DL when I don't want it to.

Other than those complaints, great work on the plugin.
 
Top Bottom