修改根据后缀名识别信号源类型的逻辑
This commit is contained in:
parent
c9659e777b
commit
c1c875e537
|
@ -943,14 +943,7 @@ export default defineComponent({
|
|||
if (path && file) {
|
||||
const full_path = (path + "/" + file.name).replace(/\\/g, "/");
|
||||
const entity: SignalSourceEntity = new SignalSourceEntity();
|
||||
if (
|
||||
file.name.endsWith("mp4") ||
|
||||
file.name.endsWith("avi") ||
|
||||
file.name.endsWith("ts") ||
|
||||
file.name.endsWith("webm") ||
|
||||
file.name.endsWith("flv") ||
|
||||
file.name.endsWith("mkv")
|
||||
) {
|
||||
if (FileSuffixHelper.isVideoPath(file.name)) {
|
||||
entity.window_type = "EwindowType::Multimedia";
|
||||
entity.media_url = JSON.stringify([full_path]);
|
||||
} else {
|
||||
|
@ -1053,14 +1046,7 @@ export default defineComponent({
|
|||
if (path && file) {
|
||||
const full_path = (path + "/" + file.name).replace(/\\/g, "/");
|
||||
const entity: SignalSourceEntity = new SignalSourceEntity();
|
||||
if (
|
||||
file.name.endsWith("mp4") ||
|
||||
file.name.endsWith("avi") ||
|
||||
file.name.endsWith("ts") ||
|
||||
file.name.endsWith("webm") ||
|
||||
file.name.endsWith("flv") ||
|
||||
file.name.endsWith("mkv")
|
||||
) {
|
||||
if (FileSuffixHelper.isVideoPath(file.name)) {
|
||||
entity.window_type = "EwindowType::Multimedia";
|
||||
entity.media_url = JSON.stringify([full_path]);
|
||||
} else {
|
||||
|
|
|
@ -1164,14 +1164,8 @@ export default defineComponent({
|
|||
if (path && file) {
|
||||
const full_path = (path + "/" + file.name).replace(/\\/g, "/");
|
||||
const entity: SignalSourceEntity = new SignalSourceEntity();
|
||||
if (
|
||||
file.name.endsWith("mp4") ||
|
||||
file.name.endsWith("avi") ||
|
||||
file.name.endsWith("ts") ||
|
||||
file.name.endsWith("webm") ||
|
||||
file.name.endsWith("flv") ||
|
||||
file.name.endsWith("mkv")
|
||||
) {
|
||||
|
||||
if (FileSuffixHelper.isVideoPath(file.name)) {
|
||||
entity.window_type = "EwindowType::Multimedia";
|
||||
entity.media_url = JSON.stringify([full_path]);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue