Skip to content

Conversation

@KMchaudhary
Copy link
Collaborator

@KMchaudhary KMchaudhary commented Nov 12, 2025

This pull request introduces Youzify integration into the GoDAM plugin, allowing GoDAM to replace Youzify's default media players with its own for both video and audio posts in the BuddyPress activity stream. The integration includes backend logic, frontend initialization, and build configuration updates to support dynamic player loading.

Youzify Integration

  • Added the new Youzify integration class in inc/classes/youzify/class-youzify.php, which hooks into Youzify filters to replace wall video and audio players with GoDAM's players, and conditionally enqueues a frontend observer script for activity pages.
  • Registered and loaded the Youzify integration in the main plugin class (inc/classes/class-plugin.php), including autoloader support. [1] [2] [3] [4]

Frontend Player Initialization

  • Added assets/src/js/youzify-activity-observer.js, which uses a MutationObserver to automatically initialize GoDAM players in dynamically added Youzify activity containers on the page.

Build System Updates

  • Updated webpack.config.js to build and output the new youzify-activity-observer script for frontend use. [1] [2]

GoDAM

@KMchaudhary KMchaudhary marked this pull request as ready for review November 13, 2025 12:55
Copilot AI review requested due to automatic review settings November 13, 2025 12:55
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds Youzify integration to the GoDAM plugin, enabling GoDAM's media players to replace Youzify's default video and audio players in BuddyPress activity streams. The integration includes server-side hooks, client-side player initialization via MutationObserver, and modal popup functionality for media pages.

  • Added a new Youzify integration class that hooks into Youzify's filters and enqueues frontend scripts
  • Implemented JavaScript observers to dynamically initialize GoDAM players in Youzify activity containers
  • Added modal popup functionality with player controls for Youzify media pages

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
webpack.config.js Added two new build configurations for Youzify activity observer and media page scripts
inc/helpers/autoloader.php Added 'youzify' case to autoloader for class file discovery
inc/classes/class-plugin.php Integrated Youzify class initialization in the main plugin bootstrap
inc/classes/youzify/class-youzify.php New integration class that replaces Youzify players with GoDAM players and handles script enqueuing
assets/src/js/youzify-activity-observer.js MutationObserver script that automatically initializes GoDAM players in dynamically added content
assets/src/js/youzify-media-page.js Handles media item processing and modal popup functionality for video playback
assets/src/css/youzify-media-page.scss Styles for modal popup, media items, and responsive layouts
Comments suppressed due to low confidence (1)

webpack.config.js:238

  • Avoid automated semicolon insertion (97% of all statements in the enclosing script have an explicit semicolon).
}

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

/**
* Process a single media item
*
* @param {HTMLElement} item The media item element
Copy link

Copilot AI Nov 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing JSDoc return type annotation. The function should document that it returns void or nothing.

Suggested change
* @param {HTMLElement} item The media item element
* @param {HTMLElement} item The media item element
* @returns {void}

Copilot uses AI. Check for mistakes.
@subodhr258
Copy link
Collaborator

LGTM, we have tested as well
Please take a look at the new Copilot comments

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants