diff --git a/common/lib/xmodule/xmodule/video_module/video_module.py b/common/lib/xmodule/xmodule/video_module/video_module.py index e12afcdf7c..8bcccb6306 100644 --- a/common/lib/xmodule/xmodule/video_module/video_module.py +++ b/common/lib/xmodule/xmodule/video_module/video_module.py @@ -218,7 +218,7 @@ class VideoBlock( If only either youtube or hls is present then play whichever is present """ yt_present = bool(youtube_streams.strip()) if youtube_streams else False - hls_present = any(source for source in html5_sources if source.strip().endswith('.m3u8')) + hls_present = any(source for source in html5_sources) if yt_present and hls_present: return self.youtube_deprecated diff --git a/lms/djangoapps/courseware/tests/test_video_mongo.py b/lms/djangoapps/courseware/tests/test_video_mongo.py index f488d89c2f..8c487a1902 100644 --- a/lms/djangoapps/courseware/tests/test_video_mongo.py +++ b/lms/djangoapps/courseware/tests/test_video_mongo.py @@ -1150,7 +1150,7 @@ class TestGetHtmlMethod(BaseTestVideoXBlock): 'waffle_enabled': False, 'youtube': '3_yD_cEKoCk', 'hls': [], - 'result': 'false' + 'result': 'true' }, { 'course_override': WaffleFlagCourseOverrideModel.ALL_CHOICES.off,