Merge pull request #663 from 3flex/dont-limit-maxwidth
Some checks are pending
Lint / Lint TS and CSS (push) Waiting to run
Publish / Build (push) Waiting to run
Publish / Publish (push) Blocked by required conditions
Publish / Deploy (push) Blocked by required conditions
Test / Jest (push) Waiting to run

Don't limit max width for h264 streams to the window width
This commit is contained in:
Niels van Velzen 2024-11-02 10:34:06 +01:00 committed by GitHub
commit 6ac3432d27
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 16 deletions

View File

@ -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:

View File

@ -206,7 +206,7 @@ function getCodecProfiles(): CodecProfile[] {
createProfileCondition(
ProfileConditionValue.Width,
ProfileConditionType.LessThanEqual,
getMaxWidthSupport(currentDeviceId, 'h264').toString(),
getMaxWidthSupport(currentDeviceId).toString(),
true
)
],