> ## Documentation Index
> Fetch the complete documentation index at: https://docs.skillfactory.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Video Streaming

> Integrated video platform with Vimeo and YouTube for high-quality lessons

## Video system

Watch lessons in high quality with an integrated player and automatic progress tracking. The platform connects to Vimeo and YouTube via OAuth to manage your videos directly from the admin panel.

## Supported providers

<CardGroup cols={2}>
  <Card title="Vimeo" icon="vimeo">
    Professional quality with advanced privacy. Ideal for premium content with access control.
  </Card>

  <Card title="YouTube" icon="youtube">
    The world's largest video platform. Ideal for free content or broad reach.
  </Card>
</CardGroup>

## Video player

The player uses the native iframe from the provider (Vimeo or YouTube), ensuring full compatibility with the original controls of each platform.

**Features available via provider:**

* Playback controls (play, pause, seek)
* Speed adjustment
* Quality selection (up to 4K)
* Full-screen mode
* Picture-in-Picture
* Subtitles and transcriptions (when available on the provider)

<Tabs>
  <Tab title="Vimeo">
    The Vimeo player is displayed directly on the platform via iframe.

    ```
    https://player.vimeo.com/video/{videoId}?autoplay=1
    ```

    **Advantages:**

    * No ads
    * Advanced privacy (domain restriction)
    * Professional quality
    * Organization by folders/projects
  </Tab>

  <Tab title="YouTube">
    The YouTube player is displayed directly on the platform via iframe.

    ```
    https://www.youtube.com/embed/{videoId}?autoplay=1&rel=0
    ```

    **Advantages:**

    * Free with unlimited storage
    * Automatic captions
    * Native adaptive streaming
    * Broad compatibility

    <Info>
      The `rel=0` parameter prevents unrelated videos from appearing at the end of playback.
    </Info>
  </Tab>
</Tabs>

## OAuth integration

Instructors and administrators connect their Vimeo or YouTube accounts to browse and select videos directly on the platform, without needing to manually copy links.

### Connecting Vimeo

<Steps>
  <Step title="Go to Integrations">
    Admin → Integrations → Vimeo
  </Step>

  <Step title="Authorize access">
    Click "Connect Vimeo" and authorize access via OAuth2.
  </Step>

  <Step title="Select videos">
    When creating or editing a lesson, your Vimeo videos and folders will appear in the selector.
  </Step>
</Steps>

**Vimeo integration features:**

* Browse folders and subfolders
* Search with name filter
* View thumbnails and duration
* Shared integration with folder restrictions (for teams)

### Connecting YouTube

<Steps>
  <Step title="Go to Integrations">
    Admin → Integrations → YouTube
  </Step>

  <Step title="Authorize access">
    Click "Connect YouTube" and authorize access via Google OAuth2.
  </Step>

  <Step title="Select videos">
    When creating or editing a lesson, your YouTube videos will appear in the selector.
  </Step>
</Steps>

**YouTube integration features:**

* Automatic list of channel videos
* Search by name
* Display thumbnails and duration
* Automatic token renewal

<Warning>
  OAuth tokens expire periodically. The platform renews them automatically using the refresh token, but if the integration stops working, reconnect the account in settings.
</Warning>

## Adding videos to lessons

There are two ways to add videos to a lesson:

### Video selector (Vimeo/YouTube)

When creating or editing a lesson, the instructor accesses the integrated video selector:

1. **Choose the provider** - Select between Vimeo or YouTube (if both are connected)
2. **Browse or search** - Use the search bar or browse through folders (Vimeo)
3. **Select the video** - Click on the desired video to link it to the lesson
4. **Confirm** - The video is automatically configured in the lesson player

### Direct upload

You can also upload videos directly to Vimeo without leaving the platform:

<Steps>
  <Step title="Click Upload">
    In the lesson editor, use the video upload button.
  </Step>

  <Step title="Select the file">
    Choose the video from your computer. Supported formats: MP4, MOV, AVI, among others.
  </Step>

  <Step title="Wait for processing">
    The video is sent directly to Vimeo. A progress bar shows the status.
  </Step>

  <Step title="Video linked automatically">
    After upload, the video is automatically linked to the lesson.
  </Step>
</Steps>

<Info>
  Direct upload requires a connected Vimeo integration. The video is stored in your Vimeo account.
</Info>

<Info>
  In Vimeo, you can browse through folders and subfolders to better organize your videos. Each video shows its thumbnail, name, and duration.
</Info>

## Progress tracking

The platform automatically tracks each student's progress in every lesson:

* **Progress percentage** - From 0% to 100%
* **Watch time** - Total seconds watched
* **Last position** - Playback position to resume where you left off
* **View count** - How many times the student watched the lesson
* **Automatic completion** - The lesson is marked as completed based on progress

### Completion flow

When a lesson is marked as completed, the system automatically checks:

1. If all lessons in the module are completed → module marked as completed
2. If all modules in the course are completed → course marked as completed
3. If the course is completed and has a certificate → certificate generated automatically

## View limits

Administrators can configure a maximum number of views per lesson to protect content.

### How it works

* Each lesson can have a `max_views` field set by the instructor/admin
* If `max_views` is null, the lesson has unlimited views
* Each time the student accesses the lesson, the counter increments
* When the limit is reached, the student sees an informational screen

### Exempt lesson types

Not all lesson types are subject to view limits:

| Type       | View limit                            |
| ---------- | ------------------------------------- |
| Video      | Subject to the configured `max_views` |
| Quiz/Exam  | Always unlimited                      |
| Live class | Always unlimited                      |

### Extra views

If a student reaches the limit, the instructor or administrator can grant extra views:

<Steps>
  <Step title="Access lesson management">
    Admin → Courses → Lesson → View limits
  </Step>

  <Step title="Find the student">
    View the list of students and their view counts
  </Step>

  <Step title="Grant extra views">
    Set how many additional views the student will receive. Extra views are cumulative.
  </Step>
</Steps>

<Note>
  Instructors and administrators are not subject to view limits. The system checks the user's role before applying any restriction.
</Note>

## Shared integrations

For teams with multiple instructors, the administrator can set up a shared integration with folder restrictions:

* **Single account** - One Vimeo/YouTube account connected
* **Folder restrictions** - Each instructor accesses only designated folders
* **Centralized control** - The administrator manages which folders are accessible

## Tips for instructors

<AccordionGroup>
  <Accordion icon="video" title="Video organization">
    * Create folders in Vimeo by course or module
    * Use descriptive names for videos
    * Keep thumbnails up to date
    * Remove unused videos periodically
  </Accordion>

  <Accordion icon="shield" title="Privacy on Vimeo">
    * Configure domain restriction for your videos
    * Use the "Hide from Vimeo" option for exclusive videos
    * Disable downloads if you want to protect the content
  </Accordion>

  <Accordion icon="gauge" title="Performance">
    * Shorter videos (10-15 min) have better completion rates
    * Split long content into multiple lessons
    * Use thumbnails that represent the lesson content
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Live classes" icon="tower-broadcast" href="/en/features/live-classes">
    Real-time broadcasts with Google Meet and YouTube Live
  </Card>

  <Card title="Anti-sharing protection" icon="shield" href="/en/features/anti-sharing">
    Security system that protects access
  </Card>
</CardGroup>
