add video embed

This commit is contained in:
nicwands 2026-06-29 14:10:17 -04:00
parent f122cfd5fb
commit ace7619b59
7 changed files with 1385 additions and 2 deletions

View file

@ -28,6 +28,9 @@ const config = ({
},
},
},
oembed: {
enabled: true,
},
});
export default config;

1350
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -25,6 +25,7 @@
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.0.0",
"strapi-plugin-oembed": "^2.0.2",
"strapi-v5-plugin-populate-deep": "^4.3.2",
"styled-components": "^6.0.0"
},

View file

@ -40,7 +40,8 @@
"components": [
"global.copy",
"global.media",
"global.dipytch"
"global.dipytch",
"global.embedded-video"
]
}
}

View file

@ -0,0 +1,15 @@
{
"collectionName": "components_global_embedded_videos",
"info": {
"displayName": "Embedded Video",
"icon": "cast"
},
"options": {},
"attributes": {
"video": {
"type": "customField",
"customField": "plugin::oembed.oembed"
}
},
"config": {}
}

View file

@ -35,6 +35,18 @@ export interface GlobalDipytch extends Struct.ComponentSchema {
};
}
export interface GlobalEmbeddedVideo extends Struct.ComponentSchema {
collectionName: 'components_global_embedded_videos';
info: {
displayName: 'Embedded Video';
icon: 'cast';
};
attributes: {
video: Schema.Attribute.JSON &
Schema.Attribute.CustomField<'plugin::oembed.oembed'>;
};
}
export interface GlobalLink extends Struct.ComponentSchema {
collectionName: 'components_global_links';
info: {
@ -79,6 +91,7 @@ declare module '@strapi/strapi' {
'global.copy': GlobalCopy;
'global.descriptive-list': GlobalDescriptiveList;
'global.dipytch': GlobalDipytch;
'global.embedded-video': GlobalEmbeddedVideo;
'global.link': GlobalLink;
'global.media': GlobalMedia;
'global.seo': GlobalSeo;

View file

@ -486,7 +486,7 @@ export interface ApiMosaicItemMosaicItem extends Struct.CollectionTypeSchema {
};
attributes: {
content: Schema.Attribute.DynamicZone<
['global.copy', 'global.media', 'global.dipytch']
['global.copy', 'global.media', 'global.dipytch', 'global.embedded-video']
>;
createdAt: Schema.Attribute.DateTime;
createdBy: Schema.Attribute.Relation<'oneToOne', 'admin::user'> &