@@ -219,7 +219,7 @@ export default class xCloudApi {
219219 env : {
220220 clientAppId : "www.xbox.com" ,
221221 clientAppType : "browser" ,
222- clientAppVersion : "26.1.91 " ,
222+ clientAppVersion : "26.1.97 " ,
223223 clientSdkVersion : "10.3.7" ,
224224 httpEnvironment : "prod" ,
225225 sdkInstallId : "" ,
@@ -530,4 +530,64 @@ export default class xCloudApi {
530530 getActiveSessions ( ) {
531531 return this . get ( "/v5/sessions/" + this . _type + "/active" ) ;
532532 }
533+
534+ inputConfigs ( xboxTitleId : string ) {
535+ console . log ( 'xboxTitleId:' , xboxTitleId )
536+ const settings : any = this . _application . _store . get (
537+ "settings" ,
538+ defaultSettings
539+ ) ;
540+ let osName = 'android' ;
541+
542+ if ( settings . resolution == 1080 ) {
543+ osName = 'windows' ;
544+ } else if ( settings . resolution === 1081 ) { // 1080 HQ
545+ osName = "tizen" ;
546+ }
547+
548+ const deviceInfo = JSON . stringify ( {
549+ appInfo : {
550+ env : {
551+ clientAppId : "www.xbox.com" ,
552+ clientAppType : "browser" ,
553+ clientAppVersion : "26.1.97" ,
554+ clientSdkVersion : "10.3.7" ,
555+ httpEnvironment : "prod" ,
556+ sdkInstallId : "" ,
557+ } ,
558+ } ,
559+ dev : {
560+ hw : {
561+ make : "Microsoft" ,
562+ model : "unknown" ,
563+ sdktype : "web" ,
564+ } ,
565+ os : {
566+ name : osName ,
567+ ver : "22631.2715" ,
568+ platform : "desktop" ,
569+ } ,
570+ displayInfo : {
571+ dimensions : {
572+ widthInPixels : 1920 ,
573+ heightInPixels : 1080 ,
574+ } ,
575+ pixelDensity : {
576+ dpiX : 1 ,
577+ dpiY : 1 ,
578+ } ,
579+ } ,
580+ browser : {
581+ browserName : "chrome" ,
582+ browserVersion : "130.0" ,
583+ } ,
584+ } ,
585+ } ) ;
586+
587+ const postData = { titleIds : [ xboxTitleId ] , titleIdType : "xboxTitleId" } ;
588+
589+ return this . post ( "/v2/titles/inputconfigs" , postData , {
590+ "X-MS-Device-Info" : deviceInfo ,
591+ } ) ;
592+ }
533593}
0 commit comments