javascriptハックでiPhoneでflashが使える!

wired:JavaScript Hack Enables Flash on iPhone
By Charlie Sorrel

優秀なプログラマがなんとかiPhoneで,
adobeのFlashプラットフォームで作ったアプリを動かすことに成功した.
これはSafariブラウザで動くので,
Appleの独自審査があるApp Storeに登録する必要はない.

A rather clever programmer has managed to get the iPhone to run interactive apps created using Adobe’s Flash platform. And because it works inside the Safari browser, it isn’t subject to the dictatorial rules of Apple’s App Store.

このソフトはGordonと呼ばれ,
実際はFlash自体をiPhoneで動かすものではない.
その代わり,GordonはTobias Schneider作のJavaScriptランタイムを使う.
このランタイムはモバイルSafari上で.swf(Shockwave Flashファイルの拡張子)ファイルを再生することができる.
ランタイムとはソフトの集まりで,コードをその中で動かすことが出来るものを言う.
似たものに,TVゲームのエミュレータがある.
例えば,スーパーマリオをPC上でプレイできるものだ.

The software is called Gordon, and it doesn’t actually allow Flash itself to work on the iPhone. Instead, Gordon is a JavaScript runtime written by Tobias Schneider which allows the browser to play and display .swf files (the Shockwave Flash file extension). A runtime is a collection of software that allows the running of code inside it. A helpful analogy is a software emulator for a games console which allows you to play the actual code of, say, Super Mario World on your PC.

これはつまり,iPhoneがFlashをサポートしたと言えるのか?
そうではない.
あなたがFlash使用のサイトに行ってもなにもならない.
このハックはサイトが上記ライブラリを利用している場合の話だ.
サイトデベロッパはサイトに上記ライブラリを追加する必要がある.
しかしこれはほんの数行をコードに加えるだけの作業だ.

Does this mean that the iPhone now supports Flash? Not really. You can’t just visit any site that has Flash, because the hack only works on sites that have installed it. Developers would need to add this runtime to each instance of Flash on their sites (although calling the runtime only requires a few lines of code).

このオープンソースプロジェクトはだれでも入手できるが,
いまだFlash最大の問題が残っている.
SWF拡張子のファイルはまだCPUリソースをかなり使うのだ.
デモ一つ,シンプルなvector graphic of a tigerでさえ,
私のデスクトップPCのCPU使用率が100%になる.

And while the open source project is available to all, it still doesn’t solve one of Flash’s biggest problems. These SWF files still hog the CPU. One demo, a simple vector graphic of a tiger, throws my desktop browser up to around 100 percent CPU usage.

しかしこのハックは対話式の動画モバイルサイトに,
道を開く可能性を秘めている.
多くのwebデベロッパがHTMLでは難しい部分をFlashに頼っているのに,
iPhoneではFlashが動かないからだ.
そしてFlashサポートの欠落は,もっともiPhoneの批判の元となっているが,
Appleはそれに対して修正をしていない.
Adobeの努力として,10月にFlashアプリをiPhoneアプリに変換するツールを提供したが,
このツールはwebブラウザの中のFlashをサポートしていない.
さらにアプリをリリースする前にAppleの審査が必要だ.

Still, the hack potentially opens the door to a new class of interactive, animated mobile websites. While many web developers rely on Flash to accomplish things that can’t easily be done in HTML, those Flash apps won’t run on the iPhone. And while the lack of Flash support has been one of the most persistent criticisms of the iPhone platform, Apple has done nothing to rectify the problem. Adobe’s workaround, announced in October, has been to offer developers a way of converting Flash apps to iPhone apps, but that wouldn’t support Flash within the web browser, and those apps are still subject to Apple’s approval before they’re available.

Gordonのデモページに行って,実際に動きを見て欲しい.
(モバイルSafariでも,どのPCやMacのブラウザでも動く)
新しいiPod touchでは,アニメーションがなめらかに動く.
上記ランタイムがSWFファイルをビデオとして動くようにしている部分だ.

You can see it in action yourself by heading over to this Gordon demonstration page (which works in both Mobile Safari, on your iPhone or any desktop browser). On a new iPod Touch, the animations run just fine, and as the runtime is directly displaying the SWF files it should also work with video.

いずれApp storeで上記ランタイムを用いたブラウザが登場するだろうか?
それは難しい.
Appleはコード挿入をするアプリを拒絶しているからだ.

Could we ever see a browser in the App Store which would let us view any Flash content this way? It’s very doubtful, due to Apple’s ban on anything which can run interpretive code.

また,このプロジェクトの名前をつける時,
Tobiasは名前を検索してみなかったようだ.
googleで「Flash Gordon」を調べてみよう.
あるは,ジョークかな?

Also, when naming the project, Tobias doesn’t seem to have considered the search terms required to google it: Flash Gordon. Or maybe that’s the joke?

Comments

Popular posts from this blog

MacbookやiMacのSSD/HDDを完全消去する(High Sierra対応版)

conda clean --allはやってはいけない

Nintendo SwitchがあればChromecastはいらないぞ!