Releases: Toxblh/samsung-tv-control
Releases · Toxblh/samsung-tv-control
Fixed the promise in isAvailable #278
- Fixed the promise in isAvailable #278
Thanks @anikumar-tivo
Patch KEY_EXIT
Added new key
# src/keys.ts
+ KEY_EXIT = 'KEY_EXIT',
Added getAppIcon method
Thank you @dylancom
Two new methods for get app icon
+ getAppIcon(iconPath: string, done?: (err: Error | {code: string} | null, res: WSData | string | null) => void): void;
+ getAppIconPromise(iconPath: string): Promise<WSData | null>;
Example
// Get app icon by iconPath which you can get from getAppsFromTV
control.getAppIcon(
`/opt/share/webappservice/apps_icon/FirstScreen/${APPS.YouTube}/250x250.png`,
(err, res) => {
if (!err) {
console.log('# Response getAppIcon', res)
}
}
)
v1.11.1
v1.11.0
v1.10.4
v1.10.3
v1.10.1
v1.10.0
Breaking changes
Changed isAvaliable to isAvailable
Changed result types for few endpoints
- control.isAvaliable()
+ control.isAvailable()
- public isAvaliable(): Promise<string>
+ public isAvailable(): Promise<boolean>
- public isAvailablePing(): Promise<string>
+ public isAvailablePing(): Promise<boolean>
- public turnOn(): Promise<string>
+ public turnOn(): Promise<boolean>
New API:
+ openAppByAppIdAndType(appId: string, type: number, done?)
+ openAppByAppIdAndTypePromise(appId: string, type: number)