Users upload different types of files (images, videos, audio, docs etc) on our DAM server and perform different operations on those. We have public links for all t开发者_如何转开发hese assets to enable an access without any authentication.
We are having some problem working with flash videos uploaded on our server. Using a public link one can download and save the file alright. However when a public link is used in say a blog post, the video does not get displayed. When I try to open the same video using one of the desktop flash players it plays it fine when file is downloaded but fails to do so when pointed to a public link.
The embed code I use in a blog post is like this -
<object type="application/x-shockwave-flash" width="550" height="400" data="http://dam_server/flash/flashplayer.swf?file=url_encoded_public_url">
<param name="movie" value="http://dam_server/flash/flashplayer.swf?file=url_encoded_public_url" />
</object>
The relevant response headers from our server -
Server: Microsoft-IIS/6.0
Connection: close
Content-Disposition: attachment; filename="video.flv"
P3P: CP="NOI DSP COR CURa PSDa OUR NOR NAV STA"
Accept-Ranges: bytes
Content-Length: 1001503
Expires: -1
Last-Modified: Mon, 12 Sep 2011 08:29:01 GMT
ETag: "-1245634458"
Cache-Control: private
Content-Type: application/octet-stream
Probably we are setting some of the response headers with incorrect values.
The video plays alright within our system, but not in an independent page like a blog. Any ideas what might be going wrong?
p.s. I have checked many similar questions posted here but could not get required information.
The problem wasn't with cross domain calls. The only thing I had to do was set file-type for the flash player we are using. Our public links do not have an extension. So the flash player wasn't recognizing the file type unless the file-type was specified explicitly.
精彩评论