File tree 2 files changed +7
-17
lines changed
2 files changed +7
-17
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,10 @@ onMounted(() => {
62
62
<span text-right md:text-left >{{ count }}</span >
63
63
<span text-neutral-500 >FPS</span >
64
64
<span text-right md:text-left >{{ framePerSecond.toFixed(2) }}</span >
65
+ <span text-neutral-500 >Filename</span >
66
+ <span text-right md:text-left >{{ props.filename }}</span >
67
+ <span text-neutral-500 >Content Type</span >
68
+ <span text-right md:text-left >{{ props.contentType }}</span >
65
69
</div >
66
70
</Collapsable >
67
71
<div
Original file line number Diff line number Diff line change @@ -221,23 +221,9 @@ function pluse(index: number) {
221
221
el .style .filter = ' none'
222
222
}
223
223
224
- /**
225
- * Proposed ideal method to convert data to a data URL
226
- *
227
- * @param data - The data to convert
228
- * @param type - The content type of the data
229
- */
230
- function toDataURL(data : Uint8Array | string | any , type : string ): string {
231
- if (type .startsWith (' text/' )) {
232
- return URL .createObjectURL (new Blob ([new TextEncoder ().encode (data )], { type: ' text/plain' }))
233
- }
234
- else if (type === ' application/json' ) {
235
- const json = JSON .stringify (data )
236
- return URL .createObjectURL (new Blob ([new TextEncoder ().encode (json )], { type: ' application/json' }))
237
- }
238
- else {
239
- return URL .createObjectURL (new Blob ([data ], { type: ' application/octet-stream' }))
240
- }
224
+ function toDataURL(data : Uint8Array , type : string ): string {
225
+ type || = ' application/octet-stream'
226
+ return URL .createObjectURL (new Blob ([data ], { type }))
241
227
}
242
228
243
229
let decoderInitPromise: Promise <any > | undefined
You can’t perform that action at this time.
0 commit comments