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

Implement captions/subtitles

This commit is contained in:
Chocobozzz 2018-07-12 19:02:00 +02:00
parent d4557fd3ec
commit 40e87e9ecc
83 changed files with 1867 additions and 298 deletions

View file

@ -81,7 +81,7 @@ function objectToFormData (obj: any, form?: FormData, namespace?: string) {
}
if (obj[key] !== null && typeof obj[ key ] === 'object' && !(obj[ key ] instanceof File)) {
objectToFormData(obj[ key ], fd, key)
objectToFormData(obj[ key ], fd, formKey)
} else {
fd.append(formKey, obj[ key ])
}
@ -96,6 +96,11 @@ function lineFeedToHtml (obj: object, keyToNormalize: string) {
})
}
function removeElementFromArray <T> (arr: T[], elem: T) {
const index = arr.indexOf(elem)
if (index !== -1) arr.splice(index, 1)
}
export {
objectToUrlEncoded,
getParameterByName,
@ -104,5 +109,6 @@ export {
dateToHuman,
immutableAssign,
objectToFormData,
lineFeedToHtml
lineFeedToHtml,
removeElementFromArray
}