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