@banou/media-player 0.6.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +148 -3
- package/dist/engine/index.d.ts +10 -0
- package/dist/engine/index.js +2 -0
- package/dist/engine/picture-in-picture.d.ts +27 -0
- package/dist/engine/playback.d.ts +45 -0
- package/dist/engine/source-buffer.d.ts +12 -0
- package/dist/engine/subtitles.d.ts +36 -0
- package/dist/engine/thumbnails.d.ts +22 -0
- package/dist/engine-Dmc7JSd9.js +470 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.js +1566 -0
- package/dist/react/components/chrome.d.ts +9 -0
- package/dist/react/components/control-bar.d.ts +2 -0
- package/dist/react/components/overlay.d.ts +4 -0
- package/dist/react/components/playback-slider.d.ts +2 -0
- package/dist/react/components/progress-bar.d.ts +2 -0
- package/dist/react/components/settings.d.ts +2 -0
- package/dist/react/components/sound.d.ts +7 -0
- package/{build → dist/react}/components/tooltip-display.d.ts +8 -8
- package/dist/react/components/volume-slider.d.ts +6 -0
- package/dist/react/hooks/use-drag-value.d.ts +23 -0
- package/dist/react/hooks/use-picture-in-picture.d.ts +2 -0
- package/dist/react/hooks/use-playback.d.ts +6 -0
- package/dist/react/hooks/use-thumbnails.d.ts +11 -0
- package/dist/react/player.d.ts +25 -0
- package/dist/react/source-feature.d.ts +84 -0
- package/dist/react/video-player.d.ts +43 -0
- package/dist/utils/source.d.ts +30 -0
- package/dist/utils/track-label.d.ts +19 -0
- package/dist/utils/volume-utils.d.ts +6 -0
- package/package.json +49 -37
- package/src/lib/engine/index.ts +14 -0
- package/src/lib/engine/picture-in-picture.ts +250 -0
- package/src/lib/engine/playback.ts +352 -0
- package/src/lib/engine/source-buffer.ts +61 -0
- package/src/lib/engine/subtitles.ts +210 -0
- package/src/lib/engine/thumbnails.ts +137 -0
- package/src/lib/globals.d.ts +8 -0
- package/src/lib/index.tsx +36 -0
- package/src/lib/react/components/chrome.tsx +126 -0
- package/src/{components → lib/react/components}/control-bar.tsx +74 -96
- package/src/lib/react/components/overlay.tsx +121 -0
- package/src/{components → lib/react/components}/playback-slider.tsx +30 -52
- package/src/{components → lib/react/components}/progress-bar.tsx +128 -41
- package/src/lib/react/components/settings.tsx +391 -0
- package/src/lib/react/components/sound.tsx +133 -0
- package/src/{components → lib/react/components}/tooltip-display.tsx +11 -8
- package/src/{components → lib/react/components}/volume-slider.tsx +32 -46
- package/src/lib/react/hooks/use-drag-value.ts +73 -0
- package/src/lib/react/hooks/use-picture-in-picture.ts +36 -0
- package/src/lib/react/hooks/use-playback.ts +134 -0
- package/src/lib/react/hooks/use-thumbnails.ts +77 -0
- package/src/lib/react/player.ts +20 -0
- package/src/lib/react/source-feature.ts +90 -0
- package/src/lib/react/video-player.tsx +119 -0
- package/src/lib/utils/source.ts +60 -0
- package/src/lib/utils/track-label.ts +36 -0
- package/src/lib/utils/volume-utils.ts +13 -0
- package/build/components/chrome.d.ts +0 -7
- package/build/components/control-bar.d.ts +0 -6
- package/build/components/overlay.d.ts +0 -4
- package/build/components/playback-slider.d.ts +0 -2
- package/build/components/progress-bar.d.ts +0 -1
- package/build/components/settings.d.ts +0 -2
- package/build/components/sound.d.ts +0 -4
- package/build/components/volume-slider.d.ts +0 -6
- package/build/index.d.ts +0 -26
- package/build/index.js +0 -3416
- package/build/main.d.ts +0 -1
- package/build/state-machines/data-source.d.ts +0 -27
- package/build/state-machines/index.d.ts +0 -34038
- package/build/state-machines/media-properties.d.ts +0 -45
- package/build/state-machines/media-source.d.ts +0 -34
- package/build/state-machines/media.d.ts +0 -8558
- package/build/state-machines/subtitles.d.ts +0 -56
- package/build/state-machines/thumbnails.d.ts +0 -24
- package/build/state-machines/utils.d.ts +0 -26
- package/build/utils/actor-utils.d.ts +0 -2
- package/build/utils/context.d.ts +0 -14
- package/build/utils/index.d.ts +0 -4
- package/build/utils/languages.d.ts +0 -260
- package/build/utils/mp4box.d.ts +0 -61
- package/build/utils/use-local-storage.d.ts +0 -3
- package/build/utils/use-scrub.d.ts +0 -11
- package/build/utils/volume-utils.d.ts +0 -17
- package/build/utils/window-height.d.ts +0 -2
- package/src/components/chrome.tsx +0 -95
- package/src/components/overlay.tsx +0 -91
- package/src/components/settings.tsx +0 -322
- package/src/components/sound.tsx +0 -101
- package/src/index.tsx +0 -195
- package/src/main.tsx +0 -169
- package/src/state-machines/data-source.ts +0 -84
- package/src/state-machines/index.ts +0 -5
- package/src/state-machines/media-properties.ts +0 -82
- package/src/state-machines/media-source.ts +0 -129
- package/src/state-machines/media.ts +0 -255
- package/src/state-machines/subtitles.ts +0 -285
- package/src/state-machines/thumbnails.ts +0 -123
- package/src/state-machines/utils.ts +0 -94
- package/src/utils/actor-utils.ts +0 -19
- package/src/utils/context.ts +0 -23
- package/src/utils/index.ts +0 -229
- package/src/utils/languages.ts +0 -262
- package/src/utils/mp4box.ts +0 -74
- package/src/utils/use-local-storage.ts +0 -30
- package/src/utils/use-scrub.ts +0 -40
- package/src/utils/volume-utils.ts +0 -39
- package/src/utils/window-height.ts +0 -19
- package/src/vite-env.d.ts +0 -1
- package/tsconfig.json +0 -28
- package/tsconfig.node.json +0 -9
- /package/{build → dist}/utils/colors.d.ts +0 -0
- /package/{build → dist}/utils/fonts.d.ts +0 -0
- /package/{build → dist}/utils/time.d.ts +0 -0
- /package/src/{assets → lib/assets}/picture-in-picture.svg +0 -0
- /package/src/{utils → lib/utils}/colors.ts +0 -0
- /package/src/{utils → lib/utils}/fonts.ts +0 -0
- /package/src/{utils → lib/utils}/time.ts +0 -0
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
import type { AnyActorSystem } from 'xstate/dist/declarations/src/system'
|
|
2
|
-
import type { AnyEventObject, CallbackActorLogic, CallbackActorRef, EventObject, NonReducibleUnknown } from 'xstate'
|
|
3
|
-
|
|
4
|
-
import PQueue from 'p-queue'
|
|
5
|
-
import { fromCallback } from 'xstate'
|
|
6
|
-
|
|
7
|
-
type Receiver<TEvent extends EventObject> = (listener: {
|
|
8
|
-
bivarianceHack(event: TEvent): void
|
|
9
|
-
}['bivarianceHack']) => void
|
|
10
|
-
|
|
11
|
-
export type CallbackLogicFunction<TEvent extends EventObject = AnyEventObject, TSentEvent extends EventObject = AnyEventObject, TInput = NonReducibleUnknown, TEmitted extends EventObject = EventObject> = ({ input, system, self, sendBack, receive, emit }: {
|
|
12
|
-
input: TInput
|
|
13
|
-
system: AnyActorSystem
|
|
14
|
-
self: CallbackActorRef<TEvent>
|
|
15
|
-
sendBack: (event: TSentEvent) => void
|
|
16
|
-
receive: Receiver<TEvent>
|
|
17
|
-
emit: (emitted: TEmitted) => void
|
|
18
|
-
}) => Promise<(() => void) | void>
|
|
19
|
-
|
|
20
|
-
type FromAsyncCallback = <TEvent extends EventObject, TInput = NonReducibleUnknown, TEmitted extends EventObject = EventObject>(callback: CallbackLogicFunction<TEvent, AnyEventObject, TInput, TEmitted>) => CallbackActorLogic<TEvent, TInput, TEmitted>
|
|
21
|
-
|
|
22
|
-
export const fromAsyncCallback =
|
|
23
|
-
((callback: (...args: any[]) => Promise<() => any>) =>
|
|
24
|
-
fromCallback((...args: any[]) => {
|
|
25
|
-
const callbackPromise = callback(...args)
|
|
26
|
-
return () => {
|
|
27
|
-
callbackPromise
|
|
28
|
-
.then(callbackResult => callbackResult?.())
|
|
29
|
-
}
|
|
30
|
-
})) as FromAsyncCallback
|
|
31
|
-
|
|
32
|
-
export const getTimeRanges = (sourceBuffer: SourceBuffer) =>
|
|
33
|
-
Array(sourceBuffer.buffered.length)
|
|
34
|
-
.fill(undefined)
|
|
35
|
-
.map((_, index) => ({
|
|
36
|
-
index,
|
|
37
|
-
start: sourceBuffer.buffered.start(index),
|
|
38
|
-
end: sourceBuffer.buffered.end(index)
|
|
39
|
-
}))
|
|
40
|
-
|
|
41
|
-
const setupListeners = (sourceBuffer: SourceBuffer, resolve: (value: Event) => void, reject: (reason: Event) => void) => {
|
|
42
|
-
const updateEndListener = (ev: Event) => {
|
|
43
|
-
resolve(ev)
|
|
44
|
-
unregisterListeners()
|
|
45
|
-
}
|
|
46
|
-
const abortListener = (ev: Event) => {
|
|
47
|
-
resolve(ev)
|
|
48
|
-
unregisterListeners()
|
|
49
|
-
}
|
|
50
|
-
const errorListener = (ev: Event) => {
|
|
51
|
-
console.error(ev)
|
|
52
|
-
reject(ev)
|
|
53
|
-
unregisterListeners()
|
|
54
|
-
}
|
|
55
|
-
const unregisterListeners = () => {
|
|
56
|
-
sourceBuffer.removeEventListener('updateend', updateEndListener)
|
|
57
|
-
sourceBuffer.removeEventListener('abort', abortListener)
|
|
58
|
-
sourceBuffer.removeEventListener('error', errorListener)
|
|
59
|
-
}
|
|
60
|
-
sourceBuffer.addEventListener('updateend', updateEndListener, { once: true })
|
|
61
|
-
sourceBuffer.addEventListener('abort', abortListener, { once: true })
|
|
62
|
-
sourceBuffer.addEventListener('error', errorListener, { once: true })
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
export const updateSourceBuffer = (sourceBuffer: SourceBuffer) => {
|
|
66
|
-
const queue = new PQueue({ concurrency: 1 })
|
|
67
|
-
|
|
68
|
-
const appendBuffer = (buffer: ArrayBuffer) =>
|
|
69
|
-
queue.add(() =>
|
|
70
|
-
new Promise<Event>((resolve, reject) => {
|
|
71
|
-
setupListeners(sourceBuffer, resolve, reject)
|
|
72
|
-
sourceBuffer.appendBuffer(buffer)
|
|
73
|
-
})
|
|
74
|
-
)
|
|
75
|
-
|
|
76
|
-
const unbufferRange = async (start: number, end: number) =>
|
|
77
|
-
queue.add(() =>
|
|
78
|
-
new Promise((resolve, reject) => {
|
|
79
|
-
setupListeners(sourceBuffer, resolve, reject)
|
|
80
|
-
sourceBuffer.remove(start, end)
|
|
81
|
-
})
|
|
82
|
-
)
|
|
83
|
-
|
|
84
|
-
const updateTimestampOffset = (timestampOffset: number) =>
|
|
85
|
-
queue.add(() => {
|
|
86
|
-
sourceBuffer.timestampOffset = timestampOffset
|
|
87
|
-
})
|
|
88
|
-
|
|
89
|
-
return {
|
|
90
|
-
appendBuffer,
|
|
91
|
-
unbufferRange,
|
|
92
|
-
updateTimestampOffset
|
|
93
|
-
}
|
|
94
|
-
}
|
package/src/utils/actor-utils.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Actor, AnyActorLogic } from "xstate"
|
|
2
|
-
|
|
3
|
-
export const togglePlay = (
|
|
4
|
-
mediaActor: Actor<AnyActorLogic>,
|
|
5
|
-
isPaused: boolean,
|
|
6
|
-
duration: number | undefined,
|
|
7
|
-
currentTime: number
|
|
8
|
-
) => {
|
|
9
|
-
if (!mediaActor) throw new Error('Media actor not found')
|
|
10
|
-
if (!duration) throw new Error('Duration not found')
|
|
11
|
-
if (duration === currentTime) {
|
|
12
|
-
mediaActor.send({ type: 'SET_TIME', value: 0 })
|
|
13
|
-
mediaActor.send({ type: 'PLAY' })
|
|
14
|
-
} else if (isPaused) {
|
|
15
|
-
mediaActor.send({ type: 'PLAY' })
|
|
16
|
-
} else {
|
|
17
|
-
mediaActor.send({ type: 'PAUSE' })
|
|
18
|
-
}
|
|
19
|
-
}
|
package/src/utils/context.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { createContext } from 'react'
|
|
2
|
-
|
|
3
|
-
export type DownloadedRange =
|
|
4
|
-
// | {
|
|
5
|
-
// startTimestamp: number
|
|
6
|
-
// endTimestamp: number
|
|
7
|
-
// }
|
|
8
|
-
| {
|
|
9
|
-
startByteOffset: number
|
|
10
|
-
endByteOffset: number
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
export type MediaPlayerContextType = {
|
|
14
|
-
videoElement?: HTMLVideoElement
|
|
15
|
-
title?: string
|
|
16
|
-
subtitle?: string
|
|
17
|
-
size?: number
|
|
18
|
-
downloadedRanges?: DownloadedRange[]
|
|
19
|
-
hideUI: boolean
|
|
20
|
-
update: (context: Omit<MediaPlayerContextType, 'update'>) => void
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
export const MediaPlayerContext = createContext<MediaPlayerContextType>({} as MediaPlayerContextType)
|
package/src/utils/index.ts
DELETED
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
export function debounceImmediateAndLatest<T extends (...args: any[]) => any>(
|
|
3
|
-
wait: number,
|
|
4
|
-
func: T
|
|
5
|
-
): T {
|
|
6
|
-
let timeoutId: ReturnType<typeof setTimeout> | null = null;
|
|
7
|
-
let lastArgs: any[] | null = null;
|
|
8
|
-
|
|
9
|
-
const debouncedFunction = function(...args: any[]) {
|
|
10
|
-
// @ts-expect-error
|
|
11
|
-
const context = this;
|
|
12
|
-
|
|
13
|
-
if (timeoutId === null) {
|
|
14
|
-
// Call immediately on the first call
|
|
15
|
-
func.apply(context, args);
|
|
16
|
-
} else {
|
|
17
|
-
// Store the latest arguments for the last call
|
|
18
|
-
lastArgs = args;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
clearTimeout(timeoutId as ReturnType<typeof setTimeout>);
|
|
22
|
-
|
|
23
|
-
timeoutId = setTimeout(() => {
|
|
24
|
-
if (lastArgs) {
|
|
25
|
-
func.apply(context, lastArgs);
|
|
26
|
-
lastArgs = null;
|
|
27
|
-
}
|
|
28
|
-
timeoutId = null;
|
|
29
|
-
}, wait);
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
return debouncedFunction as T;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export const queuedThrottleWithLastCall = <T2 extends any[], T extends (...args: T2) => any>(time: number, func: T) => {
|
|
36
|
-
let runningFunction: Promise<ReturnType<T>> | undefined
|
|
37
|
-
let lastCall: Promise<ReturnType<T>> | undefined
|
|
38
|
-
let lastCallArguments: T2 | undefined
|
|
39
|
-
|
|
40
|
-
const checkForLastCall = (
|
|
41
|
-
timeStart: number,
|
|
42
|
-
resolve: (value: ReturnType<T> | PromiseLike<ReturnType<T>>) => void,
|
|
43
|
-
reject: (reason?: any) => void
|
|
44
|
-
) =>
|
|
45
|
-
(result: ReturnType<T>) => {
|
|
46
|
-
const currentTime = performance.now()
|
|
47
|
-
setTimeout(() => {
|
|
48
|
-
if (!lastCallArguments) {
|
|
49
|
-
runningFunction = undefined
|
|
50
|
-
lastCall = undefined
|
|
51
|
-
return
|
|
52
|
-
}
|
|
53
|
-
const funcResult = (async () => (func(...lastCallArguments)))()
|
|
54
|
-
lastCallArguments = undefined
|
|
55
|
-
funcResult
|
|
56
|
-
.then(resolve)
|
|
57
|
-
.catch((err) => {
|
|
58
|
-
console.error(err)
|
|
59
|
-
reject(err)
|
|
60
|
-
})
|
|
61
|
-
|
|
62
|
-
let _resolve: (value: ReturnType<T> | PromiseLike<ReturnType<T>>) => void
|
|
63
|
-
let _reject: (reason?: any) => void
|
|
64
|
-
lastCall = new Promise((resolve, reject) => {
|
|
65
|
-
_resolve = resolve
|
|
66
|
-
_reject = reject
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
runningFunction =
|
|
70
|
-
funcResult
|
|
71
|
-
// @ts-ignore
|
|
72
|
-
.then(checkForLastCall(currentTime, _resolve, _reject))
|
|
73
|
-
// @ts-ignore
|
|
74
|
-
.catch(err => {
|
|
75
|
-
console.error(err)
|
|
76
|
-
return checkForLastCall(timeStart, _resolve, _reject)(err)
|
|
77
|
-
})
|
|
78
|
-
}, time - (currentTime - timeStart))
|
|
79
|
-
return result
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
return (...args: Parameters<T>) => {
|
|
83
|
-
lastCallArguments = args
|
|
84
|
-
if (!runningFunction) {
|
|
85
|
-
const timeStart = performance.now()
|
|
86
|
-
const funcResult = (async () => (func(...args)))()
|
|
87
|
-
lastCallArguments = undefined
|
|
88
|
-
let _resolve: (value: ReturnType<T> | PromiseLike<ReturnType<T>>) => void
|
|
89
|
-
let _reject: (reason?: any) => void
|
|
90
|
-
lastCall = new Promise((resolve, reject) => {
|
|
91
|
-
_resolve = resolve
|
|
92
|
-
_reject = reject
|
|
93
|
-
})
|
|
94
|
-
|
|
95
|
-
runningFunction =
|
|
96
|
-
funcResult
|
|
97
|
-
// @ts-ignore
|
|
98
|
-
.then(checkForLastCall(timeStart, _resolve, _reject))
|
|
99
|
-
// @ts-ignore
|
|
100
|
-
.catch(err => {
|
|
101
|
-
console.error(err)
|
|
102
|
-
return checkForLastCall(timeStart, _resolve, _reject)(err)
|
|
103
|
-
})
|
|
104
|
-
|
|
105
|
-
return funcResult
|
|
106
|
-
} else {
|
|
107
|
-
return lastCall
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
// todo: reimplement this into a ReadableByteStream https://web.dev/streams/ once Safari gets support
|
|
113
|
-
export const toStreamChunkSize = (SIZE: number) => (stream: ReadableStream) =>
|
|
114
|
-
new ReadableStream<Uint8Array>({
|
|
115
|
-
reader: undefined,
|
|
116
|
-
leftOverData: undefined,
|
|
117
|
-
start() {
|
|
118
|
-
this.reader = stream.getReader()
|
|
119
|
-
},
|
|
120
|
-
async pull(controller) {
|
|
121
|
-
const { leftOverData }: { leftOverData: Uint8Array | undefined } = this
|
|
122
|
-
|
|
123
|
-
const accumulate = async ({ buffer = new Uint8Array(SIZE), currentSize = 0 } = {}): Promise<{ buffer?: Uint8Array, currentSize?: number, done: boolean }> => {
|
|
124
|
-
const { value: newBuffer, done } = await this.reader!.read()
|
|
125
|
-
if (currentSize === 0 && leftOverData) {
|
|
126
|
-
buffer.set(leftOverData)
|
|
127
|
-
currentSize += leftOverData.byteLength
|
|
128
|
-
this.leftOverData = undefined
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
if (done) {
|
|
132
|
-
const finalResult = { buffer: buffer.slice(0, currentSize), currentSize, done }
|
|
133
|
-
this.reader = undefined
|
|
134
|
-
this.leftOverData = undefined
|
|
135
|
-
return finalResult
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
let newSize
|
|
139
|
-
const slicedBuffer = newBuffer.slice(0, SIZE - currentSize)
|
|
140
|
-
newSize = currentSize + slicedBuffer.byteLength
|
|
141
|
-
buffer.set(slicedBuffer, currentSize)
|
|
142
|
-
|
|
143
|
-
if (newSize === SIZE) {
|
|
144
|
-
this.leftOverData = newBuffer.slice(SIZE - currentSize)
|
|
145
|
-
return { buffer, currentSize: newSize, done: false }
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
return accumulate({ buffer, currentSize: newSize })
|
|
149
|
-
}
|
|
150
|
-
const { buffer, done } = await accumulate()
|
|
151
|
-
if (buffer?.byteLength) controller.enqueue(buffer)
|
|
152
|
-
if (done) controller.close()
|
|
153
|
-
},
|
|
154
|
-
cancel() {
|
|
155
|
-
this.reader?.cancel()
|
|
156
|
-
this.leftOverData = undefined
|
|
157
|
-
}
|
|
158
|
-
} as UnderlyingDefaultSource<Uint8Array> & {
|
|
159
|
-
reader: ReadableStreamDefaultReader<Uint8Array> | undefined
|
|
160
|
-
leftOverData: Uint8Array | undefined
|
|
161
|
-
})
|
|
162
|
-
|
|
163
|
-
export const toBufferedStream = (SIZE: number) => (stream: ReadableStream) =>
|
|
164
|
-
new ReadableStream<Uint8Array>({
|
|
165
|
-
buffers: [],
|
|
166
|
-
currentPullPromise: undefined,
|
|
167
|
-
reader: undefined,
|
|
168
|
-
leftOverData: undefined,
|
|
169
|
-
start() {
|
|
170
|
-
this.reader = stream.getReader()
|
|
171
|
-
},
|
|
172
|
-
async pull(controller) {
|
|
173
|
-
const pull = async () => {
|
|
174
|
-
if (this.buffers.length >= SIZE) return
|
|
175
|
-
this.currentPullPromise = this.reader!.read()
|
|
176
|
-
const { value: newBuffer, done } = await this.currentPullPromise
|
|
177
|
-
this.currentPullPromise = undefined
|
|
178
|
-
if (done) {
|
|
179
|
-
try {
|
|
180
|
-
for (const buffer of this.buffers) controller.enqueue(buffer)
|
|
181
|
-
controller.close()
|
|
182
|
-
} catch (err) {
|
|
183
|
-
// console.error(err)
|
|
184
|
-
}
|
|
185
|
-
return
|
|
186
|
-
}
|
|
187
|
-
this.buffers.push(newBuffer)
|
|
188
|
-
return newBuffer
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
const tryToBuffer = async (): Promise<void> => {
|
|
192
|
-
if (this.buffers.length >= SIZE) return
|
|
193
|
-
|
|
194
|
-
if (this.buffers.length === 0) {
|
|
195
|
-
const buffer = await pull()
|
|
196
|
-
if (!buffer) return
|
|
197
|
-
return tryToBuffer()
|
|
198
|
-
} else {
|
|
199
|
-
pull().then((buffer) => {
|
|
200
|
-
if (!buffer) return
|
|
201
|
-
tryToBuffer()
|
|
202
|
-
})
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
await tryToBuffer()
|
|
207
|
-
try {
|
|
208
|
-
controller.enqueue(this.buffers.shift())
|
|
209
|
-
tryToBuffer()
|
|
210
|
-
} catch(err) {
|
|
211
|
-
if (!(
|
|
212
|
-
err instanceof TypeError && (
|
|
213
|
-
err.message === 'ReadableStreamDefaultController.enqueue: Cannot enqueue into a stream that has already been requested to close.' ||
|
|
214
|
-
err.message === `Failed to execute 'enqueue' on 'ReadableStreamDefaultController': Cannot enqueue a chunk into a readable stream that is closed or has been requested to be closed`
|
|
215
|
-
)
|
|
216
|
-
)) {
|
|
217
|
-
throw err
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
},
|
|
221
|
-
cancel() {
|
|
222
|
-
this.reader!.cancel()
|
|
223
|
-
}
|
|
224
|
-
} as UnderlyingDefaultSource<Uint8Array> & {
|
|
225
|
-
reader: ReadableStreamDefaultReader<Uint8Array> | undefined
|
|
226
|
-
leftOverData: Uint8Array | undefined
|
|
227
|
-
buffers: Uint8Array[]
|
|
228
|
-
currentPullPromise: Promise<ReadableStreamReadResult<Uint8Array>> | undefined
|
|
229
|
-
})
|
package/src/utils/languages.ts
DELETED
|
@@ -1,262 +0,0 @@
|
|
|
1
|
-
type Language = {
|
|
2
|
-
tag: string
|
|
3
|
-
name: string
|
|
4
|
-
originalName: string
|
|
5
|
-
locale: string
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
export const languages: Language[] = JSON.parse(`[{"tag":"zu","name":"isiZulu","originalName":"isiZulu","locale":"zu-ZA"},{"tag":"zh","name":"Chinese","originalName":"中文","locale":"zh-CHS"},{"tag":"yo","name":"Yoruba","originalName":"Yoruba","locale":"yo-NG"},{"tag":"xh","name":"isiXhosa","originalName":"isiXhosa","locale":"xh-ZA"},{"tag":"wo","name":"Wolof","originalName":"Wolof","locale":"wo-SN"},{"tag":"vi","name":"Vietnamese","originalName":"Tiếng Việt","locale":"vi"},{"tag":"uz","name":"Uzbek","originalName":"U'zbek","locale":"uz"},{"tag":"ur","name":"Urdu","originalName":"اُردو","locale":"ur"},{"tag":"uk","name":"Ukrainian","originalName":"україньска","locale":"uk"},{"tag":"ug","name":"Uyghur","originalName":"ئۇيغۇرچە","locale":"ug-CN"},{"tag":"tzm","name":"Tamazight","originalName":"Tamazight","locale":"tzm-Latn-DZ"},{"tag":"tt","name":"Tatar","originalName":"Татар","locale":"tt"},{"tag":"tr","name":"Turkish","originalName":"Türkçe","locale":"tr"},{"tag":"tn","name":"Setswana","originalName":"Setswana","locale":"tn-ZA"},{"tag":"tk","name":"Turkmen","originalName":"türkmençe","locale":"tk-TM"},{"tag":"th","name":"Thai","originalName":"ไทย","locale":"th"},{"tag":"tg","name":"Tajik","originalName":"Тоҷикӣ","locale":"tg-Cyrl-TJ"},{"tag":"te","name":"Telugu","originalName":"తెలుగు","locale":"te"},{"tag":"ta","name":"Tamil","originalName":"தமிழ்","locale":"ta"},{"tag":"syr","name":"Syriac","originalName":"ܣܘܪܝܝܐ","locale":"syr"},{"tag":"sw","name":"Kiswahili","originalName":"Kiswahili","locale":"sw"},{"tag":"sv","name":"Swedish","originalName":"svenska","locale":"sv"},{"tag":"sr","name":"Serbian","originalName":"srpski","locale":"sr"},{"tag":"sq","name":"Albanian","originalName":"shqipe","locale":"sq"},{"tag":"sms","name":"Sami","originalName":"sääm´ǩiõll","locale":"sms-FI"},{"tag":"smn","name":"Sami","originalName":"sämikielâ","locale":"smn-FI"},{"tag":"smj","name":"Sami","originalName":"julevusámegiella","locale":"smj-NO"},{"tag":"sma","name":"Sami","originalName":"åarjelsaemiengiele","locale":"sma-NO"},{"tag":"sl","name":"Slovenian","originalName":"slovenski","locale":"sl"},{"tag":"sk","name":"Slovak","originalName":"slovenčina","locale":"sk"},{"tag":"si","name":"Sinhala","originalName":"සිංහ","locale":"si-LK"},{"tag":"se","name":"Sami","originalName":"davvisámegiella","locale":"se-FI"},{"tag":"sah","name":"Yakut","originalName":"саха","locale":"sah-RU"},{"tag":"sa","name":"Sanskrit","originalName":"संस्कृत","locale":"sa"},{"tag":"rw","name":"Kinyarwanda","originalName":"Kinyarwanda","locale":"rw-RW"},{"tag":"ru","name":"Russian","originalName":"русский","locale":"ru"},{"tag":"ro","name":"Romanian","originalName":"română","locale":"ro"},{"tag":"rm","name":"Romansh","originalName":"Rumantsch","locale":"rm-CH"},{"tag":"quz","name":"Quechua","originalName":"runasimi","locale":"quz-BO"},{"tag":"qut","name":"K'iche","originalName":"K'iche","locale":"qut-GT"},{"tag":"pt","name":"Portuguese","originalName":"Português","locale":"pt"},{"tag":"ps","name":"Pashto","originalName":"پښتو","locale":"ps-AF"},{"tag":"prs","name":"Dari","originalName":"درى","locale":"prs-AF"},{"tag":"pl","name":"Polish","originalName":"polski","locale":"pl"},{"tag":"pa","name":"Punjabi","originalName":"ਪੰਜਾਬੀ","locale":"pa"},{"tag":"or","name":"Oriya","originalName":"ଓଡ଼ିଆ","locale":"or-IN"},{"tag":"oc","name":"Occitan","originalName":"Occitan","locale":"oc-FR"},{"tag":"nso","name":"Sesotho sa Leboa","originalName":"Sesotho sa Leboa","locale":"nso-ZA"},{"tag":"no","name":"Norwegian","originalName":"norsk","locale":"no"},{"tag":"nn","name":"Norwegian, Nynorsk","originalName":"norsk, nynorsk","locale":"nn-NO"},{"tag":"nl","name":"Dutch","originalName":"Nederlands","locale":"nl"},{"tag":"ne","name":"Nepali","originalName":"नेपाली","locale":"ne-NP"},{"tag":"nb","name":"Norwegian, Bokmål","originalName":"norsk, bokmål","locale":"nb-NO"},{"tag":"mt","name":"Maltese","originalName":"Malti","locale":"mt-MT"},{"tag":"ms","name":"Malay","originalName":"Bahasa Malaysia","locale":"ms"},{"tag":"mr","name":"Marathi","originalName":"मराठी","locale":"mr"},{"tag":"moh","name":"Mohawk","originalName":"Kanien'kéha","locale":"moh-CA"},{"tag":"mn","name":"Mongolian","originalName":"Монгол хэл","locale":"mn"},{"tag":"ml","name":"Malayalam","originalName":"മലയാളം","locale":"ml-IN"},{"tag":"mk","name":"Macedonian","originalName":"македонски јазик","locale":"mk"},{"tag":"mi","name":"Maori","originalName":"Reo Māori","locale":"mi-NZ"},{"tag":"lv","name":"Latvian","originalName":"latviešu","locale":"lv"},{"tag":"lt","name":"Lithuanian","originalName":"lietuvių","locale":"lt"},{"tag":"lo","name":"Lao","originalName":"ລາວ","locale":"lo-LA"},{"tag":"lb","name":"Luxembourgish","originalName":"Lëtzebuergesch","locale":"lb-LU"},{"tag":"ky","name":"Kyrgyz","originalName":"Кыргыз","locale":"ky"},{"tag":"kok","name":"Konkani","originalName":"कोंकणी","locale":"kok"},{"tag":"ko","name":"Korean","originalName":"한국어","locale":"ko"},{"tag":"kn","name":"Kannada","originalName":"ಕನ್ನಡ","locale":"kn"},{"tag":"km","name":"Khmer","originalName":"ខ្មែរ","locale":"km-KH"},{"tag":"kl","name":"Greenlandic","originalName":"kalaallisut","locale":"kl-GL"},{"tag":"kk","name":"Kazakh","originalName":"Қазащb","locale":"kk"},{"tag":"ka","name":"Georgian","originalName":"ქართული","locale":"ka"},{"tag":"ja","name":"Japanese","originalName":"日本語","locale":"ja"},{"tag":"iu","name":"Inuktitut","originalName":"ᐃᓄᒃᑎᑐᑦ","locale":"iu-Cans-CA"},{"tag":"it","name":"Italian","originalName":"italiano","locale":"it"},{"tag":"is","name":"Icelandic","originalName":"íslenska","locale":"is"},{"tag":"ii","name":"Yi","originalName":"ꆈꌠꁱꂷ","locale":"ii-CN"},{"tag":"ig","name":"Igbo","originalName":"Igbo","locale":"ig-NG"},{"tag":"id","name":"Indonesian","originalName":"Bahasa Indonesia","locale":"id"},{"tag":"hy","name":"Armenian","originalName":"Հայերեն","locale":"hy"},{"tag":"hu","name":"Hungarian","originalName":"magyar","locale":"hu"},{"tag":"hsb","name":"Upper Sorbian","originalName":"hornjoserbšćina","locale":"hsb-DE"},{"tag":"hr","name":"Croatian","originalName":"hrvatski","locale":"hr"},{"tag":"hi","name":"Hindi","originalName":"हिंदी","locale":"hi"},{"tag":"he","name":"Hebrew","originalName":"עברית","locale":"he"},{"tag":"ha","name":"Hausa","originalName":"Hausa","locale":"ha-Latn-NG"},{"tag":"gu","name":"Gujarati","originalName":"ગુજરાતી","locale":"gu"},{"tag":"gsw","name":"Alsatian","originalName":"Elsässisch","locale":"gsw-FR"},{"tag":"gl","name":"Galician","originalName":"galego","locale":"gl"},{"tag":"gd","name":"Scottish Gaelic","originalName":"Gàidhlig","locale":"gd-GB"},{"tag":"ga","name":"Irish","originalName":"Gaeilge","locale":"ga-IE"},{"tag":"fy","name":"Frisian","originalName":"Frysk","locale":"fy-NL"},{"tag":"fr","name":"French","originalName":"français","locale":"fr"},{"tag":"fo","name":"Faroese","originalName":"føroyskt","locale":"fo"},{"tag":"fil","name":"Filipino","originalName":"Filipino","locale":"fil-PH"},{"tag":"fi","name":"Finnish","originalName":"suomi","locale":"fi"},{"tag":"fa","name":"Persian","originalName":"فارسى","locale":"fa"},{"tag":"eu","name":"Basque","originalName":"euskara","locale":"eu"},{"tag":"et","name":"Estonian","originalName":"eesti","locale":"et"},{"tag":"es","name":"Spanish","originalName":"español","locale":"es"},{"tag":"en","name":"English","originalName":"English","locale":"en"},{"tag":"el","name":"Greek","originalName":"ελληνικά","locale":"el"},{"tag":"dv","name":"Divehi","originalName":"ދިވެހިބަސް","locale":"dv"},{"tag":"dsb","name":"Lower Sorbian","originalName":"dolnoserbšćina","locale":"dsb-DE"},{"tag":"de","name":"German","originalName":"Deutsch","locale":"de"},{"tag":"da","name":"Danish","originalName":"dansk","locale":"da"},{"tag":"cy","name":"Welsh","originalName":"Cymraeg","locale":"cy-GB"},{"tag":"cs","name":"Czech","originalName":"čeština","locale":"cs"},{"tag":"co","name":"Corsican","originalName":"Corsu","locale":"co-FR"},{"tag":"ca","name":"Catalan","originalName":"català","locale":"ca"},{"tag":"bs","name":"Bosnian","originalName":"босански","locale":"bs-Cyrl-BA"},{"tag":"br","name":"Breton","originalName":"brezhoneg","locale":"br-FR"},{"tag":"bo","name":"Tibetan","originalName":"བོད་ཡིག","locale":"bo-CN"},{"tag":"bn","name":"Bengali","originalName":"বাংলা","locale":"bn-BD"},{"tag":"bg","name":"Bulgarian","originalName":"български","locale":"bg"},{"tag":"be","name":"Belarusian","originalName":"Беларускі","locale":"be"},{"tag":"ba","name":"Bashkir","originalName":"Башҡорт","locale":"ba-RU"},{"tag":"az","name":"Azeri","originalName":"Azərbaycanılı","locale":"az"},{"tag":"as","name":"Assamese","originalName":"অসমীয়া","locale":"as-IN"},{"tag":"arn","name":"Mapudungun","originalName":"Mapudungun","locale":"arn-CL"},{"tag":"ar","name":"Arabic","originalName":"العربية","locale":"ar"},{"tag":"am","name":"Amharic","originalName":"አማርኛ","locale":"am-ET"},{"tag":"af","name":"Afrikaans","originalName":"Afrikaans","locale":"af"},{"tag":"iv","name":"Invariant Language","originalName":"Invariant Language","locale":""},{"tag":"Two letter","name":"English","originalName":"Native","locale":"Culture .NET"}]`)
|
|
9
|
-
|
|
10
|
-
export const languageToTag = (lang: string) => languages.find(language => language.name === lang)?.tag
|
|
11
|
-
export const tagToLanguage = (langTag: string) => languages.find(language => language.tag === langTag)?.name
|
|
12
|
-
|
|
13
|
-
export enum LanguageTag {
|
|
14
|
-
/** isiZulu */
|
|
15
|
-
ZU = 'zu',// "isiZulu",
|
|
16
|
-
/** Chinese */
|
|
17
|
-
ZH = 'zh',// "Chinese",
|
|
18
|
-
/** Yoruba */
|
|
19
|
-
YO = 'yo',// "Yoruba",
|
|
20
|
-
/** isiXhosa */
|
|
21
|
-
XH = 'xh',// "isiXhosa",
|
|
22
|
-
/** Wolof */
|
|
23
|
-
WO = 'wo',// "Wolof",
|
|
24
|
-
/** Vietnamese */
|
|
25
|
-
VI = 'vi',// "Vietnamese",
|
|
26
|
-
/** Uzbek */
|
|
27
|
-
UZ = 'uz',// "Uzbek",
|
|
28
|
-
/** Urdu */
|
|
29
|
-
UR = 'ur',// "Urdu",
|
|
30
|
-
/** Ukrainian */
|
|
31
|
-
UK = 'uk',// "Ukrainian",
|
|
32
|
-
/** Uyghur */
|
|
33
|
-
UG = 'ug',// "Uyghur",
|
|
34
|
-
/** Tamazight */
|
|
35
|
-
TZM = 'tzm',// "Tamazight",
|
|
36
|
-
/** Tatar */
|
|
37
|
-
TT = 'tt',// "Tatar",
|
|
38
|
-
/** Turkish */
|
|
39
|
-
TR = 'tr',// "Turkish",
|
|
40
|
-
/** Setswana */
|
|
41
|
-
TN = 'tn',// "Setswana",
|
|
42
|
-
/** Turkmen */
|
|
43
|
-
TK = 'tk',// "Turkmen",
|
|
44
|
-
/** Thai */
|
|
45
|
-
TH = 'th',// "Thai",
|
|
46
|
-
/** Tajik */
|
|
47
|
-
TG = 'tg',// "Tajik",
|
|
48
|
-
/** Telugu */
|
|
49
|
-
TE = 'te',// "Telugu",
|
|
50
|
-
/** Tamil */
|
|
51
|
-
TA = 'ta',// "Tamil",
|
|
52
|
-
/** Syriac */
|
|
53
|
-
SYR = 'syr',// "Syriac",
|
|
54
|
-
/** Kiswahili */
|
|
55
|
-
SW = 'sw',// "Kiswahili",
|
|
56
|
-
/** Swedish */
|
|
57
|
-
SV = 'sv',// "Swedish",
|
|
58
|
-
/** Serbian */
|
|
59
|
-
SR = 'sr',// "Serbian",
|
|
60
|
-
/** Albanian */
|
|
61
|
-
SQ = 'sq',// "Albanian",
|
|
62
|
-
/** Sami */
|
|
63
|
-
SMS = 'sms',// "Sami",
|
|
64
|
-
/** Sami */
|
|
65
|
-
SMN = 'smn',// "Sami",
|
|
66
|
-
/** Sami */
|
|
67
|
-
SMJ = 'smj',// "Sami",
|
|
68
|
-
/** Sami */
|
|
69
|
-
SMA = 'sma',// "Sami",
|
|
70
|
-
/** Slovenian */
|
|
71
|
-
SL = 'sl',// "Slovenian",
|
|
72
|
-
/** Slovak */
|
|
73
|
-
SK = 'sk',// "Slovak",
|
|
74
|
-
/** Sinhala */
|
|
75
|
-
SI = 'si',// "Sinhala",
|
|
76
|
-
/** Sami */
|
|
77
|
-
SE = 'se',// "Sami",
|
|
78
|
-
/** Yakut */
|
|
79
|
-
SAH = 'sah',// "Yakut",
|
|
80
|
-
/** Sanskrit */
|
|
81
|
-
SA = 'sa',// "Sanskrit",
|
|
82
|
-
/** Kinyarwanda */
|
|
83
|
-
RW = 'rw',// "Kinyarwanda",
|
|
84
|
-
/** Russian */
|
|
85
|
-
RU = 'ru',// "Russian",
|
|
86
|
-
/** Romanian */
|
|
87
|
-
RO = 'ro',// "Romanian",
|
|
88
|
-
/** Romansh */
|
|
89
|
-
RM = 'rm',// "Romansh",
|
|
90
|
-
/** Quechua */
|
|
91
|
-
QUZ = 'quz',// "Quechua",
|
|
92
|
-
/** K */
|
|
93
|
-
QUT = 'qut',// "K'iche",
|
|
94
|
-
/** Portuguese */
|
|
95
|
-
PT = 'pt',// "Portuguese",
|
|
96
|
-
/** Pashto */
|
|
97
|
-
PS = 'ps',// "Pashto",
|
|
98
|
-
/** Dari */
|
|
99
|
-
PRS = 'prs',// "Dari",
|
|
100
|
-
/** Polish */
|
|
101
|
-
PL = 'pl',// "Polish",
|
|
102
|
-
/** Punjabi */
|
|
103
|
-
PA = 'pa',// "Punjabi",
|
|
104
|
-
/** Oriya */
|
|
105
|
-
OR = 'or',// "Oriya",
|
|
106
|
-
/** Occitan */
|
|
107
|
-
OC = 'oc',// "Occitan",
|
|
108
|
-
/** Sesotho sa Leboa */
|
|
109
|
-
NSO = 'nso',// "Sesotho sa Leboa",
|
|
110
|
-
/** Norwegian */
|
|
111
|
-
NO = 'no',// "Norwegian",
|
|
112
|
-
/** Norwegian, Nynorsk */
|
|
113
|
-
NN = 'nn',// "Norwegian, Nynorsk",
|
|
114
|
-
/** Dutch */
|
|
115
|
-
NL = 'nl',// "Dutch",
|
|
116
|
-
/** Nepali */
|
|
117
|
-
NE = 'ne',// "Nepali",
|
|
118
|
-
/** Norwegian, Bokmål */
|
|
119
|
-
NB = 'nb',// "Norwegian, Bokmål",
|
|
120
|
-
/** Maltese */
|
|
121
|
-
MT = 'mt',// "Maltese",
|
|
122
|
-
/** Malay */
|
|
123
|
-
MS = 'ms',// "Malay",
|
|
124
|
-
/** Marathi */
|
|
125
|
-
MR = 'mr',// "Marathi",
|
|
126
|
-
/** Mohawk */
|
|
127
|
-
MOH = 'moh',// "Mohawk",
|
|
128
|
-
/** Mongolian */
|
|
129
|
-
MN = 'mn',// "Mongolian",
|
|
130
|
-
/** Malayalam */
|
|
131
|
-
ML = 'ml',// "Malayalam",
|
|
132
|
-
/** Macedonian */
|
|
133
|
-
MK = 'mk',// "Macedonian",
|
|
134
|
-
/** Maori */
|
|
135
|
-
MI = 'mi',// "Maori",
|
|
136
|
-
/** Latvian */
|
|
137
|
-
LV = 'lv',// "Latvian",
|
|
138
|
-
/** Lithuanian */
|
|
139
|
-
LT = 'lt',// "Lithuanian",
|
|
140
|
-
/** Lao */
|
|
141
|
-
LO = 'lo',// "Lao",
|
|
142
|
-
/** Luxembourgish */
|
|
143
|
-
LB = 'lb',// "Luxembourgish",
|
|
144
|
-
/** Kyrgyz */
|
|
145
|
-
KY = 'ky',// "Kyrgyz",
|
|
146
|
-
/** Konkani */
|
|
147
|
-
KOK = 'kok',// "Konkani",
|
|
148
|
-
/** Korean */
|
|
149
|
-
KO = 'ko',// "Korean",
|
|
150
|
-
/** Kannada */
|
|
151
|
-
KN = 'kn',// "Kannada",
|
|
152
|
-
/** Khmer */
|
|
153
|
-
KM = 'km',// "Khmer",
|
|
154
|
-
/** Greenlandic */
|
|
155
|
-
KL = 'kl',// "Greenlandic",
|
|
156
|
-
/** Kazakh */
|
|
157
|
-
KK = 'kk',// "Kazakh",
|
|
158
|
-
/** Georgian */
|
|
159
|
-
KA = 'ka',// "Georgian",
|
|
160
|
-
/** Japanese */
|
|
161
|
-
JA = 'ja',// "Japanese",
|
|
162
|
-
/** Inuktitut */
|
|
163
|
-
IU = 'iu',// "Inuktitut",
|
|
164
|
-
/** Italian */
|
|
165
|
-
IT = 'it',// "Italian",
|
|
166
|
-
/** Icelandic */
|
|
167
|
-
IS = 'is',// "Icelandic",
|
|
168
|
-
/** Yi */
|
|
169
|
-
II = 'ii',// "Yi",
|
|
170
|
-
/** Igbo */
|
|
171
|
-
IG = 'ig',// "Igbo",
|
|
172
|
-
/** Indonesian */
|
|
173
|
-
ID = 'id',// "Indonesian",
|
|
174
|
-
/** Armenian */
|
|
175
|
-
HY = 'hy',// "Armenian",
|
|
176
|
-
/** Hungarian */
|
|
177
|
-
HU = 'hu',// "Hungarian",
|
|
178
|
-
/** Upper Sorbian */
|
|
179
|
-
HSB = 'hsb',// "Upper Sorbian",
|
|
180
|
-
/** Croatian */
|
|
181
|
-
HR = 'hr',// "Croatian",
|
|
182
|
-
/** Hindi */
|
|
183
|
-
HI = 'hi',// "Hindi",
|
|
184
|
-
/** Hebrew */
|
|
185
|
-
HE = 'he',// "Hebrew",
|
|
186
|
-
/** Hausa */
|
|
187
|
-
HA = 'ha',// "Hausa",
|
|
188
|
-
/** Gujarati */
|
|
189
|
-
GU = 'gu',// "Gujarati",
|
|
190
|
-
/** Alsatian */
|
|
191
|
-
GSW = 'gsw',// "Alsatian",
|
|
192
|
-
/** Galician */
|
|
193
|
-
GL = 'gl',// "Galician",
|
|
194
|
-
/** Scottish Gaelic */
|
|
195
|
-
GD = 'gd',// "Scottish Gaelic",
|
|
196
|
-
/** Irish */
|
|
197
|
-
GA = 'ga',// "Irish",
|
|
198
|
-
/** Frisian */
|
|
199
|
-
FY = 'fy',// "Frisian",
|
|
200
|
-
/** French */
|
|
201
|
-
FR = 'fr',// "French",
|
|
202
|
-
/** Faroese */
|
|
203
|
-
FO = 'fo',// "Faroese",
|
|
204
|
-
/** Filipino */
|
|
205
|
-
FIL = 'fil',// "Filipino",
|
|
206
|
-
/** Finnish */
|
|
207
|
-
FI = 'fi',// "Finnish",
|
|
208
|
-
/** Persian */
|
|
209
|
-
FA = 'fa',// "Persian",
|
|
210
|
-
/** Basque */
|
|
211
|
-
EU = 'eu',// "Basque",
|
|
212
|
-
/** Estonian */
|
|
213
|
-
ET = 'et',// "Estonian",
|
|
214
|
-
/** Spanish */
|
|
215
|
-
ES = 'es',// "Spanish",
|
|
216
|
-
/** English */
|
|
217
|
-
EN = 'en',// "English",
|
|
218
|
-
/** Greek */
|
|
219
|
-
EL = 'el',// "Greek",
|
|
220
|
-
/** Divehi */
|
|
221
|
-
DV = 'dv',// "Divehi",
|
|
222
|
-
/** Lower Sorbian */
|
|
223
|
-
DSB = 'dsb',// "Lower Sorbian",
|
|
224
|
-
/** German */
|
|
225
|
-
DE = 'de',// "German",
|
|
226
|
-
/** Danish */
|
|
227
|
-
DA = 'da',// "Danish",
|
|
228
|
-
/** Welsh */
|
|
229
|
-
CY = 'cy',// "Welsh",
|
|
230
|
-
/** Czech */
|
|
231
|
-
CS = 'cs',// "Czech",
|
|
232
|
-
/** Corsican */
|
|
233
|
-
CO = 'co',// "Corsican",
|
|
234
|
-
/** Catalan */
|
|
235
|
-
CA = 'ca',// "Catalan",
|
|
236
|
-
/** Bosnian */
|
|
237
|
-
BS = 'bs',// "Bosnian",
|
|
238
|
-
/** Breton */
|
|
239
|
-
BR = 'br',// "Breton",
|
|
240
|
-
/** Tibetan */
|
|
241
|
-
BO = 'bo',// "Tibetan",
|
|
242
|
-
/** Bengali */
|
|
243
|
-
BN = 'bn',// "Bengali",
|
|
244
|
-
/** Bulgarian */
|
|
245
|
-
BG = 'bg',// "Bulgarian",
|
|
246
|
-
/** Belarusian */
|
|
247
|
-
BE = 'be',// "Belarusian",
|
|
248
|
-
/** Bashkir */
|
|
249
|
-
BA = 'ba',// "Bashkir",
|
|
250
|
-
/** Azeri */
|
|
251
|
-
AZ = 'az',// "Azeri",
|
|
252
|
-
/** Assamese */
|
|
253
|
-
AS = 'as',// "Assamese",
|
|
254
|
-
/** Mapudungun */
|
|
255
|
-
ARN = 'arn',// "Mapudungun",
|
|
256
|
-
/** Arabic */
|
|
257
|
-
AR = 'ar',// "Arabic",
|
|
258
|
-
/** Amharic */
|
|
259
|
-
AM = 'am',// "Amharic",
|
|
260
|
-
/** Afrikaans */
|
|
261
|
-
AF = 'af'// "Afrikaans"
|
|
262
|
-
}
|