pinafore/routes/_utils/showVideoDialog.js

20 lines
557 B
JavaScript
Raw Normal View History

2018-01-28 00:35:44 +00:00
import VideoDialog from '../_components/status/VideoDialog.html'
2018-01-21 04:20:33 +00:00
2018-01-21 18:32:18 +00:00
export function showVideoDialog(poster, src, width, height, description) {
2018-01-21 04:20:33 +00:00
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,
2018-01-21 18:32:18 +00:00
height: height,
description: description
2018-01-21 04:20:33 +00:00
}
})
videoDialog.showModal()
}