pinafore/routes/_utils/showVideoDialog.js
Nolan Lawson c0c7e9fafe refactor
2018-01-27 16:35:44 -08:00

20 lines
557 B
JavaScript

import VideoDialog from '../_components/status/VideoDialog.html'
export function showVideoDialog(poster, src, width, height, description) {
let dialog = document.createElement('dialog')
dialog.classList.add('video-dialog')
dialog.setAttribute('aria-label', 'Video dialog')
document.body.appendChild(dialog)
let videoDialog = new VideoDialog({
target: dialog,
data: {
poster: poster,
src: src,
dialog: dialog,
width: width,
height: height,
description: description
}
})
videoDialog.showModal()
}