Skip to content

Commit

Permalink
Increment version and update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolashmln committed Dec 9, 2023
1 parent fdbe2b8 commit 641d2a9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ If you paste the url `https://www.youtube.com/watch?v=tkiOqSTVGds` in the modal,
- Tiktok
- Soundcloud
- Spotify
- Twitter

Feel free to submit a PR with the provider you want, you just have to edit this file: `server/services/oembed.js`.

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "strapi-plugin-oembed",
"version": "1.1.0",
"version": "1.2.0",
"description": "Embed content from third party sites (YouTube, Vimeo, SoundCloud, Spotify...) in Strapi",
"strapi": {
"name": "oembed",
Expand Down Expand Up @@ -35,7 +35,7 @@
"@strapi/strapi": "^4.4.0"
},
"engines": {
"node": ">=14.19.1 <=18.x.x",
"node": ">=14.19.1 <=20.x.x",
"npm": ">=8.0.0"
},
"license": "MIT"
Expand Down
10 changes: 5 additions & 5 deletions server/services/oembed.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ module.exports = (
break;

case 'twitter.com':
fetchedData = await axios.get(`https://publish.twitter.com/oembed?url=${encodeURIComponent(url)}`).then(res => res.data);
title = fetchedData.author_name;
mime = 'text/twitter';
thumbnail = null; // Twitter oEmbed may not provide a thumbnail
break;
fetchedData = await axios.get(`https://publish.twitter.com/oembed?url=${encodeURIComponent(url)}`).then(res => res.data);
title = fetchedData.author_name;
mime = 'text/twitter';
thumbnail = null; // Twitter oEmbed may not provide a thumbnail
break;

case 'soundcloud.com':
fetchedData = await axios.get(`https://www.soundcloud.com/oembed?url=${encodeURIComponent(url)}&format=json`).then(res => res.data);
Expand Down

0 comments on commit 641d2a9

Please sign in to comment.