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
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog #

## v1.9.0 (May 7, 2026) ##

- Feat: Introduced WooCommerce integration — first beta release of GoDAM for WooCommerce support.
- Fix: Disabled hover option when autoplay is enabled in the Video block.
- Fix: Resolved Gallery Carousel scroll issue on iOS devices.
- Tweak: Revamped GoDAM blocks to Video, Video Gallery, Audio and Document blocks.

## v1.8.0 (April 29, 2026) ##

- Feat: Enhanced GoDAM Gallery block with improved layouts and controls.
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: 6.9

Requires PHP: 7.4

Stable tag: 1.8.0
Stable tag: 1.9.0

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

Expand Down
22 changes: 19 additions & 3 deletions admin/class-rtgodam-transcoder-admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -856,6 +856,22 @@ public function expired_api_key_notice() {
return;
}

// rtgodam_get_api_key_status() only reads the persistent DB status option
// ('rtgodam-api-key-status') which can NEVER contain 'verification_failed'
// because that state is transient and not persistable. The actual runtime
// status — including transient 'verification_failed' — is stored in the
// 'rtgodam_user_data' option by rtgodam_get_user_data(). Read from there
// so we don't show a false "expired" banner when the server is temporarily
// unreachable.
$cached_user_data = get_option( 'rtgodam_user_data', array() );
$runtime_status = isset( $cached_user_data['api_key_status'] )
? $cached_user_data['api_key_status']
: rtgodam_get_api_key_status();

if ( \RTGODAM\Inc\Enums\Api_Key_Status::VERIFICATION_FAILED === $runtime_status ) {
return;
}

