mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 20:40:20 +00:00
Add OpenTok Archive layout options. (#20218)
* Add OpenTok Archive layout options. * Fix styesheet type.
This commit is contained in:
committed by
Ryan Cavanaugh
parent
2233a0eee6
commit
2fba16f44b
Vendored
+12
@@ -33,6 +33,18 @@ declare module 'opentok' {
|
||||
hasAudio?: boolean;
|
||||
hasVideo?: boolean;
|
||||
outputMode?: OutputMode;
|
||||
layout?: ArchiveLayoutOptions;
|
||||
}
|
||||
|
||||
export type ArchiveLayoutOptions = PredefinedArchiveLayoutOptions | CustomArchiveLayoutOptions;
|
||||
|
||||
export interface PredefinedArchiveLayoutOptions {
|
||||
type: 'bestFit' | 'pip' | 'verticalPresentation' | 'horizontalPresentation';
|
||||
}
|
||||
|
||||
export interface CustomArchiveLayoutOptions {
|
||||
type: 'custom';
|
||||
stylesheet: string;
|
||||
}
|
||||
|
||||
export type MediaMode = 'relayed' | 'routed';
|
||||
|
||||
@@ -28,6 +28,21 @@ const archiveOptions: OpenTok.ArchiveOptions = {
|
||||
outputMode: 'individual',
|
||||
};
|
||||
|
||||
const archiveCustomLayoutOptions: OpenTok.ArchiveOptions = {
|
||||
outputMode: 'composed',
|
||||
layout: {
|
||||
type: 'custom',
|
||||
stylesheet: 'derp',
|
||||
}
|
||||
};
|
||||
|
||||
const archivePredefinedLayoutOptions: OpenTok.ArchiveOptions = {
|
||||
outputMode: 'composed',
|
||||
layout: {
|
||||
type: 'pip',
|
||||
}
|
||||
};
|
||||
|
||||
client.startArchive('SESSION_ID', archiveOptions, (err: Error, archive: OpenTok.Archive) => {
|
||||
if (err) return console.log(err);
|
||||
console.log(archive.id);
|
||||
|
||||
Reference in New Issue
Block a user