mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🎈 pref: 修剪冗余逻辑
This commit is contained in:
parent
fdd496cbba
commit
eb3c05df07
@ -287,17 +287,10 @@ export class tools extends plugin {
|
|||||||
if (urlType === "video") {
|
if (urlType === "video") {
|
||||||
// logger.info(item.video);
|
// logger.info(item.video);
|
||||||
// 多位面选择:play_addr、play_addr_265、play_addr_h264
|
// 多位面选择:play_addr、play_addr_265、play_addr_h264
|
||||||
let resUrl;
|
const { play_addr: { uri: videoAddrURI } } = item.video;
|
||||||
// 判断是否使用压缩格式
|
const resolution = this.douyinCompression === 1 ? "720p" : "1080p";
|
||||||
const { play_addr } = item.video;
|
|
||||||
// 使用今日头条 CDN 进一步加快解析速度
|
// 使用今日头条 CDN 进一步加快解析速度
|
||||||
const videoAddrURI = play_addr.uri;
|
const resUrl = DY_TOUTIAO_INFO.replace("1080p", resolution).replace("{}", videoAddrURI);
|
||||||
if (this.douyinCompression === 1) {
|
|
||||||
resUrl = DY_TOUTIAO_INFO.replace("1080p", "720p").replace("{}", videoAddrURI);
|
|
||||||
} else {
|
|
||||||
// 原始格式,ps. videoAddrList这里[0]、[1]是 http,[最后一个]是 https
|
|
||||||
resUrl = DY_TOUTIAO_INFO.replace("{}", videoAddrURI);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ⚠️ 暂时废弃代码
|
// ⚠️ 暂时废弃代码
|
||||||
/*if (this.douyinCompression === 1) {
|
/*if (this.douyinCompression === 1) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user