1.6.15 • Published 4 years ago

griffith-standalone-justcome v1.6.15

Weekly downloads
1
License
MIT
Repository
-
Last release
4 years ago

griffith-standalone

English | 简体中文

Griffith bundled with React, React DOM and other dependencies. You can use it by add a script tag in your HTML file.

<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 sources = {
    hd: {
      play_url: 'https://zhstatic.zhihu.com/cfe/griffith/zhihu2018_hd.mp4',
    },
    sd: {
      play_url: 'https://zhstatic.zhihu.com/cfe/griffith/zhihu2018_sd.mp4',
    },
  }

  // create player instance
  const player = Griffith.createPlayer(target)

  // load video
  player.render({sources})

  // dispose video
  player.dispose()
</script>

Read Griffith docs to know about props.

1.6.15

4 years ago

1.6.11

4 years ago

1.6.13

4 years ago

1.6.12

4 years ago

1.6.14

4 years ago

1.6.2

4 years ago