Skip to content

Commit

Permalink
feat(xgplayer): 增加preProcessUrlOptions参数
Browse files Browse the repository at this point in the history
  • Loading branch information
lixiangfei authored and hongqx committed May 9, 2024
1 parent 7670b08 commit 8c5828e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/xgplayer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "xgplayer",
"version": "3.0.17-alpha.10",
"version": "3.0.17-alpha.11",
"description": "video player",
"main": "dist/index.min.js",
"module": "es/index.js",
Expand Down
5 changes: 3 additions & 2 deletions packages/xgplayer/src/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -2291,8 +2291,9 @@ class Player extends MediaProxy {
* @returns { url: IUrl, [propName: string]: any }
*/
_preProcessUrl (url, ext) {
const { preProcessUrl } = this.config
return !Util.isBlob(url) && typeof preProcessUrl === 'function' ? preProcessUrl(url, ext) : { url }
const { preProcessUrl, preProcessUrlOptions } = this.config
const processUrlOptions = Object.assign({}, preProcessUrlOptions, ext)
return !Util.isBlob(url) && typeof preProcessUrl === 'function' ? preProcessUrl(url, processUrlOptions) : { url }
}

/**
Expand Down

0 comments on commit 8c5828e

Please sign in to comment.