Even YouTube must continue to support Flash video for at least another year because many websites embedded Flash videos using YouTube's boilerplate embedding HTML with the Flash <object> tag. Google can't magically rewrite these third-party websites' HTML. :) Maybe YouTube can use some SWF that loads or redirects people to youtube.com? Or browsers could recognize YouTube's boilerplate embedding HTML and rewrite it with YouTube's HTML5 video.
Flash, while pretty atrocious, is part of the cultural legacy of the web.
Someday shumway may be the only way reasonable way to access this via archive.org etc.
Note that for a lot of content, it's not even required to use Shumway in the form of a browser extension or built-in system: it's perfectly possible to run SWFs with Shumway as a website-deployed player. E.g., the header on http://areweflashyet.com is deployed that way and works just fine in all modern browsers.
Browsers themselves don't need to do it. It could be a (very useful) browser extension or a user script.
I'm on a friends tablet now, but I'm looking forward to digging through the implementation later. Keep up the good work!
P.s.: Did you find parts of AS3 beautiful? :-)
In Shumway, we do almost all rendering in a Canvas element, so we haven't experimented all that much with DOM-heavy constructs.
As for your last question: I used to work with AS3 on a daily basis in a previous work-life, so I have extensive experience with it. Yes, there are some parts of the language that're very nice. I think that optional static typing is the best of all worlds, for example. The details of AS3's type system leave much to be desired, but the IDE support gained through static typing and the large set of bugs that're far easier to avoid are easily worth it.
Also, declarative classes are, in my opinion much easier to deal with than, e.g., the unstructured alternatives in JS. That's part of why we moved to TypeScript, and I'd argue that it vastly improved the quality of our codebase. I'm very much looking forward to classes in ES6.
Of course there are things that I don't miss about AS3 and regret having to deal with in Shumway. Namespaces are one, E4X the other. Both are good concepts in theory but hugely problematic in practice because of issues in the details.
That's not a portmanteau though is it? I thought a that was when you joined two words, eg hungry + angry = hangry. Maybe portmanteau has different variations that I'm unaware of - though I know I probably just sound like a pedant.
I'd be highly surprised if it were a new software naming method, it's definitely not a new thing of itself.
That is very cool, if so.
If so, is it possible to use UDP over shumway?
AFAIK, Shumway does not support UDP sockets, but, as a Firefox extension, it could access Gecko XPCOM APIs that are not available to JS on the web.
>Shumway needs H.264 video decoders that may not be available on Windows XP or Linux.
Is that a reason for Linux users to be annoyed, or just something that happened and will be corrected soon?
EDIT: It looks like Linux support shipped in FF26 as long as GStreamer supports it: https://bugzilla.mozilla.org/show_bug.cgi?id=794282#c101
Windows XP is still left out – they use DirectShow for MP3 (https://bugzilla.mozilla.org/show_bug.cgi?id=861693) but using it for H.264 would require a licensed plugin which few people have and while OpenH.264 is available, it doesn't support the Main & High profiles used for most video on the web (it's been focused on streaming): https://bugzilla.mozilla.org/show_bug.cgi?id=799318#c57
ffdshow has been able to play H.264 and a bunch of other codecs for a long time, and a not-insignificant number of users probably have that or some other codec that can...
Also, that wouldn't change anything about the current situation: we still can't rely on users having the right codecs installed. We're not saying that Linux and Windows XP won't be supported going forward. They most definitely will. As part of this first small step towards deployment, we opted for a conservative approach where we only enable Shumway in situations we have the maximum amount of control over. This will be broadened over time.
What would be required in order to get Shumway to actually play video from PIV (instead of Amazon simply demanding that the user installs Flash or Silverlight)?
What's the easiest way to test shumway on arbitrary files? I'm running the latest nightly, but the amazon videos still use flash (tested by checking the right click menu). I've tried the extension in the past, but it never seemed to do anything.
Also, it would be nice if there was, say, a table of common flash APIs coloured by implementation status, for easy tracking of shumway completeness.
There are two easy ways to test Shumway on all SWF files: if you don't want to use Firefox Nightly, you can just install the extension from http://areweflashyet.com/ and should be all set. If you're using Firefox Nightly, you can simply visit about:config and change the shumway.swf.whitelist setting to "*". Note that you still need to have the Flash plugin installed for most sites to work, as I explained in another comment a few minutes ago.
Regarding the table of supported APIs: the problem with that is that we actually have most APIs implemented, but have compatibility bugs in some of them which break content. If we could easily list the broken APIs, then in most cases we could just as easily fix them. That said, there are some major API areas we don't yet support. Those are mostly related to newer and thus less-used capabilities, such as Flash's version of WebGL, called Stage3D, and a new text layout system called Text Layout Engine.
I'm guessing that lightspark must already have some tests, and from your side there are probably some they could use too ?
You can try Shumway in other browsers without the extension at the project website:
The SpiderMonkey team's "Are We Fast Yet?" website also includes some AS3 benchmarks running in Shumway on Firefox, Chrome, and Safari:
Our team was uncertain how to reach at Amazon to get your blessing. :) If you (or Amazon management :) have any problems or concerns, please feel free to email me at cpeterson at mozilla dot com!
re HTML5 video: do you use it on desktop browsers? Mozilla is working hard to improve our HTML5 video implementation. Can we opt in Firefox for HTML5 video? Playing Flash videos in Shumway is just a stepping stone on the path to HTML5 video.
We feature detect everything but have been prioritizing Flash at the moment due to issues with Chrome and HTML5 video.
Interesting. Is HTML5 video the default on Firefox for Windows or only used when Flash is not installed? (I only have a Mac.)
Have you found specific Firefox problems with HTML5 video on Mac? Feel free to email me if you have questions for Firefox's video team about debugging or optimization. They are friendly folks. :)
What versions of SWF does Shumway aim to support? 7, 8, 9, 10, all of the above?
How does Shumway interact with click-to-play and similar mechanisms to stop unwanted Flash objects from playing? Does it have that functionality built-in?
Shumway does not currently support click-to-play because it is not a real browser plugin. It hooks into Firefox's click-to-play mechanism to conditionally override the Flash plugin. This is a hack and will soon be replaced with "jsplugins", a Firefox feature that will allow browser plugins to be written in JS and run in an out-of-process sandbox:
Same process isolation, but the JS plugin got a vastly reduced surface to attack.
From the discussion on HN, it sounds like Shumway aims to be a drop in replacement for Adobe's Flash plugin.
If you use Shumway, though, don't forget to disable Adobe's Flash (I've found that having it enabled and Shumway installed results in rather brutal crashes).
0) Have a Macbook Air running OS X Yosemite
1) Install Firefox
2) Install Adobe Flash
3) Install Nightly
4) Install Shumway
5) Attempt to open http://www.albinoblacksheep.com/flash/shumway
6) Watch Firefox complain that the tab crashed
7) Try to reload the tab
8) GOTO 6
Disabling Flash (via the Addons screen in Firefox/Nightly) seems to fix the issue.
I've worked a lot with Flash bytecode and contributed to Shumway a long time ago, so if you have any more questions, let me know!
RABCDAsm author here. Curious about the same, I've always thought the project might be useful to VM implementers. Also wondering if you've had trouble with obfuscators that employ control flow obfuscation, and create unreachable basic blocks with junk code.
Oh, I've seen much worse. The AS1 VM actually treats the entire SWF file (after decompression) as an AS program. That means it's possible to jump outside of the bytecode tag and into e.g. the metadata of a JPEG file.
(This is something that is still not fixed in Gnash, so Shumway is certainly farther along.)
Shumway falls back on an interpreter if the control flow is not reducible.
We feature detect flash via the navigator.plugins object and from that thread it doesn't look like shumway is listed there.
(I'm a dev on that player)
Somewhat absurdly, you currently need Flash to use Flash without Flash in many cases. We don't yet have support for installing Shumway in navigator.plugins, so sites that detect Flash using that (i.e., most of them) currently only work in Shumway if Flash is installed, too.
This will be fixed once https://bugzilla.mozilla.org/show_bug.cgi?id=558184 lands.
It would NEVER be safe to Ctrl+V again!
In fact, requiring a plugin for this functionality only serves to increase the attack surface for the browser as a platform.
GitHub's "copy repo URL to clipboard" button uses Flash to write to the clipboard. Shumway has implemented Flash's clipboard APIs (which it can do because it can access Gecko XPCOM APIs as a Firefox extension), but they are currently disabled because Shumway hasn't implemented the "in response to user click" bit yet.
Today I learned that Firefox still supports Windows XP.
Microsoft added its "Genuine Windows" copy protection in XP SP3, so XP SP2 is especially common. (Firefox supports both XP SP3 and SP2.)
I've even seen myself a Windows XP with Firefox installed in a shop just a few days ago.