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:
parent
d4557fd3ec
commit
40e87e9ecc
83 changed files with 1867 additions and 298 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue