Skip to content

Allow private VideoPress videos to play when the URL is pasted on the Video Embed URL.#2566

Merged
ideadude merged 5 commits intogocodebox:devfrom
actuallyakash:videopress-issue
Jul 4, 2024
Merged

Allow private VideoPress videos to play when the URL is pasted on the Video Embed URL.#2566
ideadude merged 5 commits intogocodebox:devfrom
actuallyakash:videopress-issue

Conversation

@actuallyakash
Copy link
Copy Markdown
Contributor

@actuallyakash actuallyakash commented Nov 6, 2023

Description

Now private VideoPress videos can be played when used in Video Embed URL in a lesson/course.

Fixes #2533

How has this been tested?

Manually.

Types of changes

Bug fix.

Checklist:

  • This PR requires and contains at least one changelog file.
  • My code has been tested.
  • My code passes all existing automated tests.
  • My code follows the LifterLMS Coding & Documentation Standards.

@actuallyakash actuallyakash requested a review from a team November 6, 2023 11:31
@actuallyakash actuallyakash self-assigned this Nov 6, 2023
@actuallyakash actuallyakash changed the title Videopress issue Allow private VideoPress videos to play when the URL is pasted on the Video Embed URL. Nov 6, 2023
@actuallyakash actuallyakash marked this pull request as ready for review November 6, 2023 11:33
@brianhogg brianhogg requested review from brianhogg and removed request for a team April 3, 2024 13:46
@brianhogg brianhogg assigned brianhogg and unassigned actuallyakash Apr 3, 2024
@brianhogg brianhogg requested a review from ideadude as a code owner June 3, 2024 19:41
}
}

return null;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't need to return null here, could just return nothing.

// VideoPress Provider.
if ( is_plugin_active( 'jetpack-videopress/jetpack-videopress.php' ) ) {
if ( strpos( $host, 'videopress.com' ) !== false || strpos( $host, 'video.wordpress.com' ) !== false ) {
wp_enqueue_script( 'videopress-token-bridge', plugins_url() . '/jetpack-videopress/jetpack_vendor/automattic/jetpack-videopress/src/../build/lib/token-bridge.js', array(), llms()->version, true );
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm not exactly sure why we need to specify the complete URL here, but it works!

@brianhogg brianhogg added this to the Next Available Release milestone Jun 11, 2024
@ideadude ideadude merged commit 9ddd9fd into gocodebox:dev Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants