diff --git a/cms/envs/aws.py b/cms/envs/aws.py index 37cba0f6e5..cd8afef332 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -312,3 +312,7 @@ VIDEO_UPLOAD_PIPELINE = ENV_TOKENS.get('VIDEO_UPLOAD_PIPELINE', VIDEO_UPLOAD_PIP #date format the api will be formatting the datetime values API_DATE_FORMAT = '%Y-%m-%d' API_DATE_FORMAT = ENV_TOKENS.get('API_DATE_FORMAT', API_DATE_FORMAT) + +# Video Caching. Pairing country codes with CDN URLs. +# Example: {'CN': 'http://api.xuetangx.com/edx/video?s3_url='} +VIDEO_CDN_URL = ENV_TOKENS.get('VIDEO_CDN_URL', {}) diff --git a/cms/envs/test.py b/cms/envs/test.py index 037201ec10..7b4be67f2f 100644 --- a/cms/envs/test.py +++ b/cms/envs/test.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- """ This config file runs the simplest dev environment using sqlite, and db-based sessions. Assumes structure: @@ -249,3 +250,7 @@ FEATURES['MILESTONES_APP'] = True # ENTRANCE EXAMS FEATURES['ENTRANCE_EXAMS'] = True ENTRANCE_EXAM_MIN_SCORE_PCT = 50 + +VIDEO_CDN_URL = { + 'CN': 'http://api.xuetangx.com/edx/video?s3_url=' +} diff --git a/common/lib/xmodule/xmodule/css/video/display.scss b/common/lib/xmodule/xmodule/css/video/display.scss index a2a8863384..8bbfdd1b25 100644 --- a/common/lib/xmodule/xmodule/css/video/display.scss +++ b/common/lib/xmodule/xmodule/css/video/display.scss @@ -72,6 +72,31 @@ div.video { border-radius: 3px; } } + + .branding { + display: inline-block; + float: right; + margin: 15px 0 0 10px; + vertical-align: top; + + .host-tag { + @include margin-right($baseline/2); + position: absolute; + left: -9999em; + display: inline-block; + vertical-align: middle; + font-size: 70%; + color: #777; + } + + .brand-logo { + display: inline-block; + max-width: 100%; + max-height: ($baseline*2); + padding: ($baseline/4) 0; + vertical-align: middle; + } + } } article.video-wrapper { @@ -741,7 +766,7 @@ div.video { bottom: 0; left: 0; position: absolute; - width: 100%; + width: 100%; } } diff --git a/common/lib/xmodule/xmodule/video_module/video_module.py b/common/lib/xmodule/xmodule/video_module/video_module.py index b7f7e10fe5..2a374ab2f9 100644 --- a/common/lib/xmodule/xmodule/video_module/video_module.py +++ b/common/lib/xmodule/xmodule/video_module/video_module.py @@ -2,14 +2,12 @@ # pylint: disable=abstract-method """Video is ungraded Xmodule for support video content. It's new improved video module, which support additional feature: - - Can play non-YouTube video sources via in-browser HTML5 video player. - YouTube defaults to HTML5 mode from the start. - Speed changes in both YouTube and non-YouTube videos happen via in-browser HTML5 video method (when in HTML5 mode). - Navigational subtitles can be disabled altogether via an attribute in XML. - Examples of html5 videos for manual testing: https://s3.amazonaws.com/edx-course-videos/edx-intro/edX-FA12-cware-1_100.mp4 https://s3.amazonaws.com/edx-course-videos/edx-intro/edX-FA12-cware-1_100.webm @@ -73,6 +71,11 @@ try: except ImportError: edxval_api = None +try: + from branding.models import BrandingInfoConfig +except ImportError: + BrandingInfoConfig = None + log = logging.getLogger(__name__) _ = lambda text: text @@ -80,7 +83,6 @@ _ = lambda text: text class VideoModule(VideoFields, VideoTranscriptsMixin, VideoStudentViewHandlers, XModule): """ XML source example: -