新增媒体服务器深度链接功能

This commit is contained in:
jxxghp
2025-07-12 13:47:00 +08:00
parent 3cce92e83d
commit 60385715e6
10 changed files with 547 additions and 10 deletions
+5 -2
View File
@@ -1,5 +1,6 @@
<script lang="ts" setup>
import type { MediaServerPlayItem } from '@/api/types'
import { openMediaServerWithAutoDetect } from '@/utils/mediaServerDeepLink'
// 输入参数
const props = defineProps({
media: Object as PropType<MediaServerPlayItem>,
@@ -16,8 +17,10 @@ function imageLoadHandler() {
}
// 跳转播放
function goPlay() {
if (props.media?.link) window.open(props.media?.link, '_blank')
async function goPlay() {
if (props.media?.link) {
await openMediaServerWithAutoDetect(props.media.link)
}
}
// 计算图片地址