Reputation: 33
Usually the videos I uploaded in my website were played by browsers,but now I changed the hosting company and I can't even embed my videos because the browser automatically gets the download window.
Could someone help on this,can I disable downloading and force playing video by .htaccess!?
The format of videos are : .mp4
Upvotes: 2
Views: 520
Reputation: 31110
The sever doesn't decide if the video should be downloaded or played, the client (browser) does. But you can help the browser make that decision by setting the mime type of the video.
AddType video/mp4 .mp4
in the htaccess should do it. You can red more here.
https://docs.joyent.com/guides/apache-guide/configuring-mime-types-in-htaccess
Upvotes: 1