Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# Changelog #

## v2.7.0 (November 5, 2026) ##

- Feat: Videos can now pause or mute when they scroll out of view, move to another slide, or sit in a closed tab or popup. Turn it on in GoDAM > Settings > Video Player. It is off by default, and each video can use its own setting.
- Feat: Developers can pause all GoDAM videos from their own code, for example when a carousel changes slide.
- Tweak: Authors see analytics only for the videos they can edit.
- Tweak: Time a video plays muted while out of view no longer counts as watched in analytics.
- Fix: Security fixes.

## v2.6.1 (November 3, 2026) ##

- Fix: The analytics dashboard now shows correctly on sites with no views yet.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Tested up to: 7.1

Requires PHP: 7.4

Stable tag: 2.6.1
Stable tag: 2.7.0

License: [GPLv2 or later](http://www.gnu.org/licenses/gpl-2.0.html)

Expand Down
2 changes: 1 addition & 1 deletion admin/class-rtgodam-transcoder-handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,7 @@ public function add_transcoded_files( $file_post_array, $attachment_id, $job_for
* Whether downloaded content is a file of the expected type, judged by the
* name it would be stored under and by the content itself.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param string $content File content.
* @param string $file_name Name the file would be stored under.
Expand Down
2 changes: 1 addition & 1 deletion admin/class-rtgodam-transcoder-rest-routes.php
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ public function handle_transcription_callback( WP_REST_Request $request ) {
* GoDAM Central posts the key in the request body, so only the body is read.
* A key in the URL is not accepted, since URLs end up in server logs.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param WP_REST_Request $request The request object.
* @return string The key, or an empty string when the body has none.
Expand Down
10 changes: 9 additions & 1 deletion assets/src/js/godam-player/api/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1103,7 +1103,15 @@ player.on('ended', () => {
}
```

#### play, pause, ended
#### pause
```javascript
{
reason: string|null // 'visibility' when GoDAM paused the video because it left the view,
// 'api' for GoDAMAPI.pauseAll(), null when the visitor or your code paused it
}
```

#### play, ended
These events don't include additional data (data will be `null`).

**Notes:**
Expand Down
2 changes: 1 addition & 1 deletion assets/src/utils/safe-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const SAFE_LINK_PROTOCOLS = [ 'http:', 'https:', 'mailto:' ];
* is seen for what it is. Relative links resolve against the current page and so
* pass as http(s).
*
* @since n.e.x.t
* @since 2.7.0
*
* @param {*} url Stored link.
* @return {string} The trimmed link when it is http(s), mailto or relative, otherwise ''.
Expand Down
4 changes: 2 additions & 2 deletions godam.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Plugin Name: GoDAM
* Plugin URI: https://godam.io
* Description: Seamlessly manage and deliver your media assets directly from the cloud-based media management. Store assets efficiently, stream them via a CDN, and enhance your website's performance and user experience. Featuring adaptive bit rate streaming, adding interactive layers in videos, and taking full advantage of a digital asset management solution within WordPress.
* Version: 2.6.1
* Version: 2.7.0
* Requires at least: 6.5
* Requires PHP: 7.4
* Text Domain: godam
Expand Down Expand Up @@ -43,7 +43,7 @@
/**
* The version of the plugin
*/
define( 'RTGODAM_VERSION', '2.6.1' );
define( 'RTGODAM_VERSION', '2.7.0' );
}

if ( ! defined( 'RTGODAM_API_BASE' ) ) {
Expand Down
6 changes: 3 additions & 3 deletions inc/classes/class-embed.php
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ public function pre_oembed_result( $data, string $url ) {
* of the GoDAM API, so a URL that only mentions GoDAM in its path, query or
* a longer host name does not count.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param string $url URL to check.
*
Expand All @@ -150,7 +150,7 @@ private function is_godam_url( string $url ): bool {
* Keeps the iframe the embed is made of, plus the markup WordPress allows in
* post content, and removes anything else.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param string $html HTML from the GoDAM oEmbed response.
*
Expand Down Expand Up @@ -181,7 +181,7 @@ private function filter_embed_html( string $html ): string {
/**
* Filters the HTML elements and attributes kept in the HTML GoDAM returns for an embed.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param array $allowed_html Allowed elements and attributes, in the format wp_kses() takes.
*/
Expand Down
2 changes: 1 addition & 1 deletion inc/classes/rest-api/class-analytics.php
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,7 @@ public function check_analytics_read_permission( WP_REST_Request $request ) {
* opens a video. Editors and administrators can edit every attachment; an
* author can edit their own.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param int|string $video_id Attachment ID of the video.
* @return bool
Expand Down
6 changes: 3 additions & 3 deletions inc/classes/rest-api/class-engagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ public function get_transcoder_job_id( $video_id ) {
* is public or readable by the current user, the user can edit it, or it is
* used on a publicly viewable post.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param int|string $video_id The video ID: an attachment ID, or 'cmmid_' and the transcoding job ID of one.
*
Expand All @@ -1233,7 +1233,7 @@ public function get_visible_transcoder_job_id( $video_id ) {
/**
* Finds the transcoding job ID of a video through the attachments of this site.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param int|string $video_id The video ID: an attachment ID, or 'cmmid_' and the transcoding job ID of one.
* @param bool $visible_only Whether to skip attachments the current user cannot see.
Expand Down Expand Up @@ -1318,7 +1318,7 @@ private function find_transcoder_job_id( $video_id, $visible_only ) {
* The same answer for a video that is not on this site, one that does not exist
* and one the current user cannot see.
*
* @since n.e.x.t
* @since 2.7.0
*
* @return WP_REST_Response
*/
Expand Down
8 changes: 4 additions & 4 deletions inc/classes/rest-api/class-media-library.php
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@ public function verify_callback_permission( $request ) {
* Gates the routes that change a video's thumbnails. `edit_posts` alone does not say whose
* media it is, so this also asks WordPress whether the user may edit that attachment.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param \WP_REST_Request $request REST request.
* @return bool Whether the request is allowed.
Expand All @@ -689,7 +689,7 @@ public function can_edit_attachment( $request ) {
* upload files, because the Media Library lists every attachment to them, whatever the
* status of the post it is attached to. A private attachment still needs WordPress's say-so.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param \WP_REST_Request $request REST request.
* @return bool Whether the request is allowed.
Expand All @@ -701,7 +701,7 @@ public function can_read_attachment( $request ) {
/**
* Check the current user against the attachment named in the request.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param \WP_REST_Request $request REST request.
* @param bool $for_edit True to require edit access, false to require read access.
Expand Down Expand Up @@ -1654,7 +1654,7 @@ private function remove_custom_video_thumbnail_after_lookup( $attachment_id, $th
*
* A thumbnail is an image the player shows, so only an absolute http(s) URL is kept.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param mixed $url Thumbnail URL from the request.
* @return string The cleaned URL, or an empty string when it is not an http(s) URL.
Expand Down
2 changes: 1 addition & 1 deletion inc/classes/rest-api/class-meta-rest-fields.php
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public function add_meta_rest_fields() {
* stays what is already saved for that layer, which is nothing for a new
* layer, so saving the rest of the layer data works as before.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param mixed $value The `rtgodam_meta` value being saved.
* @param int $post_id The attachment ID.
Expand Down
20 changes: 10 additions & 10 deletions inc/helpers/custom-functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ function rtgodam_filter_input( $type, $variable_name, $filter = FILTER_DEFAULT,
*
* See assets/src/js/godam-player/managers/visibilityManager.js.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param mixed $value Raw value.
* @param string $fallback Returned when the value is not valid.
Expand All @@ -152,7 +152,7 @@ function rtgodam_sanitize_out_of_view_behavior( $value, $fallback = 'off' ) {
* A valid per-player value (block attribute or shortcode attribute) wins;
* empty or `inherit` falls back to the global Video Player setting.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param string $override Per-player value, empty to inherit.
*
Expand All @@ -175,7 +175,7 @@ function rtgodam_get_out_of_view_behavior( $override = '' ) {
* started. Global Video Player setting, off by default; autoplaying videos
* always pause in a background tab when the out-of-view behavior isn't `off`.
*
* @since n.e.x.t
* @since 2.7.0
*
* @return bool True when the setting is on.
*/
Expand Down Expand Up @@ -3394,7 +3394,7 @@ function rtgodam_get_request_site_origin( $requested_origin ) {
* newlines anywhere are dropped and leading control characters and spaces are
* ignored, so `java\tscript:` counts as `javascript:`.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param string $link Stored link.
* @return bool
Expand Down Expand Up @@ -3422,7 +3422,7 @@ function rtgodam_is_safe_link_scheme( $link ) {
* scheme is relative and kept, and a kept link is only trimmed, never rewritten.
* Everything else in the layers is returned unchanged.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param array $layers Layers read from an attachment's `rtgodam_meta`.
* @return array The layers, with unsafe hotspot links emptied.
Expand Down Expand Up @@ -3460,7 +3460,7 @@ function rtgodam_sanitize_hotspot_links( $layers ) {
* `currentcolor`. Anything else, such as a value with a `;`, a `url()` or a
* stray bracket, gives the fallback.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param mixed $color The stored colour.
* @param string $fallback Value to return when the colour is not valid.
Expand Down Expand Up @@ -3526,7 +3526,7 @@ function rtgodam_sanitize_css_color( $color, $fallback = '' ) {
* reduced to a slug (lowercase letters, numbers, dashes and underscores) and
* cannot close the shortcode or open another one.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param array $layer The form layer: `gf_id` is the form ID, `theme` the optional Gravity Forms theme.
*
Expand All @@ -3549,7 +3549,7 @@ function rtgodam_get_gravityform_layer_shortcode( $layer ) {
* `https://abc123def4.gdcdn.us/{job_id}/video.mp4`, so a name here matches that
* host and any subdomain of it.
*
* @since n.e.x.t
* @since 2.7.0
*
* @return string[] Lowercase host names, without scheme, port or path.
*/
Expand All @@ -3560,7 +3560,7 @@ function rtgodam_get_transcoder_file_hosts() {
* A name matches that host and any subdomain of it. Add the CDN domain of a
* self-hosted or staging GoDAM Central here, or a domain the CDN is served from.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param string[] $hosts Host names, such as `gdcdn.us`.
*/
Expand All @@ -3586,7 +3586,7 @@ function rtgodam_get_transcoder_file_hosts() {
* that is one of rtgodam_get_transcoder_file_hosts() or a subdomain of one. It is
* checked as written, so check the decoded form of a URL that is decoded before use.
*
* @since n.e.x.t
* @since 2.7.0
*
* @param mixed $url URL to check.
* @return bool
Expand Down
Loading