Skip to content
This repository has been archived by the owner on Oct 31, 2023. It is now read-only.

Configure

Nick Freear edited this page Sep 17, 2015 · 3 revisions

A lot of aspects of Open Media Player are configurable. Here are a few configuration options to get us started.

Please feedback on what other options you'd like to know about.

A work in progress!

Key files:

Composer Proxy

In order to install Open Media Player behind a proxy, you will need add HTTP_PROXY to your system environment.

On Windows, follow these instructions to set a HTTP_PROXY environment variable. An example value for variable would be http://wwwcache.example.org:80.

On Linux and Mac OS X, edit your ~/.bashrc or ~/.bash_profile file, adding lines like:

export HTTP_PROXY=wwwcache.example.org:80
export HTTPS_PROXY=wwwcache.example.org:80

Then reload your configuration from the terminal (more Linux/Unix notes):

source ~/.bashrc

Player Proxy

If you're behind a proxy, you'll also need to tell Open Media Player itself. To do this:

  1. Navigate to the file application/config/embed_config.php within your Player installation.

  2. Search for http_proxy.

  3. Edit the two lines, for example, (see this example)

    <?php
    
    $config[ 'http_proxy' ]    = 'wwwcache.example.org:80';
    $config[ 'http_no_proxy' ] = '*.example.org;localhost';
  4. Save the file, and reload the page in your browser.

YouTube

It's straightforward to add support for YouTube - all you need is a Google account:

  1. Ensure that there is a file named .env in root of your Player installation.

  2. Ensure that the .env file contains a line like:

    NF_COMPOSER_SUGGEST = "providers"
    

    or

    NF_COMPOSER_SUGGEST = "(providers|basic auth)"
    
  3. If you had to modify .env in the previous step, then update your installation:

    composer update
    
  4. Visit the Google Developers Console in your browser.

  5. Create a 'project'.

  6. Under 'APIs & auth' – 'APIs', ensure that the 'YouTube Data API v3' is enabled.

  7. Under 'APIs & auth' – 'Credentials', add a server API key for 'Public API access'. Note the key down for later use.

  8. Navigate to the file application/config/embed_config.php in your Player installation.

  9. Search in the file for youtube_api_key.

  10. Enter the server API key you noted previously, for example,

<?php

$config[ 'youtube_api_key' ]= 'AbC....123';
  1. Save the file and visit the Player in your browser, for example,
    http://localhost/player/embed/-/youtube.com/ashLaclKCik
    

MediaElement.js versions

If the latest version of MediaElement.js is quite new, it is sometimes provided as an alternative upgrade from the previous version in use on the Player. To upgrade modify your .env file in the root of the source code on the server:

  1. Modify NF_COMPOSER_SUGGEST in .env so that it looks like:

    NF_COMPOSER_SUGGEST = "2.18.1; MEJS"
    

    or

    NF_COMPOSER_SUGGEST = "(providers|2.18.1; MEJS)"
    

    or

    NF_COMPOSER_SUGGEST = "(providers|MEJS edge)"
    
  2. Run composer:

    composer update --no-dev
    
  3. Check the version in your browser, for example,

    http://localhost/open-media-player/about#mejs-version