Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@oplayer/torrent

isbailin359MIT1.2.25-beta.2TypeScript support: included

Torrent plugin for oplayer.

oplayer-plugin, torrent

readme

oplayer-plugin-torrent

npm npm bundle size npm dm jsdelivr

WebTorrent plugin for oplayer

Install

npm i @oplayer/core @oplayer/torrent webtorrent@0.98.18
<script src="https://cdn.jsdelivr.net/npm/@oplayer/core@latest/dist/index.min.js"></script>
<!--  webtorrent FIRST  -->
<script src="https://cdn.jsdelivr.net/npm/webtorrent@0.98.18/webtorrent.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@oplayer/torrent@latest/dist/index.min.js"></script>

<div id="oplayer" />

<script>
  OPlayer.make('#oplayer', {
    source: {
      src: 'http://example.com/live/livestream.ts',
      poster: 'https://cdn.jsdelivr.net/gh/shiyiya/QI-ABSL@master/o/poster.png'
    }
  })
    .use([OTorrent()])
    .create()
</script>