Disabled features for default remote
This commit is contained in:
		@@ -85,7 +85,10 @@ export class ControlUnit implements IAccessory {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        //Configure services
 | 
					        //Configure services
 | 
				
			||||||
        this.configureTvService();
 | 
					        this.configureTvService();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.configureTvSpeakerService();
 | 
					        this.configureTvSpeakerService();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        // this.configureAccessoryInformation();
 | 
					        // this.configureAccessoryInformation();
 | 
				
			||||||
        this.configureInputSourceService();
 | 
					        this.configureInputSourceService();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@@ -130,9 +133,12 @@ export class ControlUnit implements IAccessory {
 | 
				
			|||||||
            //@ts-ignore
 | 
					            //@ts-ignore
 | 
				
			||||||
            .on("get", callbackify(this.onGetAccessoryActive));
 | 
					            .on("get", callbackify(this.onGetAccessoryActive));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.televisionService.getCharacteristic(Characteristic.RemoteKey)
 | 
					        //Set remote characteristics if is external
 | 
				
			||||||
            //@ts-ignore
 | 
					        if (this.isExternal) {
 | 
				
			||||||
            .on("set", callbackify(this.onSetRemoteKey));
 | 
					            this.televisionService.getCharacteristic(Characteristic.RemoteKey)
 | 
				
			||||||
 | 
					                //@ts-ignore
 | 
				
			||||||
 | 
					                .on("set", callbackify(this.onSetRemoteKey));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.televisionService.getCharacteristic(Characteristic.ActiveIdentifier)
 | 
					        this.televisionService.getCharacteristic(Characteristic.ActiveIdentifier)
 | 
				
			||||||
            //@ts-ignore
 | 
					            //@ts-ignore
 | 
				
			||||||
@@ -166,15 +172,17 @@ export class ControlUnit implements IAccessory {
 | 
				
			|||||||
     * Event handler for SET remote key
 | 
					     * Event handler for SET remote key
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private onSetRemoteKey = async (key: any) => {
 | 
					    private onSetRemoteKey = async (key: any) => {
 | 
				
			||||||
        //Set the active identifier with every key press
 | 
					        if (this.isExternal) {
 | 
				
			||||||
        let currentActivity: Activity = this.dataProvider.getIsActive(this.name)!;
 | 
					            //Set the active identifier with every key press
 | 
				
			||||||
        let identifier: number = 0;
 | 
					            // let currentActivity: Activity = this.dataProvider.getIsActive(this.name)!;
 | 
				
			||||||
        if (currentActivity) {
 | 
					            // let identifier: number = 0;
 | 
				
			||||||
            identifier = this.activities.findIndex(e => e.displayName === currentActivity.displayName);
 | 
					            // if (currentActivity) {
 | 
				
			||||||
        }
 | 
					            //     identifier = this.activities.findIndex(e => e.displayName === currentActivity.displayName);
 | 
				
			||||||
        this.televisionService!.setCharacteristic(Characteristic.ActiveIdentifier, identifier);
 | 
					            // }
 | 
				
			||||||
 | 
					            // this.televisionService!.setCharacteristic(Characteristic.ActiveIdentifier, identifier);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        this.dataProvider.sendKeyPress(this.name, key);
 | 
					            this.dataProvider.sendKeyPress(this.name, key);
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /**
 | 
					    /**
 | 
				
			||||||
@@ -233,9 +241,11 @@ export class ControlUnit implements IAccessory {
 | 
				
			|||||||
     * Event handler for SET volume characteristic
 | 
					     * Event handler for SET volume characteristic
 | 
				
			||||||
     */
 | 
					     */
 | 
				
			||||||
    private onSetVolumeSelector = async (value: any) => {
 | 
					    private onSetVolumeSelector = async (value: any) => {
 | 
				
			||||||
        switch (value) {
 | 
					        if (this.isExternal) {
 | 
				
			||||||
            case 0: this.dataProvider.volumeUp(this.name); break;
 | 
					            switch (value) {
 | 
				
			||||||
            case 1: this.dataProvider.volumeDown(this.name); break;
 | 
					                case 0: this.dataProvider.volumeUp(this.name); break;
 | 
				
			||||||
 | 
					                case 1: this.dataProvider.volumeDown(this.name); break;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user