oplayer-plugin-torrent
(opens in a new tab) (opens in a new tab) (opens in a new tab)
WebTorrent (opens in a new tab) plugin for oplayer
Install
MUST webtorrent@0.98.18
# webtorrent@0.98.18 !!
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>