Skip to content

Commit d28befd

Browse files
author
SuslikV
authored
Add thumbnail to the audio only clip (#3249)
If image is not present in audio file the thumbnail is still needed, otherwise it will be rendered as black rectangle in the Timeline.
1 parent 8201f31 commit d28befd

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/timeline/js/controllers.js

+4
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,10 @@ App.controller('TimelineCtrl',function($scope) {
754754

755755
// Format the thumbnail path: http://127.0.0.1:8081/thumbnails/FILE-ID/FRAME-NUMBER/
756756
$scope.GetThumbPath = function(clip) {
757+
var has_video = clip["reader"]["has_video"];
758+
var has_audio = clip["reader"]["has_audio"];
759+
if (!has_video && has_audio)
760+
return "../images/AudioThumbnail.png";
757761
var file_fps = clip["reader"]["fps"]["num"] / clip["reader"]["fps"]["den"];
758762
return $scope.ThumbServer + clip.file_id + "/" + ((file_fps * clip.start) + 1) + "/";
759763
};

0 commit comments

Comments
 (0)