Skip to content

Commit

Permalink
fix: add dynamic video type in save.js
Browse files Browse the repository at this point in the history
  • Loading branch information
pranvinit committed Nov 8, 2024
1 parent 3c83e8a commit 319757b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions assets/src/blocks/rt-player/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import { useBlockProps } from '@wordpress/block-editor';
* @return {HTMLElement} Element to render.
*/
export default function save( { attributes } ) {
const { videoUrl, videoAlt, videoSize, videoPosterUrl, useCustomSize } = attributes;
const { videoUrl, videoAlt, videoSize, videoType, videoPosterUrl, useCustomSize } = attributes;

const videoSetupOptions = {
controls: true,
Expand All @@ -44,7 +44,7 @@ export default function save( { attributes } ) {
width={ useCustomSize ? videoSize.width : '100%' }
height={ useCustomSize ? videoSize.height : 'auto' }
>
<source src={ videoUrl } type="video/mp4" />
<source src={ videoUrl } type={ videoType } />
</video>
</div>
) }
Expand Down

0 comments on commit 319757b

Please sign in to comment.