Skip to content

Add support for TikTok video Embeds#19345

Merged
noisysocks merged 1 commit into
WordPress:masterfrom
audrasjb:add/tiktok-embed
Feb 9, 2020
Merged

Add support for TikTok video Embeds#19345
noisysocks merged 1 commit into
WordPress:masterfrom
audrasjb:add/tiktok-embed

Conversation

@audrasjb

@audrasjb audrasjb commented Dec 27, 2019

Copy link
Copy Markdown
Contributor

Description

Fixes #19342

This Pull Request adds TikTok oEmbed support.
For reference, see the related Trac ticket for WP 5.4: https://core.trac.wordpress.org/ticket/49083

How has this been tested?

Copy this test URL into the editor: https://www.tiktok.com/@scout2015/video/6718335390845095173

For reference:
TikTok oEmbed developer documentation: https://developers.tiktok.com/doc/Embed

Screenshots

screencapture-localhost-8888-testing-features-test4-wp-admin-post-php-2019-12-27-11_48_18

Types of changes

New feature (non-breaking change which adds functionality)
Introduce a oEmbed block support for a new resource: TikTok.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.

@audrasjb

audrasjb commented Dec 27, 2019

Copy link
Copy Markdown
Contributor Author

Fixes: #19342

@mkaz

mkaz commented Jan 1, 2020

Copy link
Copy Markdown
Member

Did not work for me.

Steps:

  1. Applied the patch, built Gutenberg
  2. Confirmed TikTok embed shows in block library
  3. Insert TikTok block and paste link: https://www.tiktok.com/@scout2015/video/6718335390845095173

Screenshot from 2020-01-01 08-21-17

In console:

Received HTML:

 index.js:287:17
Received plain text:

 https://www.tiktok.com/@scout2015/video/6718335390845095173 index.js:288:17
Processed HTML piece:

 <p>https://www.tiktok.com/@scout2015/video/6718335390845095173</p>

I confirmed other embeds work by embedding a YouTube video with no problems.

@jblz

jblz commented Jan 1, 2020

Copy link
Copy Markdown
Contributor

@mkaz -- I think this needs the core patch in https://core.trac.wordpress.org/ticket/49083 to work since it leverages the core embed block functionality.

@audrasjb

audrasjb commented Jan 1, 2020

Copy link
Copy Markdown
Contributor Author

Ah yes sorry @mkaz I forgot to mention it has to be tested with the core patch. Thanks @jblz !

@talldan talldan added [Block] Embed Affects the Embed Block [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement. New Block Suggestion for a new block labels Feb 4, 2020
@peterwilsoncc

Copy link
Copy Markdown
Contributor

I’m happy for the core ticket to go in to the WordPress 5.4 or 5.5 release.

If committed to 5.4 does that leave enough time for the editor changes to be committed too or do you need a little more time?

@audrasjb

audrasjb commented Feb 9, 2020

Copy link
Copy Markdown
Contributor Author

Hi there,
For information, my patch was merged in WordPress Core for 5.4: https://core.trac.wordpress.org/ticket/49083.

@jorgefilipecosta jorgefilipecosta left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Works well in my tests after the patch was committed 👍

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

Labels

[Block] Embed Affects the Embed Block New Block Suggestion for a new block [Status] In Progress Tracking issues with work in progress [Type] Enhancement A suggestion for improvement.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add support for TikTok videos

7 participants