-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0594965
commit cdcbfcc
Showing
66 changed files
with
44,759 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import { PartialVideomailClientOptions } from "./types/options"; | ||
import Videomail from "./types/Videomail"; | ||
import Despot from "./util/Despot"; | ||
export interface StartOverParams { | ||
keepHidden?: boolean | undefined; | ||
} | ||
export interface ShowParams { | ||
goBack?: boolean | undefined; | ||
playerOnly?: boolean | undefined; | ||
} | ||
declare class VideomailClient extends Despot { | ||
private container; | ||
static ENC_TYPE_APP_JSON: string; | ||
static ENC_TYPE_FORM: string; | ||
constructor(options?: PartialVideomailClientOptions); | ||
private validateOptions; | ||
build(): HTMLElement | null | undefined; | ||
show(params?: ShowParams): HTMLElement; | ||
startOver(params?: StartOverParams): void; | ||
unload(startingOver?: boolean): void; | ||
replay(videomail: Videomail, replayParentElementId?: string): HTMLVideoElement; | ||
hide(): void; | ||
getByAlias(alias: string): Promise<Videomail>; | ||
getByKey(key: string): Promise<Videomail>; | ||
isDirty(): boolean; | ||
isBuilt(): boolean; | ||
isRecording(): any; | ||
submit(): void; | ||
getLogLines(): string[] | undefined; | ||
} | ||
export default VideomailClient; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
declare const _default: { | ||
SITE_NAME_LABEL: string; | ||
VERSION_LABEL: string; | ||
public: { | ||
ENC_TYPE_APP_JSON: string; | ||
ENC_TYPE_FORM: string; | ||
}; | ||
}; | ||
export default _default; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import VideomailClient from "./client"; | ||
import { FullVideomailErrorData, VideomailErrorData } from "./types/error"; | ||
import VideomailEvents from "./types/events"; | ||
import { PartialVideomailClientOptions } from "./types/options"; | ||
import RecordingStats from "./types/RecordingStats"; | ||
import Videomail from "./types/Videomail"; | ||
import { VideoType } from "./types/VideoType"; | ||
export type { Videomail }; | ||
export type { VideomailEvents }; | ||
export type { PartialVideomailClientOptions }; | ||
export type { RecordingStats }; | ||
export { VideoType, VideomailClient }; | ||
export type { VideomailErrorData, FullVideomailErrorData }; |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import { VideomailClientOptions } from "./types/options"; | ||
declare const options: VideomailClientOptions; | ||
export default options; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { VideomailClientOptions } from "./types/options"; | ||
import Videomail, { PartialVideomail } from "./types/Videomail"; | ||
import Response from "superagent/lib/node/response"; | ||
import VideomailError from "./util/error/VideomailError"; | ||
import { FormInputs } from "./wrappers/form"; | ||
declare class Resource { | ||
private readonly options; | ||
private readonly timezoneId; | ||
constructor(options: VideomailClientOptions); | ||
private applyDefaultValue; | ||
private applyDefaultValues; | ||
private get; | ||
private write; | ||
getByAlias(alias: string): Promise<Videomail>; | ||
getByKey(key: string): Promise<Videomail>; | ||
reportError(err: VideomailError): Promise<void>; | ||
post(videomail: PartialVideomail): Promise<Response>; | ||
put(videomail: PartialVideomail): Promise<Response>; | ||
form(formData: FormInputs, url: string): Promise<Response>; | ||
} | ||
export default Resource; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
export type DeepPartial<T> = { | ||
[P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P]; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
interface RecordingStats { | ||
waitingTime?: number | undefined; | ||
avgFps?: number | undefined; | ||
wantedFps?: number; | ||
avgInterval?: number; | ||
wantedInterval?: number; | ||
intervalSum?: number; | ||
framesCount?: number; | ||
videoType?: string; | ||
samplesCount?: number; | ||
sampleRate?: number; | ||
} | ||
export default RecordingStats; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
type VideoFormat = Record<string, number | string | Record<string, string>>; | ||
export default VideoFormat; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export declare enum VideoType { | ||
WebM = "webm", | ||
MP4 = "mp4" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { DeepPartial } from "./DeepPartial"; | ||
import RecordingStats from "./RecordingStats"; | ||
import VideoFormat from "./VideoFormat"; | ||
interface Videomail { | ||
alias: string; | ||
bcc?: string[] | undefined; | ||
body?: string; | ||
cc?: string[] | undefined; | ||
connection?: Record<string, number | string>; | ||
correctUrl: string; | ||
dateCreated: number; | ||
dateCreatedPretty: string; | ||
dateUpdated: number; | ||
expiresAfter: number; | ||
expiresAfterIso: string; | ||
expiresAfterPretty: string; | ||
format?: VideoFormat; | ||
from: string; | ||
height?: number | undefined; | ||
key: string; | ||
mp4?: string; | ||
vtt?: string; | ||
captions?: string | undefined; | ||
parentKey?: string; | ||
poster: string; | ||
recordingStats?: RecordingStats | undefined; | ||
rejectedBcc?: string[]; | ||
rejectedCc?: string[]; | ||
rejectedTo?: string[]; | ||
accepted?: string[]; | ||
replyAllUrl?: string; | ||
replyUrl: string; | ||
sending: boolean; | ||
sent?: boolean; | ||
sentBcc?: string[]; | ||
sentCc?: string[]; | ||
sentDate?: number; | ||
sentDateIso?: string; | ||
sentDatePretty?: string; | ||
sentTo?: string[]; | ||
siteName: string; | ||
siteTitle?: string; | ||
subject?: string; | ||
to?: string[] | undefined; | ||
url: string; | ||
videomailClientVersion: string; | ||
webm?: string; | ||
width?: number | undefined; | ||
} | ||
export type PartialVideomail = DeepPartial<Videomail>; | ||
export default Videomail; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
export declare const NodeEnvType: { | ||
readonly DEVELOPMENT: "development"; | ||
readonly PRODUCTION: "production"; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import type { IBrowser, ICPU, IDevice, IEngine, IOS } from "ua-parser-js"; | ||
export interface VideomailErrorData { | ||
cause?: any; | ||
err?: Error | undefined; | ||
explanation?: string | undefined; | ||
logLines?: string[] | undefined; | ||
message: string; | ||
promise?: Promise<any> | undefined; | ||
reason?: any; | ||
siteName?: string | undefined; | ||
title: string; | ||
trace?: string | undefined; | ||
code?: string | undefined; | ||
status?: number | undefined; | ||
stack?: string | undefined; | ||
errType?: string | undefined; | ||
errTarget?: EventTarget | null; | ||
errStringified?: string | undefined; | ||
event?: Event | undefined; | ||
eventStringified?: string | undefined; | ||
} | ||
export interface FullVideomailErrorData extends VideomailErrorData { | ||
browser: IBrowser; | ||
cookie?: string | undefined; | ||
cpu?: ICPU | undefined; | ||
device?: IDevice | undefined; | ||
engine: IEngine; | ||
location: string; | ||
orientation?: string | undefined; | ||
os?: IOS | undefined; | ||
screen: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
import Response from "superagent/lib/node/response"; | ||
import VideomailError from "../../util/error/VideomailError"; | ||
import { FormReadyParams } from "../../wrappers/container"; | ||
import RecordingStats from "../RecordingStats"; | ||
import Videomail from "../Videomail"; | ||
export interface UserMediaReadyParams { | ||
switchingFacingMode?: ConstrainDOMString | undefined; | ||
recordWhenReady?: boolean | undefined; | ||
paused?: boolean | undefined; | ||
} | ||
export interface ErrorParams { | ||
exc?: unknown; | ||
err?: VideomailError; | ||
} | ||
export interface RecordingParams { | ||
framesCount: number; | ||
} | ||
export interface StoppingParams { | ||
limitReached?: boolean | undefined; | ||
} | ||
export interface ProgressParams { | ||
frameProgress: string; | ||
sampleProgress?: string | undefined; | ||
} | ||
export interface PreviewParams { | ||
key?: string; | ||
width?: number | undefined; | ||
height?: number | undefined; | ||
hasAudio: boolean; | ||
} | ||
export interface StoppedParams { | ||
recordingStats?: RecordingStats | undefined; | ||
} | ||
export interface SubmittedParams { | ||
videomail: Videomail; | ||
response: Response; | ||
} | ||
export interface ValidatingParams { | ||
targetName?: any; | ||
event?: any; | ||
} | ||
export interface InvalidParams { | ||
whyInvalid?: string; | ||
invalidData?: Record<string, string>; | ||
} | ||
interface VideomailEvents { | ||
ASKING_WEBCAM_PERMISSION: () => void; | ||
BEGIN_AUDIO_ENCODING: () => void; | ||
BEGIN_VIDEO_ENCODING: () => void; | ||
BLOCKING: () => void; | ||
BUILT: () => void; | ||
CONNECTED: () => void; | ||
CONNECTING: () => void; | ||
COUNTDOWN: () => void; | ||
DISABLING_AUDIO: () => void; | ||
DISCONNECTED: () => void; | ||
ENABLING_AUDIO: () => void; | ||
ERROR: (params: ErrorParams) => void; | ||
EVENT_EMITTED: () => void; | ||
FIRST_FRAME_SENT: () => void; | ||
FORM_READY: (params: FormReadyParams) => void; | ||
GOING_BACK: () => void; | ||
HIDE: () => void; | ||
INVALID: (params: InvalidParams) => void; | ||
INVISIBLE: () => void; | ||
LOADED_META_DATA: () => void; | ||
LOADING_USER_MEDIA: () => void; | ||
NOTIFYING: () => void; | ||
PAUSED: () => void; | ||
PREVIEW: (params?: PreviewParams) => void; | ||
PREVIEW_SHOWN: () => void; | ||
PROGRESS: (params: ProgressParams) => void; | ||
RECORDING: (params: RecordingParams) => void; | ||
REPLAY_SHOWN: () => void; | ||
RESETTING: () => void; | ||
RESUMING: () => void; | ||
SENDING_FIRST_FRAME: () => void; | ||
SERVER_READY: () => void; | ||
STARTING_OVER: () => void; | ||
STOPPED: (params: StoppedParams) => void; | ||
STOPPING: (params: StoppingParams) => void; | ||
SUBMITTED: (params: SubmittedParams) => void; | ||
SUBMITTING: () => void; | ||
SWITCH_FACING_MODE: () => void; | ||
UNLOADING: () => void; | ||
USER_MEDIA_READY: (params: UserMediaReadyParams) => void; | ||
VALID: () => void; | ||
VALIDATING: (params?: ValidatingParams) => void; | ||
VISIBLE: () => void; | ||
} | ||
export default VideomailEvents; |
Oops, something went wrong.