disable hls profile
This commit is contained in:
@@ -230,6 +230,9 @@ FEATURES = {
|
||||
|
||||
# Whether or not the dynamic EnrollmentTrackUserPartition should be registered.
|
||||
'ENABLE_ENROLLMENT_TRACK_USER_PARTITION': False,
|
||||
|
||||
# Fetch `hls` profile from edx-val or not
|
||||
'ENABLE_HLS_VIDEO_PROFILE': False,
|
||||
}
|
||||
|
||||
ENABLE_JASMINE = False
|
||||
|
||||
@@ -217,7 +217,10 @@ class VideoModule(VideoFields, VideoTranscriptsMixin, VideoStudentViewHandlers,
|
||||
# stream.
|
||||
if self.edx_video_id and edxval_api:
|
||||
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
|
||||
val_video_urls = edxval_api.get_urls_for_profiles(self.edx_video_id.strip(), val_profiles)
|
||||
|
||||
@@ -855,6 +855,7 @@ class TestGetHtmlMethod(BaseTestXmodule):
|
||||
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')
|
||||
def test_get_html_hls(self, get_urls_for_profiles):
|
||||
"""
|
||||
@@ -881,6 +882,7 @@ class TestGetHtmlMethod(BaseTestXmodule):
|
||||
'"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):
|
||||
"""
|
||||
Verify that `download_video_link` is set to None for HLS videos if no video id
|
||||
|
||||
Reference in New Issue
Block a user