瀏覽代碼

Fullscreen shortcut

master
Roderic Day 5 年之前
父節點
當前提交
6646bd6d75
共有 1 個檔案被更改,包括 6 行新增1 行删除
  1. +6
    -1
      pico.js

+ 6
- 1
pico.js 查看文件

view({attrs}) { view({attrs}) {
const classList = VideoOptions.getClassListFor(attrs.username) const classList = VideoOptions.getClassListFor(attrs.username)
const rpc = State.rpcs[attrs.username] || {iceConnectionState: null} 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)}, return m('.video-container', {class: classList, oncreate: ({dom}) => Video.keepRatio.observe(dom)},
m('.video-meta', m('.video-meta',
m('span.video-source', attrs.username), m('span.video-source', attrs.username),
m('.video-state', rpc.iceConnectionState), 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'),
}),
) )
}, },
} }

Loading…
取消
儲存