Skip to content

Commit

Permalink
fix: 调整插件内软解判断
Browse files Browse the repository at this point in the history
  • Loading branch information
liluyang authored and gemxx committed Oct 21, 2024
1 parent cae7efd commit 67194ee
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/xgplayer-flv/src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export class FlvPlugin extends BasePlugin {
/** @type {boolean} */
get softDecode () {
const mediaType = this.player?.config?.mediaType
return !!mediaType && mediaType !== 'video' && mediaType !== 'audio'
return !!mediaType && mediaType !== 'video' && mediaType !== 'audio' && mediaType !== 'offscreen-video'
}

get loader () {
Expand Down
2 changes: 1 addition & 1 deletion packages/xgplayer-hls/src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export class HlsPlugin extends BasePlugin {

get softDecode () {
const mediaType = this.player?.config?.mediaType
return !!mediaType && mediaType !== 'video' && mediaType !== 'audio'
return !!mediaType && mediaType !== 'video' && mediaType !== 'audio' && mediaType !== 'offscreen-video'
}

beforePlayerInit () {
Expand Down
2 changes: 1 addition & 1 deletion packages/xgplayer-mp4-new/src/plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class MP4Plugin extends BasePlugin {

get softDecode () {
const mediaType = this.player?.config?.mediaType
return !!mediaType && mediaType !== 'video'
return !!mediaType && mediaType !== 'video' && mediaType !== 'offscreen-video'
}

beforePlayerInit () {
Expand Down

0 comments on commit 67194ee

Please sign in to comment.