开发者

MP4 is downloading instead of playing

开发者 https://www.devze.com 2023-04-04 19:48 出处:网络
MP4 files a开发者_如何学运维re sometimes downloaded, and other times they play in the browser.

MP4 files a开发者_如何学运维re sometimes downloaded, and other times they play in the browser.

What is the difference between these two links?

1) If you open this URL in Chrome, the video will download:

http://video.video-mall.com/video_mall/400241188377_video.mp4

2) If you open this URL on Chrome, the video will play in the browser:

http://www.simplethoughtproductions.com/wp-content/uploads/SimpleShorts/Morning_Mail/morning_mail.mp4

Why is that?


First link has Content-Type: application/octet-stream header, while the second one Content-Type: video/mp4.


With Serg's answer , I would also like to add about Content-Disposition header . If you set the Content-Disposition as inline , then your video/content will play within the browser and if you set Content-Disposition as attachment , then your browser will download it .

More info on this can be found here .

0

精彩评论

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

关注公众号