Commit b0bc23581fc1a48c9ec9e917c07e3f7a7a545df2
1 parent
8a0ebdb8
fix: video component can not play video suffix value as m3u8
Showing
1 changed file
with
4 additions
and
1 deletions
... | ... | @@ -14606,6 +14606,7 @@ class HandleDynamicEffect { |
14606 | 14606 | videoPlay() { |
14607 | 14607 | const basicAttr = Sidebar.prototype.enumCellBasicAttribute |
14608 | 14608 | const enumAccessMode = HandleDynamicEffect.enumVideoAccessMode |
14609 | + const reg = /(?:.*)(?<=\.)/ | |
14609 | 14610 | const videoPlayConfig = { |
14610 | 14611 | controls: true, |
14611 | 14612 | autoPlay: true, |
... | ... | @@ -14625,7 +14626,9 @@ class HandleDynamicEffect { |
14625 | 14626 | if (Number(accessMode) === enumAccessMode.MANUAL_ENTER) { |
14626 | 14627 | this.graph.getModel().beginUpdate() |
14627 | 14628 | try { |
14628 | - const template = this.createVideoTemplate(idEl, width, height, videoUrl) | |
14629 | + let type | |
14630 | + if (videoUrl.replace(reg, '') === 'm3u8') type = 'application/x-mpegURL' | |
14631 | + const template = this.createVideoTemplate(idEl, width, height, videoUrl, type) | |
14629 | 14632 | cell.setAttribute('label', template) |
14630 | 14633 | this.graph.refresh(cell); |
14631 | 14634 | } finally { | ... | ... |