从ByteArray的Flash Player中播放的FLV [英] Play FLV from ByteArray in Flash Player

查看:205
本文介绍了从ByteArray的Flash Player中播放的FLV的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有存储在ByteArray对象Flash视频文件(FLV),并想播放该视频。有什么办法能实现吗?也许使用炼金术?

感谢您!

解决方案

我想:为什么ByteArray的,其实就是现在的问题......又是如何呢? :)

有许多方法......一人由康拉德......但他说,这将是缓慢的......其实,我认为这将是慢得多比你能想象......所以在这里给另一个问题:

通过ByteArray的一台服务器,并加载从那里FLV ......有几种选择:

  • 在远程服务器:加载到远程服务器(可能是一个分发您的SWF)......还是留下一个问题:为什么你不摆在首位,从这里分发的FLV ...
  • 在本地服务器:
    1. 安装:只需安装一个很小的局部应用程序来做到这些对你来说,那就是,你可以把的ByteArray那里,然后检索它在合适的protocoll(HTTP,RTMP)...
    2. 在浏览器中嵌入:同安装,但您可以简单地创建一个Java小程序做的工作...的签署 Java小程序允许绑定端口(是的,这是一个额外的点击用户,但它的舒适,因为它可以得到),这是你必须做的事情,剩下的就是真的一样与安装的服务器...

在这两种情况下,你可能(仅发送时也许,因为我认为你被允许加载跨域视频)运行到跨域策略问题,你需要正确的FlashPlayer的策略文件请求作出回应(你可以找到吨东西上)......你可以绕过通过一个LocalConnection桥发送的限制,如这个的C#...

吉祥话......)


编辑:啊好吧,现在我明白了...其实,已经有一个的非常类似的问题 ......我记得有一个简短采访一些土坯的家伙,只是短期内的P2P功能后宣布... Adob​​e是很避讳这个......其实它我花了几个星期找flash播放器后,在点到点10正式发布(真的没有时间之前打扰)...

其实,我觉得这是是故意......在采访中,有人明确表示,这土坯是不是想推开视频流网站...这两个最重要的可能是YouTube和谷歌视频.. ,YouTube是主要的原因,为什么flash播放器摆在首位变得如此流行的一种...并且它是由谷歌所拥有,如谷歌视频...允许轻松创建一个P2P的媒体平台会激怒谷歌关闭了很多..你并不需要很多的服务器为的......刚好的软件,但这是经济实惠的。我想,Adobe不希望激怒谷歌...一些原因:

  • 在他们的搜索引擎
  • 他们需要谷歌允许索引基于Flash的网站
  • 在谷歌的n倍大
  • 在谷歌真的试图让RIA市场的一大块......他们有 GWT ,镀铬的 V8 的的本机客户端 ...

所以我猜Adobe不具有太大的兴趣这样做......这是pretty的多一点,就像当谷歌宣布了他们的支付系统(它是否GPay左右),这是一个直接同时贝宝的...易趣是谷歌最重要的收入来源之一,另外,其实我从来没有听说过一遍什么...

许多决定是政治性的,当涉及到大公司。我想,一个不使Flash Player的P2P过强就是其中之一......


I have a flash video file (FLV) stored in the ByteArray object and would like to play this video. Is there any way to achieve it? Maybe using Alchemy?

Thank you!

解决方案

i think "why ByteArray" is actually THE question ... how did it get there? :)

there are numerous approaches ... one was given by konrad ... but as he said it will be slow ... in fact, i think it'll be much slower than you can even imagine ... so here another one:

pass the ByteArray to a server and load the flv from there ... there are several options:

  • remote server: load it to a remote server (probably the one distributing your swf) ... still leaving the question why you don't distribute the flv from there in the first place ...
  • local server:

    1. installed: simply install a tiny local app to do exactly that for you, that is, you can push the bytearray there and then retrieve it over a suitable protocoll (HTTP, RTMP) ...
    2. browser-embedded: same as installed, but you can simply create a Java Applet to do that job ... signed java applets are allowed to bind ports (yes, this is an extra click for the user, but it's as comfortable as it can get) which is what you'll have to do and the rest is really the same as with an installed server ...

in both scenarios, you might run into crossdomain policy issues (probably only when sending, since i think you're allowed to load videos across domains), where you need to respond correctly to FlashPlayer's policy file requests (you can find tons of stuff on that) ... you could bypass sending restriction by making a LocalConnection bridge, as this one for C# ...

good luck then ... ;)


edit: ah ok, now i understand ... actually, there was already a very similar question ... i remember a short interview with some adobe guy, just shortly after p2p feature was announced ... adobe is very shy about this ... actually it took me weeks to find the p2p after flash player 10 was officially released (didn't really have time to bother before) ...

actually, i think this is made on purpose ... in the interview, it was made clear, that adobe is not trying to push away video streaming sites ... the two most important probably are youtube and google video ... youtube is one of the main reasons, why flash player became so popular in the first place ... and it's owned by google, as google video ... allowing easy creation of a p2p media platform would piss google off a lot ... you don't need a lot of servers for that ... "just" good software, but that's affordable ... and i think, adobe does not want to piss off google ... some reasons:

  • they are THE search engine
  • they need google to allow indexing flash based sites
  • google is n times bigger
  • google is really trying to get a huge chunk of the RIA market ... they have the GWT, chrome, the V8, the native client ...

so i guess adobe does not have that much of an interest to do so ... it's pretty much a bit, like when google announced their payment system (was it GPay or so?), which was a direct concurrent of PayPal ... eBay is one of google's most important income sources ... and actually i never heard anything about it again ...

many decisions are political, when it comes to big companies ... and i think, the one not to make flash player's p2p too strong is one of them ...


这篇关于从ByteArray的Flash Player中播放的FLV的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