-
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
146 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import Md from '../../../../README.md' | ||
|
||
![oplayer-mobile](https://cdn.jsdelivr.net/gh/shiyiya/QI-ABSL@master/o/oplayer-ui-mobile.jpg) | ||
|
||
<Md /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,130 @@ | ||
import Md from '../../../../README.md' | ||
import React from 'react' | ||
import { isMobile } from '@oplayer/core' | ||
import Player from '@oplayer/react' | ||
import hls from '@oplayer/hls' | ||
import dash from '@oplayer/dash' | ||
import mpegts from '@oplayer/mpegts' | ||
import ui from '@oplayer/ui' | ||
import danmaku from '@oplayer/danmaku' | ||
import { Playlist, Chromecast, AirPlay } from '@oplayer/plugins' | ||
|
||
![oplayer-mobile](https://cdn.jsdelivr.net/gh/shiyiya/QI-ABSL@master/o/oplayer-ui-mobile.jpg) | ||
|
||
<Md /> | ||
<div className="nx-rounded-sm nx-overflow-hidden" style={{ maxWidth: '1024px', margin: '2.5rem auto' }}> | ||
<Player | ||
volume={0.6} | ||
onEvent={(payload) => { | ||
console.log(payload) | ||
}} | ||
plugins={[ | ||
ui({ | ||
theme: { | ||
controller: { header: true, displayBehavior: 'delay' }, | ||
progress: { position: 'top' } | ||
}, | ||
pictureInPicture: true, | ||
menu: [ | ||
{ | ||
name: '❤', | ||
position: 'top', | ||
onClick() { | ||
alert('miss u') | ||
} | ||
}, | ||
{ | ||
name: '💕', | ||
position: 'top', | ||
children: [ | ||
{ | ||
name: '🍓', | ||
value: '🍓' | ||
}, | ||
{ | ||
name: '🍉', | ||
value: '🍉' | ||
}, | ||
{ | ||
name: '🍎', | ||
value: '🍎' | ||
} | ||
], | ||
onChange({ value }) { | ||
alert(`${value}`) | ||
} | ||
}, | ||
] | ||
}), | ||
hls({ forceHLS: true }), | ||
dash(), | ||
mpegts(), | ||
!isMobile && danmaku({ enable: true, fontSize: 0.75, displaySender: false }), | ||
new Playlist({ | ||
initialIndex: 0, | ||
autoNext: true, | ||
sources: [ | ||
{ | ||
title: '君の名は - MP4', | ||
src: 'https://cdn.jsdelivr.net/gh/shiyiya/QI-ABSL@master/o/君の名は.mp4', | ||
poster: 'https://cdn.jsdelivr.net/gh/shiyiya/QI-ABSL@master/o/poster.png', | ||
duration: '01:32', | ||
thumbnails: { | ||
src: 'https://cdn.jsdelivr.net/gh/shiyiya/QI-ABSL@master/o/thumbnails.jpg', | ||
number: 100 | ||
}, | ||
danmaku: 'https://cdn.jsdelivr.net/gh/shiyiya/QI-ABSL@master/o/danmaku.xml', | ||
subtitles: [ | ||
{ | ||
name: 'Japanese', | ||
default: true, | ||
src: 'https://cdn.jsdelivr.net/gh/shiyiya/QI-ABSL@master/o/君の名は-jp.srt', | ||
offset: 2 | ||
}, | ||
{ | ||
name: 'CH & JP', | ||
src: 'https://cdn.jsdelivr.net/gh/shiyiya/QI-ABSL@master/o/君の名は.srt', | ||
offset: 2 | ||
} | ||
], | ||
highlights: [ | ||
{ | ||
time: 12, | ||
text: '谁でもいいはずなのに' | ||
}, | ||
{ | ||
time: 34, | ||
text: '夏の想い出がまわる' | ||
}, | ||
{ | ||
time: 58, | ||
text: 'こんなとこにあるはずもないのに' | ||
}, | ||
{ | ||
time: 88, | ||
text: '--终わり--' | ||
} | ||
] | ||
}, | ||
{ | ||
title: 'Big Buck Bunny - HLS', | ||
src: 'https://test-streams.mux.dev/x36xhzz/x36xhzz.m3u8', | ||
duration: '10:34' | ||
}, | ||
{ | ||
title: 'DASH', | ||
src: 'https://dash.akamaized.net/akamai/bbb_30fps/bbb_30fps.mpd', | ||
duration: '10:34' | ||
}, | ||
{ | ||
title: 'FLV', | ||
src: 'https://cdn.jsdelivr.net/gh/shiyiya/QI-ABSL@master/o/weathering-with-you.flv', | ||
duration: '02:02' | ||
}, | ||
{ | ||
title: 'webtorrent - MP4 + subtitle + poster', | ||
src: 'https://webtorrent.io/torrents/sintel.torrent', | ||
} | ||
] | ||
}), | ||
new Chromecast(), | ||
new AirPlay() | ||
].filter((it) => it?.apply)} | ||
/> | ||
</div> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters