Apple,Adobe和Flash

在我的 ”平板电脑冥想两周前,我猜测苹果即将推出的平板电脑可能不会支持Flash,原因与iPhone不同对此的反应是两极分化 - 通常是“呃,当然不会”或“没有办法,它具有支持Flash“你可以看到两种反应黑客新闻中的帖子星期三,一组人会非常惊讶。

我一直在写这个传奇两年了我对这个主题的迷恋是因为它如此极端化,并且包含技术和政治问题。

在Flash和Mac OS X应用程序崩溃

两周前我写

To my knowledge, Apple controls the entire source code to the iPhone OSThat’s not to say they wrote the whole thing from scratch许多低级OS组件都是开源的But they have the source如果有错误,他们可以修复它If something is slow, they can optimize or re-write itThat is not true for Mac OS X, and Flash is a prime exampleThe single leading source of application crashes on Mac OS X is a component that Apple can’t fix.

几位读者问我最后一句中包含的指控来源,Flash是“Mac OS X上应用程序崩溃的主要来源”(并且对他们有好处;我不确定我在想什么,包括没有采购它。)

这是交易在舞台上去年六月WWDC 2009主题演讲苹果软件工程高级副总裁Bertrand Serlet在Snow Leopard中解释了Safari的新Web内容插件机制现在,Web内容插件不是在Safari的应用程序进程中运行,而是在自己的进程中运行,因此如果它们崩溃,它们(通常)不会使Safari本身崩溃你在插件执行的页面中得到一个破碎的小矩形,但浏览器本身仍在运行。

苹果这样做有两个原因如上所述,Serlet在舞台上陈述的原因是“抗撞击性”As for why such crash resistance was worth implementing, Serlet explained that, based on data from the Crash Reporter application built into Mac OS X — the thing that asks if you’d like to send crash data to Apple after a crash — the most frequent cause of crashes across all of Mac OS X are (or at least,前雪豹)“插件”。

Serlet没有说出任何特定的有罪插件只是“插件”但是在WWDC的这一周,我确认了几位熟悉Crash Reporter聚合数据的Apple消息来源,他们证实“插件”是“Flash”的委婉说法。

换句话说,在Apple的大量崩溃报告中 - 来自所有用户的所有应用程序崩溃,所有用户点击按钮将这些报告发送给Apple - Flash比其他任何内容都要多这并不意味着Flash会以某种方式导致任何各种应用程序崩溃Presumably, most of the time it’s Safari or some other browser playing Flash content值得注意的是,这并不一定意味着Flash特别容易出现崩溃或设计不良把它想象成这样的公式:

总崩溃=(崩溃的错误)×(实际使用)

Flash的数量和崩溃错误的严重程度可能会有点低,它仍然会导致大量的崩溃,因为它实际上已经被使用了all the time- 任何在网页中播放Flash内容的Mac用户而且,如果Flash Player适用于Mac OS X设计糟糕的过度错误的代码,嗯,更糟糕的是。

但是,另一个原因是Apple为Snow Leopard中的Web内容插件创建了这个新的外部流程架构:这是他们将Safari和WebKit框架作为64位二进制文​​件发布的唯一方式Flash Player仅作为32位二进制文​​件提供(对于像Silverlight这样的其他第三方Web内容插件也是如此,但Flash是唯一一个作为系统一部分提供的插件。)64位应用程序无法运行32位插件Apple没有Flash的源代码,因此只有Adobe才能使Flash Player与64位兼容他们还没有因此,如果Apple希望Safari在Snow Leopard中成为64位(他们确实如此),他们需要在一个单独的进程中运行像Flash这样的32位插件。

也许你不相信Apple的Web内容插件是Mac OS X上最常见的崩溃源Maybe you don’t believe me and my unnamed sources at Apple that it’s Flash in particular that accounts for this这很酷,怀疑是好的So then in that case, maybe Bertrand Serlet blamed “plugin crash resistance” for political reasons, just to stick a knife in Adobe’s back, and the only reason Apple went with this external-process architecture was for the 64-bit/32-bit incompatibility.

尽管Apple希望在64位系统范围内实现这一事实,但闪存仍然是32位二进制这一事实Flash仍然是32位,苹果无法做到这一点Apple不得不设计一个全新的插件架构,而不是自己制作64位Flash。

