Encriptação de ligações Desculpe, esta página está aguardando tradução para o português The encryption option in the PRO version of PlayerJS Builder helps to hide links in the source code of the page. It does not protect against the ability to get the link manually through the browser’s developer tools, but it helps against parsers and other automatic ways to steal content. In the builder you can download a PHP script file that encrypts links with keys. The keys are specified in the encoder file and in the player settings: Keys can be changed independently at any time, it is not necessary to specify all of them. Wordpress How to add encryption to your websiteGiven the variety of CMS and options for integrating the player, there is no clear instructions. You can ask for help from the developer who integrated your player, if it possible. Or try to do it yourself. Encryption code must be added to your server script, which generates the player code. For example, you specified the x/x/x, y/y/y and z/z/z keys in the builder (these combinations of characters should not be found in the links that you encrypt and contain quotation marks). $string = "http://site.com/video.mp4"; include_once("playerjs_base64.php"); $GLOBALS['pjsBase64Keys'] = array('x/x/x','y/y/y','z/z/z','',''); $result = pjsBase64Encrypt($string);
print("var player = new Playerjs({id:'player',file:'$result'});"); Please note that in this example the file playerjs_base64.php is in the same folder as the script being edited. In the archive with the script there is a file test.php with an example of using the encoder. How to add encryption on WordpressIf you are using a plugin for Wordpress version 2.8 and higher, then edit the $GLOBALS['pjsBase64Keys'] = array('key1','key2','','',''); and save it to the folder wp-content/plugins/playerjs/admin. To disable encryption, simply delete the file from the folder or rename it. How to encrypt all variablesYou can encrypt all variables at once (works from version 8.34). You need to encrypt the object (the names of the variables must be in quotes). $string ='{"id":"player","file":"//site.com/video.mp4"}'; $result = pjsBase64Encrypt($string); var player = new Playerjs("$result"); Links are still visible in the developer toolsLinks in the video or audio tags are visible through the developer tools in the manual mode and cannot be hidden - this is debugging tool. But these tags are created dynamically and are not visible in the source code of the page, which is automatically parsed. |