-
Notifications
You must be signed in to change notification settings - Fork 1
Configure
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:
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
If you're behind a proxy, you'll also need to tell Open Media Player itself. To do this:
-
Navigate to the file
application/config/embed_config.php
within your Player installation. -
Search for
http_proxy
. -
Edit the two lines, for example, (see this example)
<?php $config[ 'http_proxy' ] = 'wwwcache.example.org:80'; $config[ 'http_no_proxy' ] = '*.example.org;localhost';
-
Save the file, and reload the page in your browser.
It's straightforward to add support for YouTube - all you need is a Google account:
-
Ensure that there is a file named
.env
in root of your Player installation. -
Ensure that the
.env
file contains a line like:NF_COMPOSER_SUGGEST = "providers"
or
NF_COMPOSER_SUGGEST = "(providers|basic auth)"
-
If you had to modify
.env
in the previous step, then update your installation:composer update
-
Visit the Google Developers Console in your browser.
-
Create a 'project'.
-
Under 'APIs & auth' – 'APIs', ensure that the 'YouTube Data API v3' is enabled.
-
Under 'APIs & auth' – 'Credentials', add a server API key for 'Public API access'. Note the key down for later use.
-
Navigate to the file
application/config/embed_config.php
in your Player installation. -
Search in the file for
youtube_api_key
. -
Enter the server API key you noted previously, for example,
<?php
$config[ 'youtube_api_key' ]= 'AbC....123';
- Save the file and visit the Player in your browser, for example,
http://localhost/player/embed/-/youtube.com/ashLaclKCik
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:
-
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)"
-
Run composer:
composer update --no-dev
-
Check the version in your browser, for example,
http://localhost/open-media-player/about#mejs-version
Open Media Player – developed by the Institute of Educational Technology at The Open University and others.