BLD-824: Download Video link missing from video player.
This commit is contained in:
@@ -272,7 +272,7 @@ class VideoDescriptorImportTestCase(unittest.TestCase):
|
||||
'end_time': datetime.timedelta(seconds=0.0),
|
||||
'track': '',
|
||||
'download_track': False,
|
||||
'download_video': False,
|
||||
'download_video': True,
|
||||
'html5_sources': ['http://www.example.com/source.mp4'],
|
||||
'data': ''
|
||||
})
|
||||
|
||||
@@ -563,6 +563,10 @@ class VideoDescriptor(VideoFields, TabsEditingDescriptor, EmptyDataRawDescriptor
|
||||
value = deserialize_field(cls.fields[attr], value)
|
||||
field_data[attr] = value
|
||||
|
||||
# Add `source` for backwards compatibility if xml doesn't have `download_video`.
|
||||
if 'download_video' not in field_data and sources:
|
||||
field_data['source'] = field_data['html5_sources'][0]
|
||||
|
||||
return field_data
|
||||
|
||||
|
||||
|
||||
@@ -198,6 +198,7 @@ class TestGetHtmlMethod(BaseTestXmodule):
|
||||
'end': 3610.0,
|
||||
'id': None,
|
||||
'sources': {
|
||||
'main': u'example.mp4',
|
||||
u'mp4': u'example.mp4',
|
||||
u'webm': u'example.webm'
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user