Open DanAtkinson opened 13 years ago
@jbolster's recent work has motivated me to look into this again.
It's a few years on and I'd like to revisit it. Standards and compliance has come on leaps and bounds since the backward days of 2011.I'm going to use the video
tag to do this.
After 3.0 goes live.
I was looking at https://github.com/ubershmekel/redditp
That project's idea is to pull in images from a subreddit, but it has a few parsers and converters to detect (some) videos and images.
Could be useful for inspiration
The detection logic seems really limited there. For the most part the logic is fairly straight forward. Interrogating the file extension would probably work.
My intention was to make use of the chrome.contextMenus
ContextType. Where we currently have a single set of onclick event handlers, we would actually have multiple. For example, see this gist.
That'd be one way of doing it. I'd need to look at the 'link' contextType though as that might present a problem...
Currently images are the only type of content displayed in fusks, but it seems odd that other formats could not be supported either.
Therefore, I propose that, at the very least, videos would be enabled also.
In order to ensure that most video formats are catered for, it's best that HTML 5 isn't used, and therefore a Flash player is looked into instead.
I've looked at a few different types, and FlowPlayer - flowplayer.org - looks pretty cool. There's also VideoJS which uses HTML5, but also falls back to a Flash player if all else fails. The latter seems like a pretty cool way to handle video.
In order to do this, we'll need to ensure that we can reliably capture the MIME type of the first successful response and use that as the basis for the other requests.