How can i have / embed a video on the service portal front end?

thiraj
Tera Contributor

Hi Team,

I would like to have a video posted on the front end of the service portal. So when a user logs in, the video should be playing on the side of the service portal. I know that we can create a widget for this but i have zero idea on how to do it and all the coding.

Concerns -

1. Where can i store the video? Can i store it within servicenow?

2. Is there a sample code i can follow because i think i need server scrip, client script and css.

3. Can i change the video based on different logged in users?

All help is appreciated. I have not done this before and i would love if anyone has any idea on how to code for the widgets or experience doing something like this in their own environment.

Thank you!

9 REPLIES 9

Alexandre Sing2
Kilo Expert

Hello Thiraj,



-> You can add a Video to your ServiceNow instance video data base



(just type video in the application navigator, it works the same as for images, name of the video must be the same as name of the file and there are restrictions on video types allowed, which you can configure, but the best is just stick to mp4)



then you can retreive this video on html fields, click the "Add Video" Button on the TinyMCE editor, then selected "Video Library" as a source, and select your video. Video should lauch automatically so you should add controls to it, use ServiceNow Guru's example :



<p><video controls="controls" width="560" height="315"><source src="/sys_attachment.do?sys_id=<my_sys_id>&amp;view=true" type="video/mp4" /></video></p>



-> You can also add a Video as an attachment to your record, but you may not retreive it from from the "Add Video" button, there is a Snow PRB on this one that should be fixed with London release. Instead, you should retreive your attachment's sys_id and paste it in a custom code when you view source code of your html field.



And don't forget to configure your HTMLSanitizer.



Explained on ServiceNow Guru.


Michael-PHL
Tera Guru

I read this and was having trouble with the HTML Widget allowing videos to be attached/played.  I decided to create a Video Embed widget to just drop into the page, which different options, such as autoplay, width, height, and also allows selection from the Video Database in ServiceNow. 

 

I posted it here on ServiceNow Share

Hello Mike,

I wrote a guide to help with adding a video to the portal 

https://community.servicenow.com/community?id=community_blog&sys_id=93239a41dbf21890a08a1ea6689619b4

I know, and it did help me create the widget, but since we are going to add a lot of videos, I figured I would just make a re-usable widget, and thought I would just share it for anyone else that wants to use it.

AWESOME!