Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 609 Bytes

README-zh-Hans.md

File metadata and controls

27 lines (20 loc) · 609 Bytes

griffith-standalone

English | 简体中文

包含了 React 等所有依赖的 Griffith。可以直接在 HTML 文件中添加 script 标签来使用。

<div id="player"></div>
<script
  crossorigin
  src="https://unpkg.com/griffith-standalone/dist/index.umd.min.js"
></script>
<script>
  const target = document.getElementById('player')

  // 创建播放器
  const player = Griffith.createPlayer(element)

  // 载入视频
  player.render(props)

  // 销毁视频
  player.dispose()
</script>

props 的定义请看 Griffith 的文档