1
0
mirror of https://github.com/snobu/destreamer.git synced 2026-01-17 13:32:16 +00:00
Files
destreamer-mirror/src/Thumbnail.ts
kylon 9faa0c4846 Added ffmpeg progress bar via fluent-ffmpeg and progress libs (#57)
* Add fluent-ffmpeg back and cross-platform progress bar

* Repo clean up

Move ts files to src, build and output js files to build folder

* Do not print messages when exit code is 0

this is triggered by signal events

Co-authored-by: kylon <kylonux@gmail.com>
2020-04-11 16:12:46 +03:00

15 lines
420 B
TypeScript

import terminalImage from 'terminal-image';
import axios from 'axios';
export async function drawThumbnail(posterImage: string, accessToken: string) {
let thumbnail = await axios.get(posterImage,
{
headers: {
Authorization: `Bearer ${accessToken}`
},
responseType: 'arraybuffer'
});
console.log(await terminalImage.buffer(thumbnail.data));
}