Video render doesn't output anything
Hi,
I use the renderer to display images - and it works fine. The image html is rendered. However when attaching a video nothing gets rendered from the output data. And when adding it via editor.js it works fine - vid uploads, html rendered, you can play the video.


This is html rendered for an image:


This is html rendered for a video. No video appears.

Thanks in advance for your help, Pawel
@pacid
Your video data uses an image format, which is incorrect. Ideally the data passed to ERR should be generated by one of the editor.js plugins (See Supported blocks section on NPM).
If your data is generated in other ways, it should take same format. For videos, see Simple Video plugin and/or Embed plugin.
In this case (using pasted URLs), your data should look like this
type SimpleVideoData = {
type: 'video'
data: {
url: string
caption?: string
autoplay?: bool
controls?: bool
muted?: bool
stretched?: bool
}
}
I am using
import VideoTool from "@weekwood/editorjs-video";
as it allows to upload the videos and the simple one only "Works only with pasted videos and URLs and requires no server-side uploader"
Now switched to SimpleVideo, pasted the video and then rendered in a post it looks like that:

On the site:

Definitely would like to have some player here after the video file has been uploaded. I understand that I can create a custom renderer, would you recommend any 3rd party vid players that I could harness here and use on the site to embed it?
I would even use this one that is from the above library that I added. (this is when I am using @weekwood/editorjs-video)
As it works okay. Just not sure how to go about adding it as a custom renderer.
I think it's this one https://github.com/CookPete/react-player, so might just add this as a renderer for this specific block.
Thanks for your help.
@pacid
V3.5.0 should now have support for @weekwood/editorjs-video