这就是为什么Apple想要控制整个操作系统的源代码如果他们想在iPhone OS上使用64位,那么完全由Apple自己控制And what happens if Apple goes to a new CPU architecture? For the components Apple controls the source code to, they can recompile for the new architecture如果整个系统没有为新架构干净地重新编译,那么它们可以在它上面进行处理对于Flash这样的组件,Adobe控制源代码,Apple必须等待。

Which situation do you think Apple is happier with? Mac OS X, where they had to create a new web content plugin architecture because Flash crashes frequently and isn’t 64-bit? Or iPhone OS, where they control the source code to every single component, and can do whatever they want, when they want?

Point is, even if you think Flash Player for Mac OS X is the greatest piece of software in the world and that a Flash Player for iPhone OS would run just fine, too — there’s no denying that Apple executives have said and continue to say anti-Flash things publiclyApple并没有对Flash说太多,但他们所说的并不像他们所说的那样,如果他们期待支持它更多而不是

专有网站

常规的DF读者可能已经非常清楚我不关心Flash,而且我希望Apple永远不会将它包含在iPhone OS中不妨让我的偏见清晰。

Why? At the core, because Flash is the only de facto web standard based on a proprietary technology有许多专有的网络内容插件 - 包括Apple的QuickTime - 但Flash是唯一一个无处不在,它是事实上的标准Flash是通过网络传输视频的方式,Adobe完全控制Flash没有其他方面的网络像这样工作HTML,CSS和JavaScript都是开放标准,有许多实现,包括几个开源。

支持iPhone(以及平板电脑,无处不在)Flash支持的最简单的论点是Flash凭借其受欢迎程度和普遍性,成为网络的一部分但最好的说法反对Flash支持是指整个网络对于拥有像视频一样重要的内容对单个公司来说是有害的,唯一可以改变的方法是,如果一个开放的替代方案成为网络发布者的一个引人注目的目标。

这是一个鸡与蛋的问题Publishers use Flash for web video because Flash is installed on such a high percentage of clients; clients support Flash because so many publishers use Flash for web video拥有iPhone的Apple正在解决鸡和蛋的问题For the first time ever, there is a large and growing audience of demographically desirable users who don’t have Flash installed如果要向iPhone用户显示视频,则需要使用H.264。

Apple并没有试图用自己专有的东西取代Flash他们用H.264和HTML5取而代之除了Adobe之外,这对每个人都有好处。

是的,我知道Flash不只是播放视频但是,当他们谈论Flash不能在iPhone上工作时,这是每个人都在谈论的主要内容 - 视频And when you talk about other uses for Flash, you’re talking about serving as a software runtime, and whether you like it or not, Apple has a clearly stated opposition to third-party software runtimes for iPhone OS, and that policy seems to be working out pretty well for them.

这是我从DF读者那里得到的一封电子邮件:

我在圣诞节那天等着喝咖啡In front of me was a kid, about nine or ten, who had an iPhoneHe clearly had gotten it that morningHe was pushing frantically at a white box on a web page with the broken plug-in symbolHe was squeezing it, swiping itHe was frustrated and on the verge of getting pissed with his new toyIt seemed like he was trying to hit an online game page, probably one he was used to playing on the family PCFinally I couldn’t take it anymoreI leaned over and said, “It won’t load FlashIt won’t play your Flash games.” His mom, ignoring him up to that point, was triggered by a stranger talking to her kid“That’s okay honey,” she said, “we’ll get you a game from the App Store.” His response to this? He started working that device even harderHe didn’t want an App Store game; he wanted his Flash gameAnd that iPhone suddenly took a huge dive in value to him.

无论喜欢与否,Apple都需要与此达成协议If only for the kids.

我认为这个轶事,以及这位读者从中获取的内容,准确地捕捉到了“苹果最终必须扭曲这种情绪”背后的感觉。

但从Apple的角度考虑它How do you think this situation turned out in the long run? Do you think the kid told his mom to return the iPhone for a refund? Or, do you think they went home and started buying games from the App Store? That there was a period of initial frustration due to Flash games not playing doesn’t change the fact that they (a) bought an iPhone and (b) were set to buy games from the App Store.

我并不是说苹果公司对Flash的明显行政级别的反感与Apple自身的利益不同(我确实认为,Apple的WebKit团队真正理想主义是帮助整个网络。)

但是,尽管苹果公司可能会恶意行事,但他们并不是在吐口水iPhone缺乏Flash并没有伤害到它也许这将在未来发生变化,如果有一天Flash在其他移动平台上受到欢迎,但不要屏住呼吸。

Mac OS X上的Flash性能

除了上面关于Flash专有的原则性问题之外,还存在实际问题一,Flash在Mac OS X上的上述崩溃其次,除了崩溃之外,它在Mac OS X上的性能不如在Windows上那么好特别是对于视频播放,与通过QuickTime播放的H.264相比,Flash的性能相形见绌这是不主观我的机器是一台已有两年历史的MacBook Pro它通过QuickTime播放全屏H.264视频没有问题当我播放全屏Flash视频时,我的粉丝每次都会在几秒钟内开始播放。

我一直在努力使用适用于Mac OS X的Flash Player,但这种性能情况并非完全由Adobe掌握在Windows上,Flash使用H.264的硬件解码(如果可用)在Mac OS X上,它没有这就是为什么Flash视频播放在Windows上比Mac OS X表现更好的原因之一,以及为什么通过QuickTime(使用硬件解码)在Mac OS X上播放H.264更好的原因。

据Adobe称,这是因为他们不能这是他们的一个条目Flash Player常见问题

QWhy is hardware decoding of H.264 only supported on the Windows platform?

一个In Flash Player 10.1, H.264 hardware acceleration is not supported under Linux and Mac OSLinux currently lacks a developed standard API that supports H.264 hardware video decoding, and Mac OS X does not expose access to the required APIsWe will continue to evaluate when to support this feature on Mac and Linux platforms in future releases.

Adobe平台传道者Lee Brimelow最近发布了一篇文章博客条目解决这个问题

但是让我们来谈谈Mac上的Flash PlayerIf it is not 100% on par with the Windows player people assume that it is all our faultThe facts show that this is simply not the case. Let’s take for example the question of hardware acceleration for H.264 video that we released with Flash Player 10.1Here you can see一些公布的结果for how much the situation has improved on WindowsUnfortunately we could not add this acceleration to the Mac player because Apple does not provide a public API to make this happen您可以通过询问Apple轻松验证I’m happy to say that we still made some improvements for the Mac player when it comes to video playback, but we simply could not implement the hardware accelerationThis is but one example of stumbling blocks we face when it comes to Apple.

我知道没有理由对此提出异议Windows比Mac OS X更适合像Flash这样的第三方运行时我认为大多数人会同意Apple是一家自以为是的公司(至少可以说),他们会制造自以为是的产品Apple关注的运行时是Cocoa和WebKitApple播放H.264的方式是通过QuickTime API(实际上,Snow Leopard的新QuickTime X API),而不是编写自己的H.264播放代码,试图直接访问硬件加速器。

你可以争论苹果采取这种立场的原因有人可能认为它是务实的 - Apple不允许第三方软件访问硬件H.264加速之类的东西,因为它试图在第三方软件和底层硬件之间保持一层抽象有人可能认为这是政治性的 - 苹果很高兴让Flash在性能方面表现不佳,因为Flash在几个不同的方面与Apple产品竞争激烈(E.g您可能希望完全基于Flash的Hulu可以在您的iPhone上运行并在Mac上运行得更好Apple希望Hulu的内容通过iTunes Store。)

我认为这是- Apple对Flash Player的厌恶既是工程品味的问题(第三方软件应该只能访问高级API)政治但客观地说,无论你个人希望Apple在Flash方面做些什么,如果Adobe需要Apple授权他们进一步访问硬件来制作苹果电脑version of Flash Player better, what are the odds that they’d get that sort of low-level hardware access on the iPhone OS? (Hint: zero.)

我将最后一句话留给苹果首席运营官蒂姆库克,谁一年前说过,“我们相信简单,而不是复杂我们相信,我们需要拥有和控制我们生产的产品背后的主要技术,并且只参与我们可以做出重大贡献的市场。“

Flash由Adobe拥有和控制。