Skip to content

Commit

Permalink
fix: Windows不能播放部分视频
Browse files Browse the repository at this point in the history
  • Loading branch information
msojocs committed Feb 10, 2023
1 parent 1868897 commit e1de003
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.MD
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

- fix: 东南亚提示未登录,导致不能切换清晰度
- fix: 弹幕池相关操作,时间调整,弹幕替换
- fix: Windows不能播放部分视频

# v1.9.1-2 / 2023-02-09

Expand Down
3 changes: 2 additions & 1 deletion res/scripts/injectExt.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ const {app, BrowserWindow} = require('electron');
const originloadURL = BrowserWindow.prototype.loadURL;
BrowserWindow.prototype.loadURL = function(){
this.setMinimumSize(300, 300);

// 设置UA
this.webContents.setUserAgent('Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) bilibili_pc/1.9.1 Chrome/98.0.4758.141 Electron/17.4.11 Safari/537.36')
console.log('=====loadURL', arguments)
if(arguments[0].includes('player.html') || arguments[0].includes('index.html')){
this.webContents.openDevTools()
Expand Down

0 comments on commit e1de003

Please sign in to comment.