How to include a Microsoft Stream video on embedded help?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2018 11:02 AM
We're upgrading to Kingston and we became aware of the embedded help, we'd like to include videos in here, but instead of hosting them on youtube or vimeo we'd like to host on Microsoft Stream as we have more control over them.
I've played with the embed code and funny thing is that when I paste it, I am able to get it to work on the editor, but when I save it, the whole <div> section gets cleared out except for a few parameters:
Code working in editor:
<p>Here is where we can explain how to create a KB article in detail.</p>
<div class="video"><iframe src="https://web.microsoftstream.com/embed/video/cc042a5a-339c-45f6-8106-b9ffbe1b48c7?autoplay=false&showinfo=false" frameborder="0" allowfullscreen=""></iframe>
<p class="p">Video</p>
</div>
<p> </p>
After saving the record I see this:
<p> </p>
<p>Here is where we can explain how to create a KB article in detail.</p>
<div class="video"><iframe frameborder="0" allowfullscreen=""></iframe>
<p class="p">Video</p>
</div>
Is this the html sanitizer at work? I tried adding a video entry to the whitelist, but it doesn't seem to work:
video: {
attribute:["controls","width","height","src"],
}
Anyone tried embedding videos and had better luck? Any pointers you can give me?
Thanks!
- Labels:
-
Knowledge Management

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2018 11:28 AM
Did you whitelist the attributes of iframe. I updated HTMLSanitizerConfig as shown below and it worked.
HTML_WHITELIST : {
globalAttributes: {
attribute:[],
attributeValuePattern:{}
},
iframe: {
attribute: ["width", "height", "src", "frameborder", "allowfullscreen"],
attributeValuePattern:{}
}
},
Thanks,
Rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2018 11:36 AM
Thanks but that didn't work; if I replace the src part with a youtube video it saves fine. It's almost as if the source is removed if video is not hosted on youtube or vimeo.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2018 11:41 AM
Have you tried setting a value pattern for src attribute that matches the given URL like the below.
attributeValuePattern:{src:".*"}
Thanks,
Rajesh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-14-2018 12:47 PM
it didn't work. I'll open a ticket with SN.
Thanks for your help!