开发者

Streaming a .jpg file using actionscript or flash or a player that works across all browsers

开发者 https://www.devze.com 2023-01-31 15:40 出处:网络
Good day all. Im a new programmer. Im also new to flash. I have an activex display that is custom-built and displays video from an IP camera.

Good day all. Im a new programmer. Im also new to flash.

I have an activex display that is custom-built and displays video from an IP camera. However it doesnt show on all browsers.

I was then adviced to use flash/actionscript to st开发者_如何学运维ream a jpeg that the camera drops on a remote server with ip address (just example) 80.247.23.12/container/live.jpg.

However the file name is constant. how can i use flash to stream this live jpeg and make it appear like a streaming movie. I don't know how to go about this at all.

thanks in advance.


I don't think you can "stream" a jpg file in that sense, in the setup you describe, but you could load it repeatedly using ActionScript, to update the displayed image ever 5 seconds or so.

That the file name is constant, as you mention, can give a problem where a cached image will be used instead of the new one being downloaded, but you can work around that by appending a changing value to the image URL in each call, so the URL will be unique ever time. It could be any changing value, really, like a counter or a timestamp, so the URL could be something like this:

http://80.247.23.12/container/live.jpg?1
http://80.247.23.12/container/live.jpg?2
http://80.247.23.12/container/live.jpg?1293042590814   // timestamp for the current time

You can think of the extra value as a bogus GET parameter, if you will. It won't be processed by the server or anything, it will just be ignored, but it makes the URL unique for each call.

0

精彩评论

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