Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetUriFormat中search参数识别为正则表达式导致类型识别非预期 #254

Open
zzzp9527 opened this issue Dec 22, 2023 · 0 comments

Comments

@zzzp9527
Copy link

问题

场景

问题:根据https链接解析视频类型失败
模式:点播

视频 URL

blob:https://xxxxxxxxxxxxx

视频信息
分辨率:1080P
时常:10min
码率:500kb/s
编码:H265
封装格式:MP$

问题描述

1)由于用户自己上传视频,项目只需要截取视频中的某几帧,故没有上传文件到服务器
2)由此使用的是 blob 临时链接,也就没有了视频文件后缀
3)由于没有后缀,自动识别文件类型时,将 https 识别为 [ht.ps] (search方法使用的是正则表达式)
4)本想提PR,但是文件代码是压缩的,实际上是一行,修改后很难diff

是否偶发

补充

image

image

此处search会应用正则,导致 .[type] 并不能发挥预想的作用。
此外对于形如 http://mp4333333/zzz.ts 之类的文件也会导致自动识别类型出错。
建议修改search为indexOf

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant