Support for video in knowledge articles seems like it should be pretty straightforward but unfortunately history has proven otherwise. Standards have been shifting over time and the methods for displaying video in HTML have had varying levels of support depending on the browser. By default ServiceNow only supports out-of-date plugin methods of embedding video. While video support can certainly stand for some updating by ServiceNow, there are a few steps that can be taken now to allow for functional video use.

This method enables video to be used across the board in the HTML editor so it can be added wherever it is needed. It uses the HTML5 video tag and does require the user to be at least a little familiar with HTML but at this point that is difficult to avoid.


The first thing to do is whitelist the video and source tags in the HTMLSanitizerConfig script include. To do this replace this:

HTML_WHITELIST : {
  globalAttributes: {
    attribute:[],
    attributeValuePattern:{}
  },
},

With this:

HTML_WHITELIST : {
  globalAttributes: {
    attribute:[],
    attributeValuePattern:{}
  },
  video: {
    attribute:["width", "height", "controls", "autoplay", "loop", "muted", "poster", "preload", "src"],
    attributeValuePattern:{}
  },
  source: {
    attribute:["type", "src", "media", "sizes"],
    attributeValuePattern:{}
  }
},

To embed a video, open the article (or other record with an HTML field) and upload the video file.

Get the Sys ID of the attachment. An easy way that end users can do this is by clicking the “View” link next to the attachments.

Then copy the Sys ID from the URL.

Next click the “<>” icon to view the HTML source.

Paste in the following code, changing the value for the Sys ID parameter to that of the attachment.

<video controls="controls" width="100%" height="150">
  <source src="/sys_attachment.do?sys_id=[Sys ID of the attachment goes here]&amp;view=true" type="video/mp4" />
</video>

NOTE: mp4 video looks to have the best support across browsers at the time of writing. The video tag has a number of options that allow for tailoring the content to the browser, device size, and other things as needed.