开发者

Actionscript NetStream.play drops port in relative URLs

the current page my flash application is running fro开发者_开发百科m is http://localhost:3000/. I'm trying to play a video using NetStream.play(relativeURL) by using a relative URL (e.g. "myVideo.flv"), but when I look at the actual request made by actionscript, it's dropping the port number. (e.g. http://localhost/myVideo.flv).

Is there something I can do on the flash side to make this work? Is anyone else having this problem?


NetConnection.connect( null ) is used to play progressive video and has nothing to do with whether the (video)file's hosted locally or remotely. If you would want to play streaming video, you'd pass in the host url of the streaming service. And yes, if you use a relative URL the port is dropped. I suppose some kind of 'translation' from relative to absolute is done, using the location of the embedding html file, which wouldn't be containing the port number, I think? Have you tried passing the absolute url (with port number) as the 'base' parameter to the .swf?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