Using the iFrame tags for a video file downloads the file instead of embedding it when using Blogs

Issue

  • If the iFrame tag is used to embed a video (.mp4) file within Blogs, the file is downloaded, instead of being embedded to be played.

 

Environment

  • Liferay DXP 7.3

 

Resolution

  • According to the documentation for iframe, the iFrame tag is best used for embedding PDFs and external website links.
  • It is preferred to use the <video> tag when embedding videos such as MP4, WebM and OGG formats
  • This is an example of a video tag that can be used to embed an internally uploaded video file in blogs:
<video controls width="640" height="360">
<source src="[URL to video]"
type="video/mp4">
</video>
  • Please note that there is a known issue in updates before Update 7 that the Blogs widget was stripping video tags when toggling between the HTML view and normal view. This has been resolved as of Update 7.
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0