This XBlock allows to include Brightcove videos within an edX course.
Note: Ooyala has been shutdown since April 2020
so the XBlock
has been renamed to Brightcove and only supports Brightcove videos now.
It supports:
- Brightcove Video, the component to visualize the video.
- 3Play Transcript, which allows your users to view the 3Play Transcript associated with the video. That requires you to have the 3Play integration setup.
Install the requirements into the python virtual environment of your
edx-platform
installation by running the following command from the
root folder:
pip install -r requirements.txt
This will install requirements and the Brightcove XBlock itself.
Add following settings in XBLOCK_SETTINGS
in lms.env.json
and cms.env.json
:
"OoyalaPlayerBlock": {
"BCOVE_ACCOUNT_ID": "YOUR_BRIGHTCOVE_ACCOUNT_ID"
"BCOVE_POLICY": "BCOVE_POLICY_KEY [Optional]",
"3PLAY_API_KEY": "3Play_API_Key [Optional]"
},
...
Set following in lms.env.json
to control after what percentage of
video watched the module should be marked as completed.
It should be a value between 0.0
and 1.0
. By default it is set to 1.0
i.e. 100%.
COMPLETION_VIDEO_COMPLETE_PERCENTAGE
You can enable the Brightcove XBlock in Studio through the advanced settings:
- From the main page of a specific course, click on Settings, Advanced Settings in the top menu.
- Locate the advanced_modules policy key, and add
"ooyala-player"
to the policy value list. - Click on the Save changes button.
Once enabled, you can find Brightcove Player component under the Advanced tab in the Studio. When you add it to a course in the studio, the block is set up with the default content.
The following settings can be set in studio edit:
- Content Id: Brightcove content identifier.
- Enable Autoplay: Set to True if you want the video to automatically play.
- Fire Progress Event on Student View: Set to True if you would like to trigger progress event when the user views this xBlock. By default progress event is triggered when COMPLETION_VIDEO_COMPLETE_PERCENTAGE is reached.
Not available yet.
Not available yet.
- In a virtualenv, run
$ pip install -r requirements.txt
$ pip install -r tests/requirements.txt
$ pushd $VIRTUAL_ENV/src/xblock-sdk/; make install; popd
$ pushd $VIRTUAL_ENV/src/xblock-mentoring/; pip install -r requirements.txt; popd
- To run the tests, from the xblock-ooyala repository root:
$ python run_tests.py --with-cover --cover-package=ooyala_player
This repo offers multiple make targets to automate the translation tasks.
First, install requirements-dev.txt
:
pip install -r requirements-dev.txt
Each make target will be explained below:
extract_translations
. Usei18n_tool
extract to create.po
files based on all the tagged strings in the python and javascript code.compile_translations
. Usei18n_tool
generate to create.mo
compiled files.detect_changed_source_translations
. Usei18n_tool
changed to identify any updated translations.validate_translations
. Compile translations and check the source translations haven't changed.
If you want to add a new language:
- Add language to
ooyala_player/translations/config.yaml
- Make sure all tagged strings have been extracted:
make extract_translations
- Clone
en
directory toooyala_player/translations/<lang_code>/
for example:ooyala_player/translations/fa_IR/
- Make necessary changes to translation files headers. Make sure you have proper
Language
andPlural-Forms
lines. - When you finished your modification process, re-compile the translation messages.
make compile_translations
The Brightcove XBlock is available under the GNU Affero General Public License (AGPLv3).