mirror of
https://github.com/navidrome/navidrome.git
synced 2026-11-02 08:27:56 +01:00
* feat(stream): add ClientInfo.ForceFormat for browser-aware forced format Restricts the client to a forced transcoding format and suppresses direct play, but only when the client declares it supports that format. Part of #5583. * fix(transcoding): honor player forced format on getTranscodeDecision When the WebUI player has a forced transcoding format configured and the browser declares it can play that format, transcode to it (suppressing direct play). Fall back to normal negotiation with a warning when the format is unsupported. The MaxBitRate cap still applies on top. Fixes #5583. * test(e2e): cover player forced format on getTranscodeDecision Forced format honored when the client supports it, falls back to negotiation otherwise, and the MaxBitRate cap still applies on top. Part of #5583. * feat(ui): remove obsolete 'format ignored' helper text on player form The web player now honors the forced transcoding format, so the caveat added in #5611 no longer applies. Reverts the Transcoding field to a plain selector. Part of #5583.
44 lines
1.3 KiB
JavaScript
44 lines
1.3 KiB
JavaScript
import {
|
|
TextInput,
|
|
BooleanInput,
|
|
TextField,
|
|
Edit,
|
|
required,
|
|
SimpleForm,
|
|
SelectInput,
|
|
ReferenceInput,
|
|
useTranslate,
|
|
} from 'react-admin'
|
|
import { Title } from '../common'
|
|
import config from '../config'
|
|
import { BITRATE_CHOICES } from '../consts'
|
|
|
|
const PlayerTitle = ({ record }) => {
|
|
const translate = useTranslate()
|
|
const resourceName = translate('resources.player.name', { smart_count: 1 })
|
|
return <Title subTitle={`${resourceName} ${record ? record.name : ''}`} />
|
|
}
|
|
|
|
const PlayerEdit = (props) => (
|
|
<Edit title={<PlayerTitle />} {...props}>
|
|
<SimpleForm variant={'outlined'}>
|
|
<TextInput source="name" validate={[required()]} />
|
|
<ReferenceInput
|
|
source="transcodingId"
|
|
reference="transcoding"
|
|
sort={{ field: 'name', order: 'ASC' }}
|
|
>
|
|
<SelectInput source="name" resettable />
|
|
</ReferenceInput>
|
|
<SelectInput source="maxBitRate" resettable choices={BITRATE_CHOICES} />
|
|
<BooleanInput source="reportRealPath" fullWidth />
|
|
{(config.lastFMEnabled || config.listenBrainzEnabled) && (
|
|
<BooleanInput source="scrobbleEnabled" fullWidth />
|
|
)}
|
|
<TextField source="client" />
|
|
<TextField source="userName" />
|
|
</SimpleForm>
|
|
</Edit>
|
|
)
|
|
|
|
export default PlayerEdit
|