Skip to content

Commit

Permalink
feat(full): add torrent
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyiya authored Jun 3, 2024
1 parent 4c2e6a9 commit f21ec87
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

⚡ Oh! Another HTML5 video player. Do More, Keep it simple.

[📕 Documentation](https://oplayer.vercel.app) | [🧡 Donate](#support) | [💜 Contributing](./CONTRIBUTING.md) | [🎈 Demo](https://oplayer.vercel.app/oplayer.html?playlist=%5B%7B%22title%22%3A%22Disney's%2BOceans%2B-%2BMP4%22%2C%22src%22%3A%22https%3A%2F%2Fvjs.zencdn.net%2Fv%2Foceans.mp4%22%2C%22poster%22%3A%22https%3A%2F%2Fvjs.zencdn.net%2Fv%2Foceans.png%22%2C%22duration%22%3A%2200%3A46%22%7D%2C%7B%22title%22%3A%22Big%2BBuck%2BBunny%2B-%2BHLS%22%2C%22src%22%3A%22https%3A%2F%2Ftest-streams.mux.dev%2Fx36xhzz%2Fx36xhzz.m3u8%22%2C%22poster%22%3A%22https%3A%2F%2Fd2zihajmogu5jn.cloudfront.net%2Fbig-buck-bunny%2Fbbb.png%22%2C%22duration%22%3A%2210%3A34%22%7D%2C%7B%22title%22%3A%22Big%2BBuck%2BBunny%2B-%2BDASH%22%2C%22src%22%3A%22https%3A%2F%2Fdash.akamaized.net%2Fakamai%2Fbbb_30fps%2Fbbb_30fps.mpd%22%2C%22poster%22%3A%22https%3A%2F%2Fd2zihajmogu5jn.cloudfront.net%2Fbig-buck-bunny%2Fbbb.png%22%2C%22duration%22%3A%2210%3A34%22%7D%2C%7B%22title%22%3A%22torrent%22%2C%22src%22%3A%22https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent%22%2C%22poster%22%3A%22%22%2C%22duration%22%3A%2214%3A48%22%7D%5D&p=1)
[📕 Documentation](https://oplayer.vercel.app) | [🧡 Donate](#support) | [💜 Contributing](./CONTRIBUTING.md) | [🎈 Demo](https://oplayer.vercel.app/oplayer.html?playlist=%5B%7B%22title%22%3A%22Disney's%20Oceans%20-%20MP4%22%2C%22src%22%3A%22https%3A%2F%2Fvjs.zencdn.net%2Fv%2Foceans.mp4%22%2C%22poster%22%3A%22https%3A%2F%2Fvjs.zencdn.net%2Fv%2Foceans.png%22%2C%22duration%22%3A%2200%3A46%22%7D%2C%7B%22title%22%3A%22Big%20Buck%20Bunny%20-%20HLS%22%2C%22src%22%3A%22https%3A%2F%2Ftest-streams.mux.dev%2Fx36xhzz%2Fx36xhzz.m3u8%22%2C%22poster%22%3A%22https%3A%2F%2Fd2zihajmogu5jn.cloudfront.net%2Fbig-buck-bunny%2Fbbb.png%22%2C%22duration%22%3A%2210%3A34%22%7D%2C%7B%22title%22%3A%22Big%20Buck%20Bunny%20-%20DASH%22%2C%22src%22%3A%22https%3A%2F%2Fdash.akamaized.net%2Fakamai%2Fbbb_30fps%2Fbbb_30fps.mpd%22%2C%22poster%22%3A%22https%3A%2F%2Fd2zihajmogu5jn.cloudfront.net%2Fbig-buck-bunny%2Fbbb.png%22%2C%22duration%22%3A%2210%3A34%22%7D%2C%7B%22title%22%3A%22Torrent%22%2C%22src%22%3A%22https%3A%2F%2Fwebtorrent.io%2Ftorrents%2Fsintel.torrent%22%2C%22poster%22%3A%22%22%2C%22duration%22%3A%2214%3A48%22%7D%5D&p=1)

[![npm](https://img.shields.io/npm/v/@oplayer/core?style=flat-square)](https://www.npmjs.com/package/@oplayer/core)
[![npm dt](https://img.shields.io/npm/dm/@oplayer/core?style=flat-square)](https://www.npmjs.com/package/@oplayer/core)
Expand Down
1 change: 0 additions & 1 deletion packages/docs/public/oplayer.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
<div id="oplayer"></div>
<script src="https://cdn.jsdelivr.net/npm/@oplayer/full@latest/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@oplayer/plugins@latest/dist/index.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@oplayer/[email protected]/dist/index.min.js"></script>
<script src="./oplayer.js"></script>
</body>
</html>
8 changes: 5 additions & 3 deletions packages/full/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@oplayer/full",
"version": "0.0.0",
"version": "0.0.1",
"description": "all loader in one",
"type": "module",
"main": "./dist/index.min.js",
Expand All @@ -24,12 +24,14 @@
"@oplayer/dash": "workspace:*",
"@oplayer/hls": "workspace:*",
"@oplayer/mpegts": "workspace:*",
"@oplayer/ui": "workspace:*"
"@oplayer/ui": "workspace:*",
"@oplayer/torrent": "workspace:*"
},
"peerDependencies": {
"hls.js": "*",
"dashjs": "*",
"mpegts.js": "*"
"mpegts.js": "*",
"webtorrent": "0.98.18"
},
"files": [
"dist"
Expand Down
2 changes: 2 additions & 0 deletions packages/full/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import ui from '@oplayer/ui'
import hls from '@oplayer/hls'
import dash from '@oplayer/dash'
import mepgts from '@oplayer/mpegts'
import torrent from '@oplayer/torrent'

import Player from '@oplayer/core'

Expand All @@ -13,4 +14,5 @@ if (globalThis.window) {
;(globalThis.window as any).OHls = hls
;(globalThis.window as any).ODash = dash
;(globalThis.window as any).OMpegts = mepgts
;(globalThis.window as any).OTorrent = torrent
}
1 change: 0 additions & 1 deletion packages/full/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { plugin } from 'vite-plugin-merge-exports'

export default viteConfig('full', {
build: {
emptyOutDir: false,
lib: {
name: 'OPlayer',
formats: ['umd']
Expand Down
6 changes: 6 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f21ec87

Please sign in to comment.