Live data from Hacker News

Firefox Nightly now plays Amazon.com Flash videos using Shumway

mail.mozilla.org

81–90 of 109 posts

Re: Firefox Nightly now plays Amazon.com Flash videos using Shumway

#81
post #14

How do you go from swf files to "action script"? Do you use flasm/flare for as2? How do you turn as3 abc files into action script? Did you write your own decompiler or use some other open source ones? There's a disassembler written in D for as3 that I used to use called rabcdasm, did your team ever take a look at that?

> There's a disassembler written in D for as3 that I used to use called rabcdasm, did your team ever take a look at that? 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.

Thanks for the great tool, we used it quite a bit when we first started working on Shumway.

Shumway falls back on an interpreter if the control flow is not reducible.

Re: Firefox Nightly now plays Amazon.com Flash videos using Shumway

#82
post #14

How do you go from swf files to "action script"? Do you use flasm/flare for as2? How do you turn as3 abc files into action script? Did you write your own decompiler or use some other open source ones? There's a disassembler written in D for as3 that I used to use called rabcdasm, did your team ever take a look at that?

> There's a disassembler written in D for as3 that I used to use called rabcdasm, did your team ever take a look at that? 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.

Thanks for the great tool, we used it quite a bit when we first started working on Shumway.

Shumway falls back on an interpreter if the control flow is not reducible.

Re: Firefox Nightly now plays Amazon.com Flash videos using Shumway

#83

Earlier quoted context omitted.

> Obfuscated AS1 code can do strange things like jumping to unaligned SWF addresses in the middle of bytecodes. 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.

Reminds me of one highly-regarded (at the time) obfuscator whose operation consisted entirely of renaming the existing bytecode tags to a reserved value, and adding a bytecode tag after it with lots of useless code including opaque predicates which eventually jumped out of the tag, backwards, into the original code. A bit of a letdown as I was looking for a challenge at the time, but that jump out of the tag was sure…

We can detect when bytecode is not well formed and fall back on interpretation, which can handle these nasty cases. This is more of a problem for AVM1 than AVM2.

Re: Firefox Nightly now plays Amazon.com Flash videos using Shumway

#84
post #42

Cool tech, but I'm a bit sad that I can't watch Shumway[1] using Shumway. [1]: http://www.albinoblacksheep.com/flash/shumway

You actually can; I'm doing so right now. However, you need to install the full Shumway extension from http://www.areweflashyet.com/shumway/ (the stripped-down version shipping in Nightly is limited to Amazon only).

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).

Re: Firefox Nightly now plays Amazon.com Flash videos using Shumway

#85
post #7

I'm a program manager on Mozilla's Shumway team. If you have any questions, please ask! :) The name "Shumway" is derived from "Gordon Shumway", the actual name of the TV character ALF: Flash -> Flash Gordon -> Gordon Shumway -> Shumway. :) Shumway is written in TypeScript. It has an ActionScript interpreter and a JIT that generates JavaScript, compiled using eval(). The code is on GitHub: https://github.com/mozilla/s…

I understand that Prime Instant Video isn't supported (according to the announcement) because Amazon uses Silverlight for that. However, it is possible to switch to Flash as a sort of fallback (this is a required step for, say, streaming PIV to a Chromecast).

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)?

Re: Firefox Nightly now plays Amazon.com Flash videos using Shumway

#86
post #51

Earlier quoted context omitted.

In part, the team just wanted to experiment with TypeScript. Also, the language is syntactically similar to AS3 so there is a close mapping from the AS3 library APIs to Shumway's TypeScript implementation.

was there any pain point, at TypeScript side? what do the team think now about their initial decision giving TS a try?

Overall we had a good experience. There were some pain points at first with compile time, but that was greatly improved with the new TS compiler.

Re: Firefox Nightly now plays Amazon.com Flash videos using Shumway

#88

I just tested against Firefox Nightly on the amazon pages and it doesn't appear to be even loading the Flash renderer. 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)

(Shumway tech lead here)

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.

Re: Firefox Nightly now plays Amazon.com Flash videos using Shumway

#89

Earlier quoted context omitted.

Yes and no. Shumway is in a race to stay relevant as Flash fades from the web, but there will always be a long-tail of Flash content that would/will be lost when Adobe or browsers stop supporting the Flash plugin. 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 tag. Google can't magically…

This is a serious point though. 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.

This is indeed a major consideration: Flash will undoubtedly go away as a player, and if we don't want to lose all the legacy content with it as if it were stored on floppy disks, Shumway or something like it is the only solution.

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.

Re: Firefox Nightly now plays Amazon.com Flash videos using Shumway

#90
post #7

I'm a program manager on Mozilla's Shumway team. If you have any questions, please ask! :) The name "Shumway" is derived from "Gordon Shumway", the actual name of the TV character ALF: Flash -> Flash Gordon -> Gordon Shumway -> Shumway. :) Shumway is written in TypeScript. It has an ActionScript interpreter and a JIT that generates JavaScript, compiled using eval(). The code is on GitHub: https://github.com/mozilla/s…

Slight tangent: I've spent the past week experimenting with different kinds of bitmap caching achievable in the browser. Given that you understand both the browser and the way DisplayObjects implement bitmap caching in Flash, I was wondering if you got any clues on how to optimize DOM heavy pages? There are quite a few situations where momentarilly swapping out complex static DOM with a bitmap representation would de…

I think letting the browser do this kind of caching for you is best in most cases. Developers have used tricks to force browsers to layerize content for many years, and browsers have become better at that over time. Nowadays, it should be fairly simple to isolate complex but unchanging content into its own layer that's cached and composited with the rest of the page instead of being rerendered for each page update.

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.

Post reply on HN