Skip to content

Commit

Permalink
Release v0.6.0
Browse files Browse the repository at this point in the history
Release v0.6.0
  • Loading branch information
z4y4ts authored Mar 23, 2017
2 parents 116d21e + cd00106 commit 5cae275
Show file tree
Hide file tree
Showing 23 changed files with 674 additions and 217 deletions.
1 change: 0 additions & 1 deletion .coveralls.yml

This file was deleted.

6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@ python:
addons:
apt:
packages:
- ruby1.9.3
# Install binary package for lxml to speed up build
- python-lxml

cache:
pip: true
directories:
- node_modules # NPM packages
- video_xblock/static/bower_components

before_install:
# Install latest stable NodeJS version. Required for eslint.
- nvm install stable
- gem install coveralls-lcov

install:
- make dev-install
Expand All @@ -35,7 +34,8 @@ script:
- make test

after_success:
- make coveralls
- make coverage

notifications:
slack:
secure: BmwAxUvohFcruAoIjqcw35q7xbWWl7BV+ABaWO4Fxc+hC20tPNzQUjMLgzYboMtaiBLncMpiFhriv2KCQs6khKtnertZPKfhG01FP/vQ2FPYF3p5K2ZvCsfkTeSKKtohmH0rMCuuRu/Wt3ACbcX/9KMc7Lrn0knaUyqTApJm24HVCkCsnL5MDkZT3AxnuCURdYaq+BTiPWJnmyZMrRNxGH/WcperVy0T4LxYnhpg6xGnyfyip0IDXOGp77pn5LcDiqhE3ISthH170arGxWyBvwLdeTSqTN8hViGqOVe9oBy5GrdNvNsqVRN6MLONSQNOnNT8P+F1m7h7sRohvFG0ZcJK6spKA7QhUGk8Wj6Kp5hdOK/cAd786HfusdJkRLUgyW1TAj/LsUE/z5VQgxoN8GtjSLtEjiHLTW1ueGxJ48LODFjzT7MptUyvSf98EK9emVbgYoGE2d0HkXDv9hqF63n8yGc7rGMNvS0I0e9nQ+9QdPjkT4KTNpJgiRDtrFK/8/P4hmgmEYXvC1//t5H+BrVMymH2v/+jvwn56zb+RbvK8yt7wHLgtENxEECQWy6QgYXUry3AfMOsaBOpVCW/ATCotM1+lkyjb0YLTmRNuTfJx2hvUc1gxJPr1WUZur4Cz87fVWUM9k4aFD9gKeR1JOTMc71leQNAmdYVDI0ypMc=
80 changes: 77 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,25 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [0.6.0] - 2017-03-23

### Added

- 3PlayMedia support. Now you can fetch transcripts for your video from 3PM.
- Open edX settings support. Now administrators can set default values
for VideoXBlock on a system-wide level.

### Changed

- Swith from Coveralls to Codecov for better code coverage.
- Interactive transcripts now align current line to the middle of video frame.

### Fixed

- Interactive transcripts automscrolling for Brightcove videos.

## [0.5.0] - 2017-03-14

### Added
Expand All @@ -17,6 +36,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Changed

- Interactive transcripts now automatically scroll to follow video.
- UI improvements in Studio:
- Split Video XBlock settings into Basic & Advanced tabs.
- Display only fields relevant to selected video.
Expand All @@ -30,22 +50,76 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Added

- Vimeo backend support
- Brightcove content protection and auto-quality
- On API authentication uploads two custom Ingest Profiles:
- Creates new API credentials with required permissions
- HLS for auto quality
- HLSe for auto qualify & encryption

- Add new UI controls after a user has authenticated against Brightcove API:
- View video tech info
- Send video re-transcode request on a Brightcove side
- View video tech info.
- Send video re-transcode request on a Brightcove side.

- Default transcripts upload
- Default transcripts upload:
- Allows to fetch transcripts from the platform and store them into XBlock.
- Supports: Brightcove, Youtube & Wistia.
- Brightcove & Wistia require API authentication before default transcripts
upload can work.

- Dev process improvements:
- Code Climate integration to track code quality.
- Coveralls.io integration to track test coverage.

### Changed

- Now TravisCI runs eslint and python unit tests on every commit.

### Fixed

- Various bugfixes and improvements.

## [0.3.0-alpha] - 2017-01-16

### Added

- SRT subtitles support.
- Transcripts downloading for students.
- TravisCI integration: pylint to begin with.

## Fixed

- Code cleanup.
- Various bugs.

## [0.2.0-alpha] - 2017-01-04

### Added

- Interactive transcripts.
- Closed captions.
- Open edX Analytic events.
- Brightcove playerID support.
- Handouts upload/download.
- Context menu.
- Offset start/end time.
- A11y: keyboard-only access, screen readers support.

