fix video from external storage
This commit is contained in:
parent
9e20bb65bd
commit
564b064f50
@ -148,6 +148,7 @@ class PlayerController(ObController):
|
||||
slide['position'] = position
|
||||
slide['type'] = ContentType.guess_content_type_file(str(file.resolve())).value
|
||||
slide['name'] = file.stem
|
||||
slide['delegate_duration'] = 1 if slide['type'] == ContentType.VIDEO.value else 0
|
||||
slide['location'] = "{}/{}".format(
|
||||
self._model_store.content().resolve_content_location(content),
|
||||
file.name
|
||||
|
||||
@ -362,7 +362,8 @@
|
||||
};
|
||||
|
||||
const loadVideo = function(element, callbackReady, item) {
|
||||
element.innerHTML = `<video ${previewMode ? 'controls' : ''}><source src=/${item.location} type="video/mp4" /></video>`;
|
||||
const location = item.location.indexOf('http') === 0 ? item.location : `/${item.location}`;
|
||||
element.innerHTML = `<video ${previewMode ? 'controls' : ''}><source src=${location} type="video/mp4" /></video>`;
|
||||
const video = element.querySelector('video');
|
||||
callbackReady(function() {});
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user