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