Displaying Video in the Rasa Webchat

Hi, I was trying to add this video feature but i am facing issue.

After i add the domain.yml code and run what i have observed is, it changes the format as follows

utter_video:

– attachment:

  payload:

    src: https://youtube.com/embed/9C1Km6xfdMA

  type: video

text: Hey! How are you?

And when I interact with the bot i get a blank page. And no error in the CLI

Hi ! I’m trying to do the same . Can you tell me how to customize the video size?

i think no option, may be a PR to rasa webchat project

1 Like

Hello @JiteshGaikwad,

How to autoplay these videos. i tried

link?autoplay=1

But video showed but not autoplayed. my issue is i want to connect it with a phone bot where pre recorded recordings should autoplay. Chrome and Firefox stops from autoplay but its not working in phone bot either.

I guess this works for Youtube videos, can you test with the below url, if it autoplays

https://www.youtube.com/embed/9C1Km6xfdMA?autoplay=1

Hello @JiteshGaikwad,

No it didnt worked. Although locally saved video files are autoplaying but when i m just trying to figure out a way to autoplay via a link or saved locally over GCP.

On my windows system i used this to make utterance worked for autoplay :

  utter_recording:
  - custom:
    attachment:
      type: video
      payload:
        src: fullpath/filename.mp4
      autoplay: true

It worked perfectly fine. But when i tried doing the same on GCP like this :

  utter_recording:
  - custom:
    attachment:
      type: video
      payload:
        src: /etc/rasa/files/video.mp4
      autoplay: true

I get this error in webchat widget :

Any luck finding solution either autoplay videos via link or local files on GCP will be very helpful.

hi @athenasaurav,

How did you play the video from your local ? I am getting error that Not allowed to load from local resource when trying to play the video from my local whereas youtube videos are getting played… Could you please help ?

Hi @vaidehi16 Which OS your are using.

First of all thanks for replying @athenasaurav… I am using windows 10

Then post your domain file here. It should work

domain.yml (18.5 KB)

This is the error i am getting in console…Not allowed to load from local resource… I even tried disabling chrome’s web security using flags etc… but still the same error…

image

the utterance should be like this :

  utter_response_sold_it:
  - custom:
    attachment:
      type: video
      payload:
        src: C:/Users/athen/Datascience/rasa/USA Brian/mood_bot/recordings/response_sold_it.mp3
      autoplay: true

It should be / not this \.

It’s the same error…

image

Did that change… still the same error…

Hi @vaidehi16, I m not sure but can you please try some link like this:

src : D:/Bot_Integration/code-analysis-full.mp4

No White spaces in the link. Make sure to change the folder name accordingly also.

yeah… tried that…still no luck :frowning:

I will check get back to you

Yeah sure…

Thanks in advance :slight_smile:

Hello @vaidehi16,

i m not having any issue with rasa webchat widget.

Here is an screenshot :

Are you trying to load it in rasa x. Because rasa x doesn’t supports videos but Botfront widget supports.

I am not using rasa x…

Also I am using REST channel.

image

Is this a custom widget?