Try our conversational search powered by Generative AI!

How to add a video in a content area

Vote:
 

I want to allow a video as an item in my content area.

Please let me know the process of how a video can be added into it

#228378
Sep 24, 2020 14:49
Vote:
 

Hi Tanvi,

You can allow video items on ContentArea by the below code and then write logic on the view to render it.

[AllowedTypes(AllowedTypes = new [] { typeof(VideoData) })]
public virtual ContentArea RelatedContentArea { get; set; }

But I suggest you create a new block type called VideoBlock and then create its own controller/view and then it will work as a normal block.

#228403
Sep 25, 2020 4:28
Vote:
 

We can add an Iframe in the view and in its src property we can add the embedded url available from the video

#229214
Oct 09, 2020 7:02
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.