@twick/video-editor / Exports / BrowserMediaManager
Class: BrowserMediaManager
Hierarchy
-
↳
BrowserMediaManager
Table of contents
Constructors
Properties
Methods
- addItem
- addItems
- convertArrayBufferToBlob
- deleteItem
- deleteItems
- getItem
- getItems
- getStore
- getTotalCount
- initDB
- search
- updateItem
- updateItems
Constructors
constructor
• new BrowserMediaManager(): BrowserMediaManager
Returns
Inherited from
Properties
db
• Private db: null | IDBDatabase = null
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:7
dbName
• Private dbName: string = 'mediaStore'
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:5
storeName
• Private storeName: string = 'mediaItems'
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:6
Methods
addItem
▸ addItem(item): Promise<MediaItem>
Parameters
| Name | Type |
|---|---|
item | Omit<MediaItem, "id"> |
Returns
Promise<MediaItem>
Overrides
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:41
addItems
▸ addItems(items): Promise<MediaItem[]>
Parameters
| Name | Type |
|---|---|
items | Omit<MediaItem, "id">[] |
Returns
Promise<MediaItem[]>
Overrides
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:56
convertArrayBufferToBlob
▸ convertArrayBufferToBlob(arrayBuffer, type): Promise<Blob>
Parameters
| Name | Type |
|---|---|
arrayBuffer | ArrayBuffer |
type | string |
Returns
Promise<Blob>
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:37
deleteItem
▸ deleteItem(id): Promise<boolean>
Parameters
| Name | Type |
|---|---|
id | string |
Returns
Promise<boolean>
Overrides
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:161
deleteItems
▸ deleteItems(ids): Promise<boolean>
Parameters
| Name | Type |
|---|---|
ids | string[] |
Returns
Promise<boolean>
Overrides
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:170
getItem
▸ getItem(id): Promise<undefined | MediaItem>
Parameters
| Name | Type |
|---|---|
id | string |
Returns
Promise<undefined | MediaItem>
Overrides
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:76
getItems
▸ getItems(options?): Promise<MediaItem[]>
Parameters
| Name | Type |
|---|---|
options? | PaginationOptions |
Returns
Promise<MediaItem[]>
Overrides
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:92
getStore
▸ getStore(mode?): Promise<IDBObjectStore>
Parameters
| Name | Type | Default value |
|---|---|---|
mode | IDBTransactionMode | 'readonly' |
Returns
Promise<IDBObjectStore>
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:31
getTotalCount
▸ getTotalCount(): Promise<number>
Returns
Promise<number>
Overrides
BaseMediaManager.getTotalCount
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:210
initDB
▸ initDB(): Promise<IDBDatabase>
Returns
Promise<IDBDatabase>
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:9
search
▸ search(options): Promise<MediaItem[]>
Parameters
| Name | Type |
|---|---|
options | SearchOptions |
Returns
Promise<MediaItem[]>
Overrides
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:179
updateItem
▸ updateItem(id, updates): Promise<undefined | MediaItem>
Parameters
| Name | Type |
|---|---|
id | string |
updates | Partial<MediaItem> |
Returns
Promise<undefined | MediaItem>
Overrides
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:125
updateItems
▸ updateItems(updates): Promise<MediaItem[]>
Parameters
| Name | Type |
|---|---|
updates | { id: string ; updates: Partial<MediaItem> }[] |
Returns
Promise<MediaItem[]>
Overrides
Defined in
packages/video-editor/src/helpers/media-manager/browser-media-manager.ts:139