|
|
@@ -285,12 +285,17 @@ const Video = { |
|
|
|
view({attrs}) { |
|
|
|
const classList = VideoOptions.getClassListFor(attrs.username) |
|
|
|
const rpc = State.rpcs[attrs.username] || {iceConnectionState: null} |
|
|
|
const options = VideoOptions.getFor(attrs.username) |
|
|
|
return m('.video-container', {class: classList, oncreate: ({dom}) => Video.keepRatio.observe(dom)}, |
|
|
|
m('.video-meta', |
|
|
|
m('span.video-source', attrs.username), |
|
|
|
m('.video-state', rpc.iceConnectionState), |
|
|
|
), |
|
|
|
m('video', {playsinline: true, oncreate: Video.appendStream(attrs)}), |
|
|
|
m('video', { |
|
|
|
playsinline: true, |
|
|
|
oncreate: Video.appendStream(attrs), |
|
|
|
ondblclick: VideoOptions.toggle(options, 'full-screen'), |
|
|
|
}), |
|
|
|
) |
|
|
|
}, |
|
|
|
} |