Issue #2250πŸ’¬ AnsweredOpened Sep 6, 2019by smik30 reactions

Issue with automatically assigning poster on video elements

Quick answerby artf

Hi @smik3 generally if you have an issue you would need to recreate it inside a live demo. BTW, first of all, use the improved API for component definition because this: is definitly wrong (with this API isComponent method is mandatory...), so you would need something like this and then you shouldn't update the value...

Read full answer below ↓

Question

1st of all really enjoying all that Grapes has to offer once you've worked through the starting stumbling blocks! I have a small issue atm regarding videos. I am passing them to the Asset manager with a thumbnail property, which is then applied to the video poster trait when the src is updated. The only problem is this doesn't seem to actually work until the src is changed a couple of times, and then it only applies to the view and not the exported html. Here's my current code from my plugin... and the block simply as I'm guessing I'm just missing a bit of logic in the component model, but no...

Answers (2)

artfβ€’ Sep 9, 2019

Hi @smik3 generally if you have an issue you would need to recreate it inside a live demo. BTW, first of all, use the improved API for component definition because this: is definitly wrong (with this API isComponent method is mandatory...), so you would need something like this and then you shouldn...

smik3β€’ Sep 17, 2019

Thanks for the response, should have seen that chnge! I now have the opposite problem, in that it's applying the changes to the model (and the export/final code) but if the video block is placed within another block, the view just shows a blank component. For customising what gets shown in the canv...

Related Questions and Answers

Continue research with similar issue discussions.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Free option

Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.

Browse free plugins β†’
Premium option

Premium plugins ship with support, regular updates, and production-ready features β€” save days of integration work.

Browse premium plugins β†’

Related tutorials

In-depth guides on the same topic.

All tutorials β†’

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.