# Help4 Video Player

Help4 Builder Suite provides one responsive player contract for ordinary Builder Video elements and protected LMS video shortcodes.

## Builder Video Element

1. Add a **Video** element.
2. Choose **HLS stream with video fallback** as the provider.
3. Enter the `.m3u8` manifest in **HLS Manifest URL**.
4. Choose or enter an MP4, M4V, WebM, or Ogg file in **Fallback Video**.
5. Choose a **Poster Image** for the player before playback begins.
6. Optionally choose a separate **Playback Failure Image**. When it is empty, the poster is reused.
7. Set the responsive aspect ratio, preload policy, controls, autoplay, mute, and loop options.

Autoplay is always rendered muted because modern browsers normally block autoplay with sound. Visitors can unmute through the native controls when controls are enabled.

HLS uses the browser's native implementation when available. Other supported browsers use the locally bundled HLS.js runtime. The runtime retries bounded network and media failures, then tries the fallback video. If both sources fail, it displays the failure image, a status message, and a direct fallback link.

Ordinary saved YouTube, Vimeo, generic embed, and self-hosted Video elements continue to work. A self-hosted URL ending in `.m3u8` is detected as HLS automatically.

## Protected LMS Video

The protected video shortcode uses the same player:

```text
[h4_lms_video access="logged_in" hls="https://media.example.com/course/master.m3u8" mp4="https://media.example.com/course/fallback.mp4" poster="https://media.example.com/course/poster.jpg" fallback_image="https://media.example.com/course/unavailable.jpg" autoplay="0" muted="0" loop="0" title="Course lesson video"]
```

Addons may continue to supply access and source logic with:

* `h4bs_lms_video_access`
* `h4bs_lms_video_sources`
* `h4bs_lms_video_html`

The `h4bs_lms_video_sources` result accepts `source`, `hls`, `mp4`, `poster`, `fallback_image`, and `aspect_ratio`.

## Delivery Requirements

The HLS manifest and every segment must be reachable by the visitor's browser. When media uses another hostname, that origin must return suitable CORS headers. Serve manifests, segments, fallback files, and posters over HTTPS on public HTTPS pages.

The HLS.js engine is bundled locally and is loaded only on Builder or LMS surfaces that configure HLS. MP4-only pages do not load the HLS engine.
