add util to fetch video thumb / video
This commit is contained in:
parent
53de0e1916
commit
d369c16540
|
@ -1,3 +1,5 @@
|
||||||
export default {
|
export default {
|
||||||
|
baseUrl: 'https://858.ma',
|
||||||
|
videoBase: 'https://video22.858.ma',
|
||||||
apiUrl: 'https://858.ma/api'
|
apiUrl: 'https://858.ma/api'
|
||||||
};
|
};
|
9
src/utils/video.js
Normal file
9
src/utils/video.js
Normal 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`;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user