$pricing_url = add_query_arg(
array(
'utm_campaign' => 'expired-key',
Expand Down Expand Up @@ -927,23 +943,23 @@ public function woo_integration_promo_notice() {
// Case 4: Required active + valid key → link to integrations page.
$message = sprintf(
/* translators: 1: opening link tag, 2: closing link tag */
__( '<strong>GoDAM now supports WooCommerce!</strong> Head over to the %1$sIntegration Settings%2$s to get started.', 'godam' ),
__( '<strong>Shoppable video for WooCommerce is live!</strong> %1$sActivate%2$s to start selling directly from your videos.', 'godam' ),
'<a href="' . esc_url( $integrations_url ) . '">',
'</a>'
);
} elseif ( ! $is_woo_active && $has_valid_key ) {
// Case 2: WooCommerce not active + valid key → install/activate WooCommerce.
$message = sprintf(
/* translators: 1: opening link tag, 2: closing link tag */
__( '<strong>GoDAM now supports WooCommerce!</strong> %1$sInstall & activate WooCommerce%2$s to use our Woo integration.', 'godam' ),
__( '<strong>GoDAM now supports WooCommerce!</strong> %1$sInstall WooCommerce%2$s to start using shoppable videos with GoDAM.', 'godam' ),
'<a href="' . esc_url( $woo_plugin_url ) . '">',
'</a>'
);
} else {
// Cases 1 & 3: No valid key → purchase.
$message = sprintf(
/* translators: 1: opening link tag, 2: closing link tag */
__( '<strong>GoDAM now supports WooCommerce!</strong> %1$sPurchase a plan%2$s to access our Woo integration.', 'godam' ),
__( '<strong>Add shoppable videos to your WooCommerce store!</strong> %1$sUpgrade your plan%2$s to unlock this feature.', 'godam' ),
'<a href="' . esc_url( $pricing_url ) . '" target="_blank" rel="noopener noreferrer">',
'</a>'
);
Expand Down
4 changes: 2 additions & 2 deletions assets/src/blocks/godam-audio/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "godam/audio",
"title": "GoDAM Audio",
"title": "Audio",
"category": "media",
"description": "Embed a GoDAM audio player.",
"keywords": [ "music", "sound", "podcast", "recording" ],
"keywords": [ "music", "sound", "podcast", "recording", "godam" ],
"textdomain": "godam",
"attributes": {
"blob": {
Expand Down
2 changes: 1 addition & 1 deletion assets/src/blocks/godam-audio/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ function AudioEdit( {
allowedTypes={ ALLOWED_MEDIA_TYPES }
value={ attributes }
onError={ onUploadError }
labels={ { title: __( 'GoDAM Audio', 'godam' ) } }
labels={ { title: __( 'Audio', 'godam' ) } }
/>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion assets/src/blocks/godam-gallery-v2/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "godam/gallery-v2",
"title": "GoDAM Video Gallery",
"title": "Video Gallery",
"category": "media",
"description": "Create a handpicked or query-based GoDAM video gallery.",
"keywords": [ "video", "gallery", "grid", "godam" ],
Expand Down
2 changes: 1 addition & 1 deletion assets/src/blocks/godam-gallery-v2/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ export default function Edit( { attributes, setAttributes, clientId } ) {
{ video.thumbnail ? (
<img src={ video.thumbnail } alt={ video.title } />
) : (
<span>{ __( 'GoDAM Video', 'godam' ) }</span>
<span>{ __( 'Video', 'godam' ) }</span>
) }
</div>
{ showTitle && (
Expand Down
4 changes: 2 additions & 2 deletions assets/src/blocks/godam-gallery-v2/render.php
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ class="godam-gallery-v2__query-button"
<?php if ( ! empty( $godam_item['thumbnail'] ) ) : ?>
<img src="<?php echo esc_url( $godam_item['thumbnail'] ); ?>" alt="<?php echo esc_attr( $godam_item['title'] ); ?>" class="godam-gallery-v2__thumbnail" <?php echo $godam_thumbnail_attributes ? wp_kses_data( $godam_thumbnail_attributes ) : ''; ?> />
<?php else : ?>
<span><?php esc_html_e( 'GoDAM Video', 'godam' ); ?></span>
<span><?php esc_html_e( 'Video', 'godam' ); ?></span>
<?php endif; ?>
</div>
<?php if ( $godam_show_title ) : ?>
Expand Down Expand Up @@ -401,7 +401,7 @@ class="godam-gallery-v2-item__thumbnail godam-gallery-v2__thumbnail"
/>
<?php else : ?>
<div class="godam-gallery-v2-item__placeholder">
<span><?php esc_html_e( 'GoDAM Video', 'godam' ); ?></span>
<span><?php esc_html_e( 'Video', 'godam' ); ?></span>
</div>
<?php endif; ?>
<div class="godam-gallery-v2-item__play-icon" aria-hidden="true">
Expand Down
4 changes: 4 additions & 0 deletions assets/src/blocks/godam-gallery-v2/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -421,12 +421,14 @@
inset: 0;
background: rgba(15, 18, 12, 0.7);
opacity: 0;
visibility: hidden;
pointer-events: none;
transition: opacity 0.2s ease;
z-index: 999998;

&.is-active {
opacity: 1;
visibility: visible;
pointer-events: auto;
}
}
Expand All @@ -442,12 +444,14 @@
overflow: hidden;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
opacity: 0;
visibility: hidden;
pointer-events: none;
transition: opacity 0.2s ease, transform 0.2s ease;
z-index: 999999;

&.is-active {
opacity: 1;
visibility: visible;
transform: translate(-50%, -50%) scale(1);
pointer-events: auto;
}
Expand Down
4 changes: 2 additions & 2 deletions assets/src/blocks/godam-pdf/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "godam/pdf",
"title": "GoDAM PDF",
"title": "Document",
"category": "media",
"description": "Embed a PDF file with preview.",
"keywords": [ "document", "pdf", "file", "preview" ],
"keywords": [ "document", "pdf", "file", "preview", "godam" ],
"textdomain": "godam",
"attributes": {
"blob": {
Expand Down
2 changes: 1 addition & 1 deletion assets/src/blocks/godam-pdf/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ function PdfEdit( {
allowedTypes={ ALLOWED_MEDIA_TYPES }
value={ attributes }
onError={ onUploadError }
labels={ { title: __( 'GoDAM PDF', 'godam' ) } }
labels={ { title: __( 'Document', 'godam' ) } }
/>
</div>
);
Expand Down
6 changes: 3 additions & 3 deletions assets/src/blocks/godam-player/block.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
"$schema": "https://schemas.wp.org/trunk/block.json",
"apiVersion": 3,
"name": "godam/video",
"title": "GoDAM Video",
"title": "Video",
"category": "media",
"description": "Embed a video from your media library or upload a new one.",
"keywords": [ "movie", "video", "player" ],
"textdomain": "transcoder",
"keywords": [ "movie", "video", "player", "godam" ],
"textdomain": "godam",
"attributes": {
"autoplay": {
"type": "boolean",
Expand Down
26 changes: 23 additions & 3 deletions assets/src/blocks/godam-player/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,23 @@ function VideoEdit( {
}
}, [ id, src, attributes.seo, isVideoSelecting, setAttributes ] );

// When autoplay is enabled, hoverSelect is incompatible — reset it to 'none'.
// Only apply this when autoplay is toggled on after mount so older content
// is not rewritten as a side effect of opening the editor.
const previousAutoplayRef = useRef( autoplay );

useEffect( () => {
const previousAutoplay = previousAutoplayRef.current;
if ( previousAutoplay === autoplay ) {
return;
}
previousAutoplayRef.current = autoplay;

if ( autoplay && attributes.hoverSelect !== 'none' ) {
setAttributes( { hoverSelect: 'none' } );
}
}, [ autoplay ] ); // eslint-disable-line react-hooks/exhaustive-deps

// Keep overridden SEO thumbnail synced with block poster.
useEffect( () => {
if ( ! attributes?.seoOverride || ! poster ) {
Expand Down Expand Up @@ -641,7 +658,7 @@ function VideoEdit( {
className="block-editor-media-placeholder"
withIllustration={ ! isSingleSelected }
icon={ icon }
label={ __( 'GoDAM video', 'godam' ) }
label={ __( 'Video', 'godam' ) }
instructions={ __(
'Drag and drop a video, upload, or choose from your library.',
'godam',
Expand Down Expand Up @@ -780,9 +797,12 @@ function VideoEdit( {
<SelectControl
__nextHasNoMarginBottom
label={ __( 'Hover Option', 'godam' ) }
help={ __( 'Choose the action to perform on video hover.', 'godam' ) }
help={ autoplay
? __( 'Hover option is disabled when autoplay is on.', 'godam' )
: __( 'Choose the action to perform on video hover.', 'godam' ) }
value={ attributes.hoverSelect || 'none' }
onChange={ ( value ) => setAttributes( { hoverSelect: value } ) }
disabled={ !! autoplay }
options={
[
{ label: __( 'None', 'godam' ), value: 'none' },
Expand Down Expand Up @@ -899,7 +919,7 @@ function VideoEdit( {
<div { ...blockProps }>
<div className="godam-editor-video-placeholder">
<span className="godam-editor-video-label">
{ __( 'GoDAM Video', 'godam' ) }
{ __( 'Video', 'godam' ) }
</span>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion assets/src/blocks/godam-player/editor.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* GoDAM Video Block - Editor styles
* Video Block - Editor styles
* These styles ensure the block works correctly in the editor,
* including in flex layouts (Row/Stack).
*/
Expand Down
2 changes: 1 addition & 1 deletion assets/src/blocks/godam-player/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import icon from '../../images/godam-video-filled.svg';
* @see https://developer.wordpress.org/block-editor/reference-guides/block-api/block-registration/
*/
registerBlockType( 'godam/video', {
icon: <img src={ icon } alt="GoDAM Video Block icon" />,
icon: <img src={ icon } alt="Video Block icon" />,
usesContext: [ 'queryId' ],
/**
* @see ./edit.js
Expand Down
2 changes: 1 addition & 1 deletion assets/src/blocks/godam-player/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@use './variables';

/**
* GoDAM Video Block - Main wrapper styles
* Video Block - Main wrapper styles
* These styles ensure the block works correctly in all layout contexts,
* including flex layouts (Row, Stack) and standard layouts (Group, Columns).
*/
Expand Down
5 changes: 4 additions & 1 deletion assets/src/js/godam-player/api/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ class Player {

this.videoJs = videoJs;
this.video = video;
this.instanceId = video.dataset.instanceId;

// Check the element itself first, then fall back to descendants.
this.instanceId = video.dataset.instanceId ||
video.querySelector?.( '[data-instance-id]' )?.dataset?.instanceId;

// Validate instanceId exists
if ( ! this.instanceId ) {
Expand Down
7 changes: 7 additions & 0 deletions assets/src/js/godam-player/managers/hoverManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,13 @@ class HoverManager {
* Sets up event listeners for the appropriate behavior.
*/
init() {
// Hover behaviour is incompatible with autoplay – skip initialisation
// entirely so shortcodes/WPBakery/cached blocks with a stale hoverSelect
// value cannot start hover mode on an autoplay-enabled player.
if ( this.videoElement.dataset.autoplayOnView === 'true' || this.player.autoplay() ) {
return;
}

if ( this.hoverSelect === 'start-preview' ) {
this.setupPreview();
} else if ( this.hoverSelect === 'show-player-controls' ) {
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: 1.8.0
* Version: 1.9.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', '1.8.0' );
define( 'RTGODAM_VERSION', '1.9.0' );
}

if ( ! defined( 'RTGODAM_API_BASE' ) ) {
Expand Down
24 changes: 15 additions & 9 deletions inc/templates/godam-player.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,19 @@ function () use ( $godam_player_wrapper_css ) {
);

// attributes.
$godam_autoplay = ! empty( $attributes['autoplay'] );
$godam_controls = isset( $attributes['controls'] ) ? $attributes['controls'] : true;
$godam_loop = ! empty( $attributes['loop'] );
$godam_muted = ! empty( $attributes['muted'] );
$godam_poster = ! empty( $attributes['poster'] ) ? esc_url( $attributes['poster'] ) : '';
$godam_hover_select = isset( $attributes['hoverSelect'] ) ? $attributes['hoverSelect'] : 'none';
$godam_autoplay = ! empty( $attributes['autoplay'] );
$godam_controls = isset( $attributes['controls'] ) ? $attributes['controls'] : true;
$godam_loop = ! empty( $attributes['loop'] );
$godam_muted = ! empty( $attributes['muted'] );
$godam_poster = ! empty( $attributes['poster'] ) ? esc_url( $attributes['poster'] ) : '';
$godam_hover_select = isset( $attributes['hoverSelect'] ) ? $attributes['hoverSelect'] : 'none';

// Autoplay and hover modes are mutually exclusive – reset hover to 'none' so
// the frontend player never initialises hover behaviour on autoplay videos,
// regardless of the stored block/shortcode attribute value.
if ( $godam_autoplay ) {
$godam_hover_select = 'none';
}
$godam_caption = ! empty( $attributes['caption'] ) ? esc_html( $attributes['caption'] ) : '';
$godam_tracks = ! empty( $attributes['tracks'] ) ? $attributes['tracks'] : array();
$godam_show_share_btn = ! empty( $attributes['showShareButton'] );
Expand Down Expand Up @@ -143,9 +150,8 @@ function () use ( $godam_player_wrapper_css ) {
'post_type' => 'attachment',
'posts_per_page' => 1,
'post_status' => 'any',
'meta_key' => '_godam_original_id',
// phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key,WordPress.DB.SlowDBQuery.slow_db_query_meta_value -- Required for finding attachment by GoDAM ID.
'meta_value' => sanitize_text_field( $godam_attachment_id ),
'meta_key' => '_godam_original_id', // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key,WordPress.DB.SlowDBQuery.slow_db_query_meta_value -- Required for finding attachment by GoDAM ID.
'meta_value' => sanitize_text_field( $godam_attachment_id ), // phpcs:ignore WordPress.DB.SlowDBQuery.slow_db_query_meta_key,WordPress.DB.SlowDBQuery.slow_db_query_meta_value -- Required for finding attachment by GoDAM ID.
'fields' => 'ids',
)
);
Expand Down
Loading
Loading