Skip to content

Commit

Permalink
fix(player): disable audio menu if only one option
Browse files Browse the repository at this point in the history
  • Loading branch information
mihar-22 committed Feb 2, 2024
1 parent 8854f80 commit f464edf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/react/src/hooks/options/use-audio-options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export function useAudioOptions(): AudioOptions {

Object.defineProperty(options, 'disabled', {
get() {
return !options.length;
return options.length <= 1;
},
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class AudioRadioGroup extends Component<AudioRadioGroupProps, {}, AudioRa
@prop
get disabled() {
const { audioTracks } = this._media.$state;
return audioTracks().length === 0;
return audioTracks().length <= 1;
}

constructor() {
Expand Down

0 comments on commit f464edf

Please sign in to comment.