Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
D
dataease
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
zhu
dataease
Commits
a3ff9c94
Unverified
提交
a3ff9c94
authored
4月 27, 2022
作者:
fit2cloudrd
提交者:
GitHub
4月 27, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refactor: 优化流媒体,关闭IO隐藏缓冲区等 (#2200)
* refactor: 优化流媒体,直播视频关闭IO隐藏缓冲区等 * refactor: 优化流媒体,直播视频关闭IO隐藏缓冲 Co-authored-by:
wangjiahao
<
1522128093@qq.com
>
上级
82738287
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
44 行增加
和
19 行删除
+44
-19
StreamMediaLinks.vue
.../components/canvas/components/Editor/StreamMediaLinks.vue
+20
-14
DeStreamMedia.vue
.../src/components/canvas/custom-component/DeStreamMedia.vue
+22
-4
component-list.js
.../src/components/canvas/custom-component/component-list.js
+2
-1
没有找到文件。
frontend/src/components/canvas/components/Editor/StreamMediaLinks.vue
浏览文件 @
a3ff9c94
...
@@ -24,10 +24,14 @@
...
@@ -24,10 +24,14 @@
<el-radio
:label=
"false"
>
{{
$t
(
'panel.no'
)
}}
</el-radio>
<el-radio
:label=
"false"
>
{{
$t
(
'panel.no'
)
}}
</el-radio>
</el-radio-group>
</el-radio-group>
</el-form-item>
</el-form-item>
<el-form-item
v-if=
"!streamMediaInfoTemp[streamMediaInfoTemp.videoType].isLive"
:label=
"$t('panel.auto_play')"
>
<!--This button is currently disabled and temporarily masked-->
<el-switch
v-model=
"streamMediaInfoTemp[streamMediaInfoTemp.videoType].autoplay"
size=
"mini"
/>
<!--
<el-form-item
v-if=
"!streamMediaInfoTemp[streamMediaInfoTemp.videoType].isLive"
:label=
"$t('panel.auto_play')"
>
-->
</el-form-item>
<!--
<el-switch
v-model=
"streamMediaInfoTemp[streamMediaInfoTemp.videoType].autoplay"
size=
"mini"
/>
-->
<el-form-item
v-if=
"!streamMediaInfoTemp[streamMediaInfoTemp.videoType].isLive"
:label=
"$t('panel.play_frequency')"
>
<!--
</el-form-item>
-->
<el-form-item
v-if=
"!streamMediaInfoTemp[streamMediaInfoTemp.videoType].isLive"
:label=
"$t('panel.play_frequency')"
>
<el-radio-group
v-model=
"streamMediaInfoTemp[streamMediaInfoTemp.videoType].loop"
>
<el-radio-group
v-model=
"streamMediaInfoTemp[streamMediaInfoTemp.videoType].loop"
>
<el-radio
:label=
"false"
>
{{
$t
(
'panel.play_once'
)
}}
</el-radio>
<el-radio
:label=
"false"
>
{{
$t
(
'panel.play_once'
)
}}
</el-radio>
<el-radio
:label=
"true"
>
{{
$t
(
'panel.play_circle'
)
}}
</el-radio>
<el-radio
:label=
"true"
>
{{
$t
(
'panel.play_circle'
)
}}
</el-radio>
...
@@ -123,7 +127,7 @@ export default {
...
@@ -123,7 +127,7 @@ export default {
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.slot-class
{
.slot-class
{
color
:
white
;
color
:
white
;
}
}
...
@@ -132,13 +136,14 @@ export default {
...
@@ -132,13 +136,14 @@ export default {
text-align
:
center
;
text-align
:
center
;
}
}
.ellip
{
.ellip
{
/*width: 100%;*/
/*width: 100%;*/
margin-left
:
10px
;
margin-left
:
10px
;
margin-right
:
10px
;
margin-right
:
10px
;
overflow
:
hidden
;
/*超出部分隐藏*/
overflow
:
hidden
;
/*超出部分隐藏*/
white-space
:
nowrap
;
/*不换行*/
white-space
:
nowrap
;
/*不换行*/
text-overflow
:
ellipsis
;
/*超出部分文字以...显示*/
text-overflow
:
ellipsis
;
/*超出部分文字以...显示*/
background-color
:
#f7f8fa
;
background-color
:
#f7f8fa
;
color
:
#3d4d66
;
color
:
#3d4d66
;
font-size
:
12px
;
font-size
:
12px
;
...
@@ -147,20 +152,21 @@ export default {
...
@@ -147,20 +152,21 @@ export default {
border-radius
:
3px
;
border-radius
:
3px
;
}
}
.select-filed
{
.select-filed
{
/*width: 100%;*/
/*width: 100%;*/
margin-left
:
10px
;
margin-left
:
10px
;
margin-right
:
10px
;
margin-right
:
10px
;
overflow
:
hidden
;
/*超出部分隐藏*/
overflow
:
hidden
;
/*超出部分隐藏*/
white-space
:
nowrap
;
/*不换行*/
white-space
:
nowrap
;
/*不换行*/
text-overflow
:
ellipsis
;
/*超出部分文字以...显示*/
text-overflow
:
ellipsis
;
/*超出部分文字以...显示*/
color
:
#3d4d66
;
color
:
#3d4d66
;
font-size
:
12px
;
font-size
:
12px
;
line-height
:
35px
;
line-height
:
35px
;
height
:
35px
;
height
:
35px
;
border-radius
:
3px
;
border-radius
:
3px
;
}
}
>>>
.el-popover
{
>
>
>
.el-popover
{
height
:
200px
;
height
:
200px
;
overflow
:
auto
;
overflow
:
auto
;
}
}
...
...
frontend/src/components/canvas/custom-component/DeStreamMedia.vue
浏览文件 @
a3ff9c94
...
@@ -71,8 +71,8 @@ export default {
...
@@ -71,8 +71,8 @@ export default {
mounted
()
{
mounted
()
{
this
.
initOption
()
this
.
initOption
()
bus
.
$on
(
'streamMediaLinksChange-'
+
this
.
element
.
id
,
()
=>
{
bus
.
$on
(
'streamMediaLinksChange-'
+
this
.
element
.
id
,
()
=>
{
this
.
pOption
=
this
.
element
.
streamMediaLinks
[
this
.
element
.
streamMediaLinks
.
videoType
]
,
this
.
pOption
=
this
.
element
.
streamMediaLinks
[
this
.
element
.
streamMediaLinks
.
videoType
]
this
.
flvPlayer
=
null
,
this
.
flvPlayer
=
null
this
.
videoShow
=
false
this
.
videoShow
=
false
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
videoShow
=
true
this
.
videoShow
=
true
...
@@ -80,14 +80,24 @@ export default {
...
@@ -80,14 +80,24 @@ export default {
})
})
})
})
},
},
beforeDestroy
()
{
this
.
destroyPlayer
()
},
methods
:
{
methods
:
{
initOption
()
{
initOption
()
{
if
(
flvjs
.
isSupported
()
&&
this
.
pOption
.
url
)
{
if
(
flvjs
.
isSupported
()
&&
this
.
pOption
.
url
)
{
this
.
destroyPlayer
()
const
video
=
this
.
$refs
.
player
const
video
=
this
.
$refs
.
player
if
(
video
)
{
if
(
video
)
{
this
.
flvPlayer
=
flvjs
.
createPlayer
(
this
.
pOption
)
this
.
flvPlayer
.
attachMediaElement
(
video
)
try
{
try
{
this
.
flvPlayer
=
flvjs
.
createPlayer
(
this
.
pOption
,
{
enableWorker
:
false
,
// 不启用分离线程
enableStashBuffer
:
false
,
// 关闭IO隐藏缓冲区
isLive
:
this
.
pOption
.
isLive
,
lazyLoad
:
false
})
this
.
flvPlayer
.
attachMediaElement
(
video
)
this
.
flvPlayer
.
load
()
this
.
flvPlayer
.
load
()
this
.
flvPlayer
.
play
()
this
.
flvPlayer
.
play
()
}
catch
(
error
)
{
}
catch
(
error
)
{
...
@@ -95,6 +105,14 @@ export default {
...
@@ -95,6 +105,14 @@ export default {
}
}
}
}
}
}
},
destroyPlayer
()
{
// Destroy
if
(
this
.
flvPlayer
)
{
this
.
flvPlayer
.
pause
()
this
.
flvPlayer
.
destroy
()
this
.
flvPlayer
=
null
}
}
}
}
}
}
}
...
...
frontend/src/components/canvas/custom-component/component-list.js
浏览文件 @
a3ff9c94
...
@@ -106,7 +106,8 @@ export const STREAMMEDIALINKS = {
...
@@ -106,7 +106,8 @@ export const STREAMMEDIALINKS = {
type
:
'flv'
,
type
:
'flv'
,
isLive
:
false
,
isLive
:
false
,
cors
:
true
,
// 允许跨域
cors
:
true
,
// 允许跨域
loop
:
true
loop
:
true
,
autoplay
:
false
// url: null // 网络动画视频
// url: null // 网络动画视频
}
}
}
}
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论