2018-01-21 04:20:33 +00:00
|
|
|
import VideoDialog from '../_components/VideoDialog.html'
|
|
|
|
|
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()
|
|
|
|
}
|