play videos big

This commit is contained in:
Nolan Lawson 2018-02-04 15:08:34 -08:00
parent 1152d96289
commit 6e2fa24261
3 changed files with 4 additions and 8 deletions

View File

@ -5,7 +5,7 @@
<button type="button"
class="play-video-button"
aria-label="Play video: {{media.description || ''}}"
on:click="onClickPlayVideoButton(media, getSmallWidth(media), getSmallHeight(media), media.description)">
on:click="onClickPlayVideoButton(media, media.description)">
<div class="svg-wrapper">
<svg>
<use xlink:href="#fa-play-circle" />
@ -132,8 +132,8 @@
maxMediaWidth: (mediaAttachments) => Math.max.apply(Math, mediaAttachments.map(media => media.meta && media.meta.small && typeof media.meta.small.width === 'number' ? media.meta.small.width : DEFAULT_MEDIA_WIDTH))
},
methods: {
async onClickPlayVideoButton(media, width, height, description) {
showVideoDialog(media.preview_url, media.url, width, height, description)
async onClickPlayVideoButton(media, description) {
showVideoDialog(media.preview_url, media.url, description)
}
},
events: {

View File

@ -1,8 +1,6 @@
<ModalDialog :shown>
<video poster="{{poster}}"
src="{{src}}"
width="{{width}}"
height="{{height}}"
aria-label="Video: {{description || ''}}"
controls
/>

View File

@ -1,14 +1,12 @@
import VideoDialog from '../_components/status/VideoDialog.html'
import { createDialogElement } from './dialogs'
export function showVideoDialog(poster, src, width, height, description) {
export function showVideoDialog(poster, src, description) {
let videoDialog = new VideoDialog({
target: createDialogElement('Video dialog'),
data: {
poster: poster,
src: src,
width: width,
height: height,
description: description
}
})