Skip to content

Commit 13f099a

Browse files
committed
New Overlay Options
1 parent 80c0e89 commit 13f099a

15 files changed

Lines changed: 742 additions & 709 deletions

CHANGELOG.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,27 @@ All notable changes to this project will be documented in this file.
55
This project adheres to [Semantic Versioning](https://semver.org) and follows the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) format.
66

77
---
8+
## [1.2.3] - 2026-11-09
9+
10+
### Added
11+
12+
- Overlays: there are new options to control when overlays are shown, by the new `show` property in the overlay item media data.
13+
- `always` (default): Overlay is always shown
14+
- `start`: Overlay is shown at the start of the media (playback has to be paused as well)
15+
- `end`: Overlay is shown at the end of the media (playback has to be paused as well)
16+
- `play`: Overlay is shown when the media is playing
17+
- `paused`: Overlay is shown when the media is paused
18+
- Note that when `cueIn` or `cueOut` are specified, the `show` property is overridden.
19+
20+
### Changed
21+
22+
- Overlays: when applying `scale` to images, those are now rendered as regular images (using `object-size`) instead of background images
23+
- Updated dev dependencies
24+
25+
### Fixed
26+
27+
- Playlist: fixed error when overlays where present, but none of them was a poster image
28+
829
## [1.2.2] - 2025-10-29
930

1031
### Fixed
@@ -31,7 +52,7 @@ This project adheres to [Semantic Versioning](https://semver.org) and follows th
3152
- UI: new API `ui.resize` (which forces recalculating player width and height)
3253
- Overlays: added type `html` for HTML-based overlays
3354
- Overlays: added option `sanitizeHTML` to prevent XSS attacks from unsafe HTML (enabled by default and enforced in the secure build). This (severely) limits the allowed HTML.
34-
- Demo: added link on the logo to the new vision.player.io microsite
55+
- Demo: added link on the logo to the new visionplayer.io microsite
3556
- Added new default iconset
3657
- Added options in the UI component to change the iconset back to the filled version
3758

assets/scss/ui/overlays.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ vision-player {
110110
background-color: var(--vip-bg);
111111
}
112112

113-
&.is-poster {
113+
&.is-start {
114114
background-color: var(--vip-media-bg);
115115
}
116116
}

demo/embed/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ <h1>Embedding Examples</h1>
109109
--vip-title-viewport-distance: 0px;
110110
}
111111
</style>
112-
<div id="div-embed" data-vip-config='{"dom":{"shadow":"closed","className":"vip-theme-demo"},"ui":{"alwaysVisible":true}}' data-vip-media='/demo/trailer/visionplayer-trailer.json'></div>
112+
<div id="div-embed" data-vip-config='{"dom":{"shadow":"closed","className":"vip-theme-demo"},"ui":{"iconStyle":"filled","alwaysVisible":true}}' data-vip-media='/demo/trailer/visionplayer-trailer.json'></div>
113113
<figcaption>Div tag embedding with simple theming via custom CSS vars in shadow mode</figcaption>
114114
</figure>
115115

docs/components/ui/Overlays.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const playerConfig = {
1818
| Setting Name | Type | Description |
1919
| ------------- | ------- | ------------------------------------------------------------ |
2020
| `adaptLayout` | Boolean | Aligns overlay position with controller and title visibility state. |
21-
| `sanitizeHTML | Boolean | Sanitizes the HTML of the overlay to prevent XSS attacks. |
21+
| `sanitizeHTML` | Boolean | Sanitizes the HTML of the overlay to prevent XSS attacks. |
2222

2323
## Media Data
2424

@@ -59,8 +59,9 @@ const mediaData = {
5959
| `className` | String | | Custom classname for this overla item. |
6060
| `alt` | String | | Additional `alt` text for the overlay image. |
6161
| `placement` | String | | Defines the placement of the image in the viewport. Currently supported are: `center`, `top`, `bottom`, `left`, `right`, `top-left`, `top-right`, `center-left`, `center-right`, `bottom-left`, `bottom-right` |
62-
| `scale` | String | | Defines how to scale the overlay image. Currently supported are: cover, contain. |
62+
| `scale` | String | | Defines how to scale the overlay image. Currently supported are: `cover`, `contain`. |
6363
| `margin` | Number | | Margin (in pixels) which defines the distance of the overlay to the players' viewport. |
64+
| `show` | String | | When the overlay is shown:<ul><li>`always` (default): Overlay is always shown</li> <li>`start`: Overlay is shown at the start of the media (playback has to be paused as well)</li> <li>`end`: Overlay is shown at the end of the media (playback has to be paused as well)</li> <li>`play`: Overlay is shown when the media is playing</li><li>`paused`: Overlay is shown when the media is paused</li></ul> Note that when `cueIn` or `cueOut` are specified, the `show` property is overridden. |
6465
| `cueIn` | Number | | Time (in seconds) at which this overlay item should be displayed. |
6566
| `cueOut` | Number | | Time (in seconds) at which this overlay item should be hidden. |
6667

0 commit comments

Comments
 (0)