Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add thumbnail to the audio only clip #3249

Merged
merged 2 commits into from
Feb 29, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/timeline/js/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,10 @@ App.controller('TimelineCtrl',function($scope) {

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