Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
cc330a8c
Commit
cc330a8c
authored
Apr 13, 2017
by
muhammad-ammar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disable hls profile
parent
6f2a2b44
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletions
+9
-1
cms/envs/common.py
+3
-0
common/lib/xmodule/xmodule/video_module/video_module.py
+4
-1
lms/djangoapps/courseware/tests/test_video_mongo.py
+2
-0
No files found.
cms/envs/common.py
View file @
cc330a8c
...
@@ -230,6 +230,9 @@ FEATURES = {
...
@@ -230,6 +230,9 @@ FEATURES = {
# Whether or not the dynamic EnrollmentTrackUserPartition should be registered.
# Whether or not the dynamic EnrollmentTrackUserPartition should be registered.
'ENABLE_ENROLLMENT_TRACK_USER_PARTITION'
:
False
,
'ENABLE_ENROLLMENT_TRACK_USER_PARTITION'
:
False
,
# Fetch `hls` profile from edx-val or not
'ENABLE_HLS_VIDEO_PROFILE'
:
False
,
}
}
ENABLE_JASMINE
=
False
ENABLE_JASMINE
=
False
...
...
common/lib/xmodule/xmodule/video_module/video_module.py
View file @
cc330a8c
...
@@ -217,7 +217,10 @@ class VideoModule(VideoFields, VideoTranscriptsMixin, VideoStudentViewHandlers,
...
@@ -217,7 +217,10 @@ class VideoModule(VideoFields, VideoTranscriptsMixin, VideoStudentViewHandlers,
# stream.
# stream.
if
self
.
edx_video_id
and
edxval_api
:
if
self
.
edx_video_id
and
edxval_api
:
try
:
try
:
val_profiles
=
[
"youtube"
,
"desktop_webm"
,
"desktop_mp4"
,
"hls"
]
val_profiles
=
[
"youtube"
,
"desktop_webm"
,
"desktop_mp4"
]
if
settings
.
FEATURES
.
get
(
'ENABLE_HLS_VIDEO_PROFILE'
,
False
):
val_profiles
.
append
(
'hls'
)
# strip edx_video_id to prevent ValVideoNotFoundError error if unwanted spaces are there. TNL-5769
# strip edx_video_id to prevent ValVideoNotFoundError error if unwanted spaces are there. TNL-5769
val_video_urls
=
edxval_api
.
get_urls_for_profiles
(
self
.
edx_video_id
.
strip
(),
val_profiles
)
val_video_urls
=
edxval_api
.
get_urls_for_profiles
(
self
.
edx_video_id
.
strip
(),
val_profiles
)
...
...
lms/djangoapps/courseware/tests/test_video_mongo.py
View file @
cc330a8c
...
@@ -855,6 +855,7 @@ class TestGetHtmlMethod(BaseTestXmodule):
...
@@ -855,6 +855,7 @@ class TestGetHtmlMethod(BaseTestXmodule):
self
.
item_descriptor
.
xmodule_runtime
.
render_template
(
'video.html'
,
expected_context
)
self
.
item_descriptor
.
xmodule_runtime
.
render_template
(
'video.html'
,
expected_context
)
)
)
@patch.dict
(
'django.conf.settings.FEATURES'
,
{
'ENABLE_HLS_VIDEO_PROFILE'
:
True
})
@patch
(
'xmodule.video_module.video_module.edxval_api.get_urls_for_profiles'
)
@patch
(
'xmodule.video_module.video_module.edxval_api.get_urls_for_profiles'
)
def
test_get_html_hls
(
self
,
get_urls_for_profiles
):
def
test_get_html_hls
(
self
,
get_urls_for_profiles
):
"""
"""
...
@@ -881,6 +882,7 @@ class TestGetHtmlMethod(BaseTestXmodule):
...
@@ -881,6 +882,7 @@ class TestGetHtmlMethod(BaseTestXmodule):
'"sources": ["https://webm.com/dw.webm", "https://mp4.com/dm.mp4", "https://hls.com/hls.m3u8"]'
,
context
'"sources": ["https://webm.com/dw.webm", "https://mp4.com/dm.mp4", "https://hls.com/hls.m3u8"]'
,
context
)
)
@patch.dict
(
'django.conf.settings.FEATURES'
,
{
'ENABLE_HLS_VIDEO_PROFILE'
:
True
})
def
test_get_html_hls_no_video_id
(
self
):
def
test_get_html_hls_no_video_id
(
self
):
"""
"""
Verify that `download_video_link` is set to None for HLS videos if no video id
Verify that `download_video_link` is set to None for HLS videos if no video id
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment