1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-04 02:09:37 +02:00

Live streaming implementation first step

This commit is contained in:
Chocobozzz 2020-09-17 09:20:52 +02:00 committed by Chocobozzz
parent 110d463fec
commit c6c0fa6cd8
80 changed files with 2752 additions and 1303 deletions

View file

@ -175,6 +175,16 @@ function pageToStartAndCount (page: number, itemsPerPage: number) {
return { start, count: itemsPerPage }
}
function mapToJSON (map: Map<any, any>) {
const obj: any = {}
for (const [ k, v ] of map) {
obj[k] = v
}
return obj
}
function buildPath (path: string) {
if (isAbsolute(path)) return path
@ -263,6 +273,7 @@ export {
sha256,
sha1,
mapToJSON,
promisify0,
promisify1,