Skip to content

Commit ee1926e

Browse files
authored
fix: Improve maxResolution detection on Tizen (#8365)
Fixes #8356
1 parent 09bf1cf commit ee1926e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/util/platform.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -756,8 +756,11 @@ shaka.util.Platform = class {
756756
// Now ignore the error and let the 720p default stand.
757757
}
758758
} else if (Platform.isTizen()) {
759-
maxResolution.width = 1920;
760-
maxResolution.height = 1080;
759+
const devicePixelRatio = window.devicePixelRatio;
760+
maxResolution.width = window.screen.width * devicePixelRatio > 1920 ?
761+
3840 : 1920;
762+
maxResolution.height = window.screen.height * devicePixelRatio > 1080 ?
763+
2160 : 1080;
761764
try {
762765
if (webapis.systeminfo && webapis.systeminfo.getMaxVideoResolution) {
763766
const maxVideoResolution =

0 commit comments

Comments
 (0)