@@ -88,13 +88,38 @@ protected void afterHookedMethod(MethodHookParam param) throws Throwable {
8888 @ Override
8989 protected void afterHookedMethod (MethodHookParam param ) throws Throwable {
9090 var resizeVideo = param .getResult ();
91- if ((int ) param .args [1 ] == 3 ) {
91+ boolean isHighResolution ;
92+ boolean isEnum = false ;
93+ if (param .args [0 ] instanceof Enum <?>) {
94+ isEnum = true ;
95+ var hightResolution = Enum .valueOf ((Class <Enum >) param .args [0 ].getClass (), "RESOLUTION_1080P" );
96+ isHighResolution = hightResolution == param .args [0 ];
97+ } else {
98+ isHighResolution = (int ) param .args [1 ] == 3 ;
99+ }
100+ if (isHighResolution ) {
92101
93102 if (realResolution ) {
94- var width = mediaFields .get ("widthPx" ).getInt (param .args [0 ]);
95- var height = mediaFields .get ("heightPx" ).getInt (param .args [0 ]);
96- var rotationAngle = mediaFields .get ("rotationAngle" ).getInt (param .args [0 ]);
97-
103+ int width ;
104+ int height ;
105+ int rotationAngle ;
106+
107+ if (mediaFields .isEmpty ()) {
108+ if (isEnum ) {
109+ width = (int ) param .args [3 ];
110+ height = (int ) param .args [4 ];
111+ rotationAngle = (int ) param .args [5 ];
112+ } else {
113+ JSONObject mediaFields = (JSONObject ) XposedHelpers .callMethod (param .args [0 ], "A00" );
114+ width = mediaFields .getInt ("widthPx" );
115+ height = mediaFields .getInt ("heightPx" );
116+ rotationAngle = mediaFields .getInt ("rotationAngle" );
117+ }
118+ } else {
119+ width = mediaFields .get ("widthPx" ).getInt (param .args [0 ]);
120+ height = mediaFields .get ("heightPx" ).getInt (param .args [0 ]);
121+ rotationAngle = mediaFields .get ("rotationAngle" ).getInt (param .args [0 ]);
122+ }
98123 var targetWidthField = mediaTranscodeParams .get ("targetWidth" );
99124 var targetHeightField = mediaTranscodeParams .get ("targetHeight" );
100125
0 commit comments