## [0.1.0-alpha] - 2016-11-30

### Added

- Youtube support.
- Wistia support.
- Basic Brightcove support.
- Different playback rates support.
- Video player state load/save.
- All video players share skin similar to Open edX's video module.

[0.1.0-alpha]: https://github.com/raccoongang/xblock-video/tree/v0.1.0-alpha
[0.2.0-alpha]: https://github.com/raccoongang/xblock-video/compare/v0.1.0-alpha...v0.2.0-aplha
[0.3.0-alpha]: https://github.com/raccoongang/xblock-video/compare/v0.2.0-alpha...v0.3.0-aplha
[0.4.0]: https://github.com/raccoongang/xblock-video/compare/v0.3.0-alpha...v0.4.0
[0.5.0]: https://github.com/raccoongang/xblock-video/compare/v0.4.0...v0.5.0
[0.6.0]: https://github.com/raccoongang/xblock-video/compare/v0.5.0...v0.6.0
[Unreleased]: https://github.com/raccoongang/xblock-video/compare/v0.6.0...HEAD
9 changes: 3 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
SHELL := /bin/bash
.PHONY=all,quality,test

all: quality test
Expand All @@ -11,10 +12,7 @@ test-py:
nosetests video_xblock --with-coverage --cover-package=video_xblock

test-js:
export DISPLAY=:99.0
sh -e /etc/init.d/xvfb start
karma start video_xblock/static/video_xblock_karma.conf.js
sh -e /etc/init.d/xvfb stop

quality: quality-py quality-js

Expand All @@ -37,9 +35,8 @@ deps-test:
tools:
npm install

