Commit cebc0c47 by polesye

BLD-824: Download Video link missing from video player.

parent b1fa5ec5
......@@ -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'
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment