---
url: >-
  https://plugin.stripo.email/extensions/reference/integrations/ExternalVideosLibrary.md
---
# ExternalVideosLibrary

Core class for integrating external video libraries with the Stripo Email Editor.

```typescript
class ExternalVideosLibrary
```

## Description

`ExternalVideosLibrary` enables integration of third-party video hosting and management services (like YouTube, Vimeo, Wistia, or custom video platforms) into the Stripo Email Editor. This interface allows users to browse, search, and select videos from external sources, automatically generating video thumbnails with play buttons for email-safe video representation.

## Import

```typescript
import { ExternalVideosLibrary } from '@stripoinc/ui-editor-extensions';
```

## Methods

### openExternalVideosLibraryDialog()

Opens the external video library interface for video selection.

```typescript
openExternalVideosLibraryDialog(
  currentValue: string,
  successCallback: ExternalVideosLibrarySelectedCallback,
  cancelCallback: ExternalVideosLibraryCancelCallback
): void
```

#### Parameters

| Name            | Type                                    | Description                      |
|-----------------|-----------------------------------------|----------------------------------|
| currentValue    | `string`                                | Currently selected video URL     |
| successCallback | `ExternalVideosLibrarySelectedCallback` | Called when user selects a video |
| cancelCallback  | `ExternalVideosLibraryCancelCallback`   | Called when user cancels         |

## Type Definitions

### ExternalGalleryVideo

Represents a video from the external gallery.

```typescript
type ExternalGalleryVideo = {
  originalVideoName: string;  // Video name/title
  originalImageName: string;  // Thumbnail image name
  urlImage: string;           // Thumbnail image URL
  urlVideo: string;           // Video URL or embed link
  hasCustomButton: boolean;   // Whether to use custom play button
  altText: string;            // Alt text for video thumbnail
}
```

### Callback Types

```typescript
type ExternalVideosLibrarySelectedCallback = (value: ExternalGalleryVideo) => void;
type ExternalVideosLibraryCancelCallback = () => void;
```
