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>
<script src="https://cdn.jsdelivr.net/npm/@oplayer/torrent@latest/dist/index.min.js"></script>
<div id="oplayer" />
<script>
OPlayer.make('#oplayer', {
source: {
title: 'sintel',
src: 'https://webtorrent.io/torrents/sintel.torrent',
poster: 'https://cdn.jsdelivr.net/gh/shiyiya/QI-ABSL@master/o/poster.png'
}
})
.use([OTorrent({ library: 'https://cdn.jsdelivr.net/npm/webtorrent@0.98.18/webtorrent.min.js' })])
.create()
</script>