mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-09 03:46:16 -08:00
- Implemented a React template with Vite, including ESLint configuration and necessary dependencies. - Created a Vue template with Vite, including setup for Artplayer and plugins. - Added internationalization support in both React and Vue examples. - Included sample video and Danmuku plugin integration in both frameworks. - Established project structure with appropriate configuration files and README documentation.
32 lines
513 B
TypeScript
32 lines
513 B
TypeScript
import Artplayer, { type Option } from 'artplayer'
|
|
import Player from './Player'
|
|
|
|
function getInstance(art: Artplayer) {
|
|
console.log(art)
|
|
}
|
|
|
|
const style = {
|
|
width: '800px',
|
|
height: '600px',
|
|
margin: '60px auto 0',
|
|
}
|
|
|
|
const option: Partial<Option> = {
|
|
url: 'https://artplayer.org/assets/sample/video.mp4',
|
|
autoSize: true,
|
|
}
|
|
|
|
function App() {
|
|
return (
|
|
<div>
|
|
<Player
|
|
style={style}
|
|
option={option}
|
|
getInstance={getInstance}
|
|
/>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
export default App
|