mozilla / shumway

Shumway is a Flash VM and runtime written in JavaScript
Apache License 2.0
3.68k stars 397 forks source link

Chrome extension? #834

Open ebraminio opened 11 years ago

ebraminio commented 11 years ago

(cc: @Rob--w) Just like the chrome extension for pdf.js, couldn't we have a chrome extension from shumway?

mbebenita commented 11 years ago

Yes we could, and we should. However, we don't have the resources and the expertise to pull it off. Someone with intimate knowledge of how Chrome does things can probably do it quite easily.

Rob--W commented 11 years ago

Chrome does not offer a way to directly capture and replace all content for a given MIME-type. Correct me if I'm wrong, but I believe that you want to have the following cases covered:

<object type="application/x-shockwave-flash">...</object>
<embed type="application/x-shockwave-flash"></embed>
<iframe src="path/to/thing.swf"></iframe> (and <frame>)
path/to/thing.swf (direct visit)

For the last two cases, existing code from PDF.js can be re-used. The first two (common) cases are not implemented yet, but once it lands in PDF.js (probably via the beforeload event and/or -webkit-appearance and/or shadow DOM (once shadow DOM supports embed and object tags)).

I will not jump into this project right now, perhaps later when Shumway has full YouTube support.

ebraminio commented 11 years ago

Thanks. For the first step IMO, if there is some missing feature on implementing that two first on Chrome, please report it as a bug on Chromium project and put the relevant bug links here. For YouTube I guess there should be some way to quickly instruct the site to use HTML5 player as its default player as it is very stable to use but I know your concern about other video hosting sites. Also I guess one of requironments for this project would be migrating to grunt.js build system as PDF.js codes for compiling the crx output was in grunt I think

Rob--W commented 11 years ago

The bits and pieces to hack something together for <embed>/<object> do already exist. I just haven't had the opportunity yet to implement it (https://github.com/mozilla/pdf.js/issues/3736). I have only taken a shallow look at the possibilities, I might find other methods when I really start working on the feature. For PDF.js, the implementation is easier than Shumway, because PDFs embedded in embed/object tags don't have to interact with their containing document, whereas Flash objects may expose external JavaScript APIs (I wonder how you're currently achieving this in a secure way).

Youtube's HTML5 player can indeed be used. However, not all videos can be played in HTML5, so Flash is occasionally needed. Try

PS. PDF.js does not use Grunt, but make from shelljs with a custom preprocessor (/external/builder/builder.js@pdf.js). The build script doesn't have to generate crx files, because the Chrome web store takes zip files, not CRX files as input.

sinistersnare commented 10 years ago

Is there any momentum on this?

Rob--W commented 10 years ago

Let me know when Shumway is production-ready, then I will look for the best way to implement a Chrome extension (which might involve developing some new extension APIs in Chromium, so this is really a lot of work, that's why I want Shumway to be at least production-ready, i.e. displays most Flash files just fine (in particular music players)).

klipstein commented 10 years ago

Am Mittwoch, 8. Oktober 2014 schrieb Davis Silverman :

Is there any momentum on this?

— Reply to this email directly or view it on GitHub https://github.com/mozilla/shumway/issues/834#issuecomment-58309050.

Kind regards / Mit freundlichen Grüßen

Tobias von Klipstein

uxebu GmbH Fraunhofer Straße 31e 86167 Augsburg klipstein@uxebu.com, mobile: +49 175 207 32 45

Amtsgericht Augsburg, Handelsregister HRB 28613 Directors: Wolfram Kriesing, Tobias von Klipstein