Code Monkey home page Code Monkey logo

wav-serve-plugin's Introduction

Our in house WordPress extension for streaming audio without exposing the links to easy download by unscrupulous third parties. NGINX config is not that easy to change unless the files are in a WooCommerce download folder which is the typical way to control access.

To use, set the permissions of your wav files to disallow read by public, you can do this with any FTP client.

You will need to use a child theme with the code in the functions.PHP file. Call the .wav files like this:

[protected_audio file="2024/01/filename.wav"]

following the directory structure established by WordPress, e.g. "year/month/filename.wav" , you don't need the earlier address, e.g. https://yourdomain.com/wp-content/uploads/ this is handled by the shortcode in the child theme.

The PHP script has group user permissions and can access the files.

Put the serve-wav.php file in a folder in your plugins directory and activate it.

This version still has extensive debugging functionality that is probably redundant. It generates an alphanumeric token on plugin install, a couple times we found that we needed to generate a new one because the generated token used a character that wasn't recognised by the "read" script.

wav-serve-plugin's People

Contributors

aether-machine avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.