Skip to main content

Rendering video url on updates of an item - graphql

  • February 7, 2023
  • 3 replies
  • 453 views

Hi,

in similarity to this post:

i’m now trying to create the same thing just with video.

I’m attempting to push the following into the item updates:
1 \\n\\n<u>Attached video</u>:\\n <video src='${req.body.mediaLink}' controls />;
and it works, besides the video itself, there’s no trace of it. The result :
image
as you can see, everything’s included but the video, yet, when I am doing:
1 \\n\\n<u>Attached screenshot</u>:\\n <img src='${req.body.mediaLink}' />;

it works and renders the image.

any ideas?

3 replies

  • February 8, 2023

Hi @danieln,

Could you please let me know what you mean by video trace? What is the expected behavior?


  • Author
  • Participating Frequently
  • February 9, 2023

The expected behavior is to show embedded video in the update, similar to img, just with the possibility of playing it. In conclusion, similar action to <video></video> in html.


  • February 13, 2023

Hi @danieln,

You can use our Add file to Update mutation:

mutation {
    add_file_to_update (update_id: 17, $file: File!) {
        id
    }
}