提交 32b21cbc authored 作者: 王鹏飞's avatar 王鹏飞

chore: 修改直播视频类型为webm;隐藏AI相关功能;

上级 2a78f8d8
...@@ -86,7 +86,9 @@ const unimportanceTotal = computed(() => { ...@@ -86,7 +86,9 @@ const unimportanceTotal = computed(() => {
size="large" size="large"
v-model="form.shopping_guide_short_title" v-model="form.shopping_guide_short_title"
style="flex: 1" /> style="flex: 1" />
<el-button type="primary" plain @click="handleAIGenerate" :loading="isLoading">一键智能推荐</el-button> <el-button type="primary" plain @click="handleAIGenerate" :loading="isLoading" v-if="false"
>一键智能推荐</el-button
>
</div> </div>
</el-form-item> </el-form-item>
<el-form-item <el-form-item
......
...@@ -164,6 +164,7 @@ function handleAIGenerate(index) { ...@@ -164,6 +164,7 @@ function handleAIGenerate(index) {
size="small" size="small"
@click="handleAIGenerate(1)" @click="handleAIGenerate(1)"
:loading="isLoading && aiActive === 1" :loading="isLoading && aiActive === 1"
v-if="false"
>AI一键生成</el-button >AI一键生成</el-button
> >
</div> </div>
...@@ -181,6 +182,7 @@ function handleAIGenerate(index) { ...@@ -181,6 +182,7 @@ function handleAIGenerate(index) {
size="small" size="small"
@click="handleAIGenerate(2)" @click="handleAIGenerate(2)"
:loading="isLoading && aiActive === 2" :loading="isLoading && aiActive === 2"
v-if="false"
>AI一键生成</el-button >AI一键生成</el-button
> >
</div> </div>
...@@ -200,7 +202,12 @@ function handleAIGenerate(index) { ...@@ -200,7 +202,12 @@ function handleAIGenerate(index) {
<el-col :sm="24" :md="12" style="border-left: 1px solid #dcdfe6"> <el-col :sm="24" :md="12" style="border-left: 1px solid #dcdfe6">
<div style="text-align: center; margin-bottom: 20px"> <div style="text-align: center; margin-bottom: 20px">
<h2 style="margin-bottom: 20px">直播话术</h2> <h2 style="margin-bottom: 20px">直播话术</h2>
<el-button type="primary" size="large" @click="handleAIGenerate(3)" :loading="isLoading && aiActive === 3"> <el-button
type="primary"
size="large"
@click="handleAIGenerate(3)"
:loading="isLoading && aiActive === 3"
v-if="false">
{{ messages.length ? '再次生成直播话术' : 'AI生成直播话术' }} {{ messages.length ? '再次生成直播话术' : 'AI生成直播话术' }}
</el-button> </el-button>
</div> </div>
......
...@@ -115,7 +115,7 @@ const handleUpdateRecord = async (params) => { ...@@ -115,7 +115,7 @@ const handleUpdateRecord = async (params) => {
const uploading = ref(false) const uploading = ref(false)
const handleUpload = () => { const handleUpload = () => {
const dialog = useFileDialog() const dialog = useFileDialog()
dialog.open({ accept: 'video/mp4' }) dialog.open({ accept: 'video/*' })
dialog.onChange(async ([file]) => { dialog.onChange(async ([file]) => {
uploading.value = true uploading.value = true
try { try {
......
...@@ -19,7 +19,7 @@ const playing = ref(false) ...@@ -19,7 +19,7 @@ const playing = ref(false)
const duration = ref(0) const duration = ref(0)
onMounted(() => { onMounted(() => {
video.value.onloadedmetadata = (e) => { video.value.onloadedmetadata = (e) => {
duration.value = e.target.duration duration.value = e.target.duration === Infinity ? parseFloat(record.value.live_duration) : e.target.duration
} }
video.value.ontimeupdate = () => { video.value.ontimeupdate = () => {
currentTime.value = video.value.currentTime currentTime.value = video.value.currentTime
......
...@@ -45,9 +45,7 @@ const listOptions = { ...@@ -45,9 +45,7 @@ const listOptions = {
<AppList v-bind="listOptions" ref="appList"> <AppList v-bind="listOptions" ref="appList">
<template #table-x="{ row }"> <template #table-x="{ row }">
<el-button text type="primary"> <el-button text type="primary">
<router-link <router-link :to="{ path: 'test/view', query: { ...$route.query, id: data.id, record_id: row.id } }"
:to="{ path: 'test/view', query: { ...$route.query, id: data.id, record_id: row.id } }"
target="_blank"
>查看</router-link >查看</router-link
> >
</el-button> </el-button>
......
...@@ -50,7 +50,7 @@ export function useLive({ enabledUserMedia = true, onStart, onRecord, onStop }: ...@@ -50,7 +50,7 @@ export function useLive({ enabledUserMedia = true, onStart, onRecord, onStop }:
// 初始化MediaRecorder // 初始化MediaRecorder
const initializeMediaRecorder = () => { const initializeMediaRecorder = () => {
if (!stream.value) return if (!stream.value) return
mediaRecorder = new MediaRecorder(stream.value, { mimeType: 'video/mp4' }) mediaRecorder = new MediaRecorder(stream.value, { mimeType: 'video/webm' })
mediaRecorder.ondataavailable = handleDataAvailable mediaRecorder.ondataavailable = handleDataAvailable
mediaRecorder.onstart = handleStart mediaRecorder.onstart = handleStart
mediaRecorder.onstop = handleStop mediaRecorder.onstop = handleStop
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论