Protected files

How to protect my media files from direct download?

Hi Roman,

Once media files loaded in browser, user can save it any way. Can you give some more details in which way you want to protect files?

Hi Ritesh, Sorry for the delay in replying.

First of all I would like to hide full path to file in html. Second prohibit access to file from another sites or direct access to video without my site. Video / audio should only streaming.

Hi Roman,

There is a filter available in rtMedia rtmedia_single_content_filter , by using this filter you can change src of media. Things you had asked for are the out of scope. You can write your custom code for the security and use the filter to hide full path.

Hi Ritesh, I can't find any documentation and examples how to use rtmedia_single_content_filter. Could you please show me something?

add_filter( 'rtmedia_single_content_filter', 'modify_rtmedia_image_url' , 9999, 2 );  

function modify_rtmedia_image_url( $html, $rtmedia_media ){  
     // your code here  
     // $html is the html markup which will be shown and $rtmedia_media is the media object of current media. By using $rtmedia_media you can generate new markup.  
     return $html;  
}