mirror of
https://github.com/zhw2590582/ArtPlayer.git
synced 2026-10-16 09:36:16 -08:00
feat: add React and Vue examples with Artplayer integration
- 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.
This commit is contained in:
1 parent
62b4be9d82
commit
fa2c69e83d
73 files changed
+129
-124
No files matched your search
@@ -0,0 +1,24 @@
|
||||
<script setup lang="ts">
|
||||
import { reactive } from 'vue'
|
||||
import Artplayer, { type Option } from 'artplayer'
|
||||
import Player from './Player.vue'
|
||||
|
||||
const option = reactive<Partial<Option>>({
|
||||
url: 'https://artplayer.org/assets/sample/video.mp4',
|
||||
autoSize: true,
|
||||
})
|
||||
|
||||
const style = reactive({
|
||||
width: '800px',
|
||||
height: '600px',
|
||||
margin: '60px auto 0',
|
||||
})
|
||||
|
||||
function getInstance(art: Artplayer) {
|
||||
console.log('Artplayer instance:', art)
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Player :option="option" :style="style" @get-instance="getInstance" />
|
||||
</template>
|
||||
Reference in new issue
Block a user