add util to fetch video thumb / video

This commit is contained in:
Sanjay Bhangar 2018-12-06 17:08:12 +02:00
parent 53de0e1916
commit d369c16540
2 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,5 @@
export default {
apiUrl: 'https://858.ma/api'
baseUrl: 'https://858.ma',
videoBase: 'https://video22.858.ma',
apiUrl: 'https://858.ma/api'
};

9
src/utils/video.js Normal file
View File

@ -0,0 +1,9 @@
import config from '../config';
export function getThumbnail(id, size='256') {
return `${config.baseUrl}/${id}/icon${size}.jpg`
}
export function getVideo(id, size='480') {
return `${config.videoBase}/${id}/${size}.mp4`;
}