I implemented a new Embed type to use in the TinyMCE editor to support our Communications group who wanted to assign a specific image as the Poster image for their videos. This was based on the conversation in this thread. https://community.telligent.com/community/10/f/ask-the-community/1145485/htmlsanitation-in-10-1. The extension works just as planned. It allows them to enter a URL to their video, a URL to their poster image and the size they want their video displayed. The output of the extension is the standard HTML5 <video> code using their poster image.
The one issue I have noted is that this embed extension is not displayed correctly when the item is displayed in the Activity Story Stream or the Blog - Post List widgets. The <video> and <source> tags have been scrubbed from the output, leaving only the alternative text that was inside the <video> tag for browsers that do not support HTML5 <video> tags.
I also created what is essentially an identical extension for embedding <audio> into the TinyMCE. Same thing here. It displays fine in the post itself, but only shows the alternative text with the <audio> and <source> tags scrubbed from the output when it shows up in the Activity Story Stream or Blog - Post List widgets.
Is there something I missed in the implementation? Or there something that needs to be done in those widgets? Or ...
You may want to review the Filtering settings for your site and content types to ensure the embeddable is allowed and the tags being scrubbed are allowed.
Administration > Moderation > Filtering for the site level Filtering options
Administration > Applications > Content for the filtering that is specific to each type of content
Embedding has everything listed allowed which includes Embed code as well as MP3 and MP4 content, which makes sense considering that in the post display where the content was added, the embedded content shows up exactly as planned. It is not being filtered globally or I wouldn't expect it to show up there either.
Everything is also checked/allowed in the formatting section. I think this section is the reason I ended up doing the extension. In 8.5 I added all of the tags needed to the HTML Sanitation section of the community-override.config so we could just paste in our own <video> and <audio> right into the source of the TinyMCE editor. The ability to add that is not there in 10. So I would be interested in what the coding would look like to add my extra tags into this section if you could point me to an example of that.
But on the side, I have been taking a closer look at things. The examples of videos that show up in the lists were all "uploaded" video content. The "remote" video content is only displaying a link to the content. I am not sure I understand that difference either. But maybe my expectations are wrong. I am not sure.
At any rate, could you point me to an example of code that would allow me to add a new Formatting type to the Moderation > Filtering section? I would love to be able to continue supporting the pasting in of the video tags straight into the TinyMCE Source editor. Particularly the coding that is already there in posts from 8.5.