enhance - Added vue-plyr as the standard video player (#9766)

* Added Video player

Added vue-plyr as the video play

* Create node.js.yml

* Delete node.js.yml

* Added vue-plyr into pnpm-lock.yaml

* tweak

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
This commit is contained in:
Roxy Squires 2023-02-03 08:15:25 +00:00 committed by GitHub
parent d195406fdc
commit 4b8b29b862
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 75 additions and 12 deletions

View file

@ -6,19 +6,20 @@
</div>
</div>
<div v-else class="kkjnbbplepmiyuadieoenjgutgcmtsvu">
<video
:poster="video.thumbnailUrl"
:title="video.comment"
:alt="video.comment"
preload="none"
controls
@contextmenu.stop
>
<source
:src="video.url"
:type="video.type"
<vue-plyr>
<video
controls
crossorigin
playsinline
:data-poster="video.thumbnailUrl"
>
</video>
<source
size="720"
:src="video.url"
:type="video.type"
/>
</video>
</vue-plyr>
<i class="ti ti-eye-off" @click="hide = true"></i>
</div>
</template>
@ -26,7 +27,9 @@
<script lang="ts" setup>
import { ref } from 'vue';
import * as misskey from 'misskey-js';
import VuePlyr from 'vue-plyr';
import { defaultStore } from '@/store';
import 'vue-plyr/dist/vue-plyr.css';
const props = defineProps<{
video: misskey.entities.DriveFile;
@ -39,6 +42,8 @@ const hide = ref((defaultStore.state.nsfw === 'force') ? true : props.video.isSe
.kkjnbbplepmiyuadieoenjgutgcmtsvu {
position: relative;
--plyr-color-main: var(--accent);
> i {
display: block;
position: absolute;