mirror of
https://github.com/jellyfin/jellyfin-chromecast.git
synced 2025-02-17 04:59:17 +00:00
Merge pull request #663 from 3flex/dont-limit-maxwidth
Don't limit max width for h264 streams to the window width
This commit is contained in:
commit
6ac3432d27
@ -93,23 +93,9 @@ export function getMaxBitrateSupport(): number {
|
||||
/**
|
||||
* Get the max supported video width the active Cast device supports.
|
||||
* @param deviceId - Cast device id.
|
||||
* @param codec - Video codec.
|
||||
* @returns Max supported width.
|
||||
*/
|
||||
export function getMaxWidthSupport(
|
||||
deviceId: DeviceIds,
|
||||
codec?: string
|
||||
): number {
|
||||
if (codec === 'h264') {
|
||||
// with HLS, it will produce a manifest error if we
|
||||
// send any stream larger than the screen size...
|
||||
return window.innerWidth;
|
||||
}
|
||||
|
||||
// mkv playback can use the device limitations.
|
||||
// The devices are capable of decoding and downscaling,
|
||||
// they just refuse to do it with HLS. This increases
|
||||
// the rate of direct playback.
|
||||
export function getMaxWidthSupport(deviceId: DeviceIds): number {
|
||||
switch (deviceId) {
|
||||
case DeviceIds.ULTRA:
|
||||
case DeviceIds.CCGTV:
|
||||
|
@ -206,7 +206,7 @@ function getCodecProfiles(): CodecProfile[] {
|
||||
createProfileCondition(
|
||||
ProfileConditionValue.Width,
|
||||
ProfileConditionType.LessThanEqual,
|
||||
getMaxWidthSupport(currentDeviceId, 'h264').toString(),
|
||||
getMaxWidthSupport(currentDeviceId).toString(),
|
||||
true
|
||||
)
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user