| @@ -148,7 +148,7 @@ const Video = { | |||
| fontSize: 'xxx-large', | |||
| } | |||
| const styleVideo = { | |||
| objectFit: 'contain', // cover | |||
| objectFit: 'contain', | |||
| width: '100%', | |||
| height: '100%', | |||
| transform: 'scaleX(-1)', | |||
| @@ -159,6 +159,10 @@ const Video = { | |||
| ), | |||
| m('video[playsinline][autoplay]', { | |||
| style: styleVideo, | |||
| onclick: ({target: {style}}) => { | |||
| const level = style.objectFit === 'contain' | |||
| style.objectFit = ['contain', 'cover'][+level] | |||
| }, | |||
| oncreate: this.setUp(username), | |||
| onremove: this.tearDown(username), | |||
| }), | |||