SF.SERVICE.USB
** This class will not be supported in 2015.
All functionalities of sf.service.USB class are more improved, integrating with CAPH. Therefore sf.service.USB class is not supported since 2015 Smart TV. To use functions of sf.service.USB class, refer to here.
This class provides functions for browsing and selecting files in the USB memory. Defines the USB Service API (Version 1.1.0).
Add the following line for sf.service.USB class into a html file your own : <script type="text/javascript" src="$MANAGER_WIDGET/Common/af/2.0.0/loader.js"></script> |
You can declare sf.service.USB class like this : ex) var usb = sf.service.USB; |
Methods
show | ||
Description | ||
Shows the USB browser window. | ||
Parameters | ■callback - Function - The callback function to be called when the USB popup is closed ■fileType - String - Filter applied with the file extension * all - All extensions (Not filtered) * image - Image files (png, jpg, bmp, gif) * text - Text files (txt, gul) * video - Video files (avi, wma, mp4) * music - Music files (mp3) | |
Return | ■Array - Each item is the selected file path. This array is passed to the callback. | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.USB.show({ callback: function(result){ alert("Callback of USB module: " + result); _THIS_.setResult(result?getObjString(result, 'result'):'null'); $("#btnOpenUSB").sfButton('focus'); }, fileType: 'all' }); |
hide | ||
Description | ||
This function hides USB Browser. | ||
Parameters | none | |
Return | ■Void | |
Emulator Support | N | |
SDK Constraint | None | |
Example | ||
sf.service.USB.hide(); |