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 video info view #1014

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Add video info view #1014

wants to merge 4 commits into from

Conversation

ToukL
Copy link
Contributor

@ToukL ToukL commented Dec 16, 2024

As stated in Footprint / laser point detection for videos #70, we would like to add a new info view for videos, as for images, with metadata and, later, computed laser points info.

Copy link
Member

@mzur mzur left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, almost perfect!

While reviewing your code I found #1016 so if you feel like it, you could fix that here, too (but you don't have to 😉).

@@ -335,7 +340,7 @@
]);

// Legacy support.
$router->redirect('videos/{id}', '/videos/{id}/annotations');
$router->redirect('video-annotate/{id}', '/videos/{id}/annotations');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This redirect doesn't make sense any more. I can be removed.

Comment on lines +25 to +48
@if ($video->taken_at)
<tr>
<th>Created</th>
@if (is_array($video->taken_at))
@foreach ($video->taken_at as $value)
<td>{{ $value }}</td>
@endforeach
@else
<td>{{ $video->taken_at }}</td>
@endif
</tr>
@endif
@foreach ($metadata as $key => $field)
<tr>
<th>{{ $metadataMap[$key] }}</th>
@if (is_array($field))
@foreach ($field as $value)
<td>{{ $value }}</td>
@endforeach
@else
<td>{{ $value }}</td>
@endif
</tr>
@endforeach
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Video metadata may be an array, too. This will produce an "array to string conversion" error here. How could we show these values here in a meaningful way? Maybe show the min/max values of each field only?

<div class="panel-heading">
<h3 class="panel-title">Video information</h3>
</div>
<div class="panel-body table-responsive">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to wrap this into a .panel-body, this will only add an unnecessary padding around the table (see images/index/meta.blade.php).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants