Skip to content

Commit 1491c52

Browse files
committed
feat(ffmpegd): add video preview for ffmpegd completed jobs.
1 parent db72812 commit 1491c52

File tree

4 files changed

+24
-18
lines changed

4 files changed

+24
-18
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ffmpeg-commander",
3-
"version": "0.6.0",
3+
"version": "0.7.0",
44
"scripts": {
55
"serve": "vue-cli-service serve",
66
"build": "vue-cli-service build",

src/components/JsonViewer.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export default {
3131
pre {
3232
background: #343a40;
3333
color: #fff;
34-
color: #fff;
3534
display: block;
3635
font-family: "Source Code Pro", monospace;
3736
margin: 0;

src/components/Queue.vue

Lines changed: 22 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -56,19 +56,28 @@
5656

5757
<b-row class="mb-2">
5858
<b-col sm="2" class="text-sm-right"><b>Output:</b></b-col>
59-
<b-col>{{ row.item.output }}</b-col>
59+
<b-col>
60+
<a :href="videoUrl(row.item.output)" target="_blank">{{ row.item.output }}</a>
61+
</b-col>
6062
</b-row>
6163

6264
<b-row class="mb-2">
63-
<b-col sm="2" class="text-sm-right"><b>Encode Options:</b></b-col>
65+
<b-col sm="2" class="text-sm-right"><b>Payload:</b></b-col>
6466
<b-col>
65-
<div class="code">
66-
<b-form-textarea
67-
rows="3"
68-
max-rows="6"
69-
:value="JSON.stringify(row.item.payload)"
70-
></b-form-textarea>
71-
</div>
67+
<b-form-textarea
68+
class="code"
69+
rows="6"
70+
size="sm"
71+
readonly
72+
:value="JSON.stringify(row.item.payload, null, 2)"
73+
></b-form-textarea>
74+
</b-col>
75+
</b-row>
76+
77+
<b-row class="mb-2" v-if="row.item.status === 'completed'">
78+
<b-col sm="2" class="text-sm-right"><b>Preview:</b></b-col>
79+
<b-col>
80+
<video :src="videoUrl(row.item.output)" width="70%" controls muted />
7281
</b-col>
7382
</b-row>
7483

@@ -225,17 +234,15 @@ export default {
225234
storage.toggleDetails('queue', id, !enabled);
226235
this.getQueue();
227236
},
237+
videoUrl(output) {
238+
return `http://127.0.0.1:8080/${output}`;
239+
},
228240
},
229241
};
230242
</script>
231243

232244
<style>
233-
.code {
234-
background-color: #f4f4f4;
235-
border: 1px solid #aaa;
236-
color: #000;
245+
textarea.code {
237246
font-family: monospace;
238-
margin-top: 10px;
239-
padding: 5px;
240247
}
241248
</style>

0 commit comments

Comments
 (0)