coveralls:
coveralls-lcov -v -n video_xblock/static/coverage/PhantomJS\ 2.1.1\ \(Linux\ 0.0.0\)/lcov.info > coverage.json
coveralls --merge=coverage.json
coverage:
bash <(curl -s https://codecov.io/bash)

package:
echo "Here be static dependencies packaging"
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# xblock-video

[![Build Status](https://travis-ci.org/raccoongang/xblock-video.svg?branch=dev)](https://travis-ci.org/raccoongang/xblock-video)
[![Coverage Status](https://coveralls.io/repos/github/raccoongang/xblock-video/badge.svg?branch=dev)](https://coveralls.io/github/raccoongang/xblock-video?branch=dev)
[![Build Status](https://img.shields.io/travis/raccoongang/xblock-video/dev.svg)](https://travis-ci.org/raccoongang/xblock-video)
[![Coverage Status](https://img.shields.io/codecov/c/github/raccoongang/xblock-video/dev.svg)](https://codecov.io/gh/raccoongang/xblock-video)
[![GitHub release](https://img.shields.io/github/release/raccoongang/xblock-video.svg)](https://github.com/raccoongang/xblock-video/releases)

XBlock to embed videos hosted on different video platform into your courses.
Expand Down Expand Up @@ -55,6 +55,19 @@ settings:

TODO

### Set default values in config files

Sample default settings in `/edx/app/edxapp/cms.env.json`:

```json
"XBLOCK_SETTINGS": {
"video_xblock": {
"3playmedia_api_key": "987654321",
"account_id": "1234567890"
}
}
```

## Development

Install dependencies and development tools:
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"video-js": "5.13.1",
"videojs-youtube": "raccoongang/videojs-youtube#playback-rate-fix",
"videojs-wistia": "raccoongang/videojs-wistia#playback-toggle-fix",
"videojs-transcript": "0.8.0",
"videojs-transcript": "raccoongang/videojs-transcript#master",
"videojs-resolution-switcher": "videojs-resolution-switcher#85f1e51",
"videojs-offset": "raccoongang/videojs-offset#master",
"videojs-contextmenu": "brightcove/videojs-contextmenu",
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from setuptools import setup


VERSION = '0.5.0'
VERSION = '0.6.0'
DESCRIPTION = 'Video XBlock to embed videos hosted on different video platforms into your courseware'


Expand Down
2 changes: 1 addition & 1 deletion test_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ PyContracts==1.7.1 # xmodule dependency
sortedcontainers==0.9.2 # xmodule dependency
Pillow==3.1.1 # xmodule dependency

coveralls==1.1
coverage==4.3.4
django==1.8.12
ddt==1.1.1
edx-lint==0.5.2
Expand Down
12 changes: 8 additions & 4 deletions video_xblock/backends/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,9 @@ def metadata_fields(self):
@property
def editable_fields(self):
"""
Tuple of all editable VideoXBlock fields to display in studio edit window.
Tuple of all editable VideoXBlock fields to be validated.
Defaults to contatenation of `basic_fields` and `advanced_fields`.
Defaults to concatenation of `basic_fields` and `advanced_fields`.
"""
return tuple(itertools.chain(self.basic_fields, self.advanced_fields))

Expand All @@ -121,7 +121,7 @@ def basic_fields(self):
Subclasses can extend or redefine list if needed. Defaults to a tuple defined by VideoXBlock.
"""
return self.xblock.basic_fields
return ('display_name', 'href')

@property
def advanced_fields(self):
Expand All @@ -130,7 +130,11 @@ def advanced_fields(self):
Subclasses can extend or redefine list if needed. Defaults to a tuple defined by VideoXBlock.
"""
return self.xblock.advanced_fields
return (
'start_time', 'end_time', 'handout', 'transcripts',
'threeplaymedia_file_id', 'threeplaymedia_apikey', 'download_transcript_allowed',
'default_transcripts', 'download_video_allowed', 'download_video_url'
)

@property
def fields_help(self):
Expand Down
12 changes: 8 additions & 4 deletions video_xblock/backends/brightcove.py
Original file line number Diff line number Diff line change
Expand Up @@ -336,10 +336,14 @@ def basic_fields(self):
"""
return super(BrightcovePlayer, self).basic_fields + ('account_id',)

advanced_fields = (
'player_id', 'start_time', 'end_time', 'handout', 'transcripts',
'download_transcript_allowed', 'token', 'default_transcripts'
)
@property
def advanced_fields(self):
"""
Tuple of VideoXBlock fields to display in Basic tab of edit modal window.
Brightcove videos require Brightcove Account id.
"""
return ('player_id',) + super(BrightcovePlayer, self).advanced_fields

fields_help = {
'token': 'You can generate a BC token following the guide of '
Expand Down
7 changes: 6 additions & 1 deletion video_xblock/backends/html5.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,12 @@ def advanced_fields(self):
Hide `download_video_url` field for Html5Player.
"""
return [field for field in super(Html5Player, self).advanced_fields if field != 'download_video_url']
return tuple(
field for field in super(Html5Player, self).advanced_fields
if field not in self.exclude_advanced_fields
)

exclude_advanced_fields = ('default_transcripts', 'download_video_url')

# Html API for requesting transcripts.
captions_api = {}
Expand Down
4 changes: 3 additions & 1 deletion video_xblock/backends/vimeo.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,15 @@

class VimeoPlayer(BaseVideoPlayer):
"""
VimeoPlayer is used for videos hosted on the Vimeo.com.
VimeoPlayer is used for videos hosted on vimeo.com.
"""

# Regex is taken from http://regexr.com/3a2p0
# Reference: https://vimeo.com/153979733
url_re = re.compile(r'https?:\/\/(.+)?(vimeo.com)\/(?P<media_id>.*)')

metadata_fields = []

# Vimeo API for requesting transcripts.
captions_api = {}

Expand Down
5 changes: 0 additions & 5 deletions video_xblock/backends/wistia.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,6 @@ class WistiaPlayer(BaseVideoPlayer):
r'https?:\/\/(.+)?(wistia.com|wi.st)\/(medias|embed)\/(?P<media_id>.*)'
)

advanced_fields = (
'start_time', 'end_time', 'handout', 'transcripts',
'download_transcript_allowed', 'token', 'default_transcripts'
)

# Token field is stored in metadata only if authentication was successful
metadata_fields = ['token', ]

Expand Down
56 changes: 56 additions & 0 deletions video_xblock/mixins.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
"""
VideoXBlock mixins moudle.
"""
from xblock.core import XBlock


@XBlock.wants('settings')
class SettingsMixin(XBlock):
"""
SettingsMixin provides access to XBlock settings service.
Provides convenient access to XBlock's settings set in edx-platform config files.
Sample default settings in /edx/app/edxapp/cms.env.json:
"XBLOCK_SETTINGS": {
"video_xblock": {
"3playmedia_api_key": "987654321",
"account_id": "1234567890"
}
}
"""

block_settings_key = 'video_xblock'

@property
def settings(self):
"""
Return xblock settings set in .json config.
Returned value depends on the context:
- `studio_view()` is being executed in CMS context and gets data from `lms.env.json`.
- `student_view` is being executed in LMS context and gets data from `lms.env.json`.
Returns:
dict: Settings from config file. E.g.
{
"threeplaymedia_apikey": "987654321",
"account_id": "1234567890"
}
"""
s_service = self.runtime.service(self, 'settings')
if s_service:
# At the moment SettingsService is not available in the context
# of Studio Edit modal. See https://github.com/edx/edx-platform/pull/14648
return s_service.get_settings_bucket(self)
else:
from django.conf import settings
return settings.XBLOCK_SETTINGS.get(self.block_settings_key, {})

def populate_default_values(self, fields_dict):
"""
Populate unset default values from settings file.
"""
for key, value in self.settings.items():
fields_dict.setdefault(key, value)
return fields_dict
Loading

0 comments on commit 5cae275

Please sign in to comment.