.htaccess - Changing video content type (mime type) in CDN in drupal 7 -


I am using the media module to save media in the cdn. To play the video, we are using jwplayer in Drupal 7. JWAPE throws an error in IE, if the video is content type [mime type] * not video / MP3 *. I changed existing cDN video mime type from app / octet-stream to video / mp34 .

Now whatever the MP4 videos are being uploaded / saved in CPN should only be video / MP3 mime type, but when I upload the MP4 video in the media module I am saved in the CDN mime type application / octet-stream, how do I change video / mp3 4 from the uploaded mime type [content type] I am

  cdn module code function cdntransfer_saint ($ source, $ destination) {$ S3 = _CDN_transfer_load (); $ Up_bucket = "cdn.example.com"; $ UploadOk = Null; $ End = date ('D, DMYH: I: SO', stratomet ('+ 10 years')); $ Header = array ('content-type' = & gt; 'video / mp3', 'expire' => $ has expired); If ($ Destination) {$ up_state = $ s3- & gt; PutObject ($ up_bucket, $ destination, $ source, 'true', $ headers); If ($ s3-> Object Axis ($ up_bucket, $ Destination)) {$ Upload Oy = 1; } Else {$ uploadOk = "Error: The file has not been uploaded, please try properly."; }} $ Upload Retraction; }  

Even setting the above header does not work !!!

We are using drupal with our custom module.

How do I change mime type [content type] to ? In video / MP4 media module, Drupal 7, when MP4 videos are being uploaded.

A MIME-TYPE is a server-side setting. You can add MP4 MIME-TYPE to your hosting provider for you.

Or, you can add an .htaccess file to that directory, where you upload.

A sample .htaccess file that adds MP4 MIME-TYPE:

  & lt; IfModule mod_rewrite.c & gt; AddType Video / MP4 MP4 & lt; / IfModule & gt;  

If you are not able to add MIME TYPE properly, then a task around you that could force the JW player to run as a flash, which MIMT-type is less strict about adding this line to your player's embed code:

  primary: 'flash',  

let me know this That it helps!


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -