Skip to content

Commit

Permalink
✨ video caching progress status
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidZhang73 committed Mar 1, 2022
1 parent 36980e2 commit e640469
Showing 1 changed file with 19 additions and 6 deletions.
25 changes: 19 additions & 6 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,25 @@
ANU CVML Video Annotation Tool
</router-link>
</q-toolbar-title>
<div
class="q-pr-sm"
<q-circular-progress
v-if="annotationStore.hasVideo && annotationStore.isCaching"
class="q-mx-sm"
show-value
font-size="10px"
:value="progress"
size="30px"
:thickness="0.2"
color="primary"
track-color="grey-3"
>
<q-spinner-ios size="sm">
</q-spinner-ios>
{{ progress }}%
<q-tooltip
anchor="center left"
self="center right"
>
Caching video frames.

</q-tooltip>
</div>
</q-circular-progress>
<q-btn
:icon="$q.dark.isActive ? 'dark_mode' : 'light_mode'"
flat
Expand Down Expand Up @@ -124,6 +129,14 @@ const useV2 = computed(() => {
}
})
const progress = computed(() => {
if (!isNaN(annotationStore.video.frames && annotationStore.cachedFrameList.length)) {
return Math.round(annotationStore.cachedFrameList.filter(frame => frame).length / annotationStore.video.frames * 100)
} else {
return 0
}
})
// get parameters from url
const URLParameter = {}
for (const pair of window.location.search.replace('?', '').split('&')) {
Expand Down

0 comments on commit e640469

Please sign in to comment.