Filter
-
Content Type
-
Category
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Mobile/Wearable
Visual Display
Digital Appliance
Platform
Filter
Develop Smart TV
apiw3c/html5 api references dom, forms and styles specification description status html5 forms partial html5 form features the content attribute currently not supported is formnovalidate of form element lcwd selectors api level 1 api for retrieving element nodes from the dom by matching against a group of selectors lcwd selectors api level 2 partial api for retrieving element nodes from the dom by matching against a group of selectors, and for testing if a given element matches a particular selector the methods currently not supported are queryscopedselector, queryscopedselectorall of nodeselector interface matchesselector of element interface wd media queries partial offers a mechanism that allows adapting the layout and behavior of a web page based on some of the characteristics of the device, including the screen width/height the query currently not supported is color-index, min-color-index, max-color-index, resolution, scan, print, 3d-glasses, grid rec css transforms css transforms allows elements styled with css to be transformed in two-dimensional or three-dimensional space wd css animations module level 3 css animations allow an author to modify css property values over time wd css transitions module level 3 partial css transitions allow property changes in css values to occur smoothly over a specified duration the method and attribute currently not supported are inittransitionevent of transitionevent interface pseudoelement of transitionevent interface wd css color module level 3 css3 color enhancements related to color values and properties for foreground color and group opacity rec css backgrounds and borders module level 3 rounded corners, complex background images, shadow effects cr css flexible box layout module css box model optimized for user interface design lcwd css multi-column layout module partial creates multiple columns for laying out text the property currently not supported is column-fill the values currently not supported are column, avoid-page and avoid-column of properties break-before and break-afteravoid-page and avoid-column of property break-inside cr css text module level 3 partial css properties for text manipulation and specifies their processing model the properties currently not supported are text-justify, text-decoration-color, text-decoration-line, text-decoration-style, text-decoration-skip, hanging-punctuation wd css basic user interface module level 3 css3 ui user interface related css enhancements lcwd css fonts module level 3 partial @font-face rule with downloadable font src url the features currently not supported are font-feature-settings, font-language-override, font-synthesis, font-variant-alternates, font-variant-caps, font-variant-east-asian, font-variant-numeric, font-variant-position, font-size-adjust, font-stretch wd woff file format 1 0 web open font format file format 1 0 pr dom/javascript related html5 enhancements handy dom/javascript related enhancements in html5 lcwd device specification description status touch events version 1 partial w3c touch event specification for touch devices the method currently not supported is identifiedtouch of touchlist interface wd deviceorientation event specification partial provides access to orientation and acceleration data the method and event currently not supported are initaccelerometerevent of devicemotionevent interface compassneedscalibration event required feature http //tizen org/feature/sensor accelerometer http //tizen org/feature/sensor gyroscope http //tizen org/feature/sensor magnetometer lcwd battery status api w3c battery api defines new dom event types that provide information about the battery status of the hosting device cr vibration api haptic feedback api from w3c lcwd html5 browser state signals when network connectivity is available to the web environment lcwd the screen orientation api to provide an interface for web applications to be able to read the screen orientation state, to be informed when this state changes and to be able to lock the screen orientation to a specific staterequired feature http //tizen org/feature/sensor magnetometer wd the network information api w3c network information api provides an interface for the web applications to access the underlying network information connection info of the device wd gamepad api the gamepad api specifies interfaces to access and respond to signals from gaming controllers and other game accessory devices in a structured way it contains 3 interfaces gamepad gamepadbutton gamepadevent the method navigator getgamepads returns an array of gamepad objects for each instance of gamepad connected to the device wd graphics specification description status html5 the canvas element partial html5 canvas element including 2d context and text the method currently not supported is toblob of htmlcanvaselement interface lcwd html canvas 2d context partial 2d context for the html canvas element the methods currently not supported are drawsystemfocusring, drawcustomfocusring, scrollpathintoview of canvasrenderingcontext2d interface wd html5 svg inline svg 1 1 support in html5 lcwd media specification description status html5 the video element partial html5 video element the attributes currently not supported are startoffsettime and videotracks of htmlmediaelement interface lcwd html5 the audio element partial html5 audio element the attributes currently not supported are startoffsettime and audiotracks of htmlmediaelement interface lcwd getusermedia partial api that directly manipulates streams from cameras and microphones the dictionary member currently not supported is audio of mediastreamoptions dictionary privilege http //tizen org/privilege/mediacapture public level required feature http //tizen org/feature/camera http //tizen org/feature/microphone ed web audio api partial w3c web audio api describes a high-level javascript api for processing and synthesizing audio in web applications the interfaces and attribute currently not supported are mediaelementaudiosourcenode and mediastreamaudiosourcenode interfaces computedvalue of audioparam interface the enum string constant value currently not supported for panningmodel attribute is soundfield of panningmodeltype enum wd html media capture capture and record multimedia content with input tag required feature http //tizen org/feature/camera http //tizen org/feature/microphone lcwd communication specification description status the websocket api offers bi-directional network connectivity cr xmlhttprequest level 2 enhancements on xhr, including binary file uploading, formdata submission, transfer progress, etc wd html5 the session history of browsing contexts partial navigating the sequence of documents in a browsing context the methods currently not supported are resolveurl of location interface initpopstateevent of popstateevent interface initpagetransitionevent of pagetransitionevent interface lcwd server-sent events the api allows triggering dom events based on push notifications via http and other protocols wd html5 web messaging html5 web messaging the postmessage api allows for web applications to communicate between each other cr storage specification description status web storage w3c storage specification including session and local storage cr file api reads files from local device file system wd file api directories and system api that allows accessing the device file system privilege level public privilege http //tizen org/privilege/unlimitedstorage wd file api writer partial saves or modifies files in local device file system the interface and method currently not supported are filesaver interface saveas of window interface privilege level public privilege http //tizen org/privilege/unlimitedstorage wd html5 application caches html5 application cache and custom handlers lcwd indexed database api partial a database of values and hierarchical objects that integrates naturally with javascript, and can be queried and updated very efficiently the attributes and method currently not supported are oldversion, newversion of idbversionchangeevent interface initidbversionchangeevent of idbversionchangeevent interface privilege level public privilege http //tizen org/privilege/unlimitedstorage wd web sql database api for storing data in databases that can be queried using a variant of sql privilege level public privilege http //tizen org/privilege/unlimitedstorage note security specification description status cross-origin resource sharing sharing of resources across different domains lcwd html5 the iframe element access restriction sandboxing for iframe content the available values of sandbox attribute are allow-same-origin, allow-scripts, allow-forms, allow-top-navigation lcwd content security policy 1 0 partial defines a policy language used to declare a set of content restrictions for a web resource, and a mechanism for transmitting the policy from a server to a client where the policy is enforced the directive currently not supported is object-src cr ui specification description status clipboard api and events partial to describe apis for clipboard operations such as copy, cut & paste in web applications the constructor of clipboardevent interface is not supported wd html5 drag and drop partial to define an event-based drag-and-drop mechanism the method currently not supported is addelement of datatransfer interface lcwd web notifications partial to define an api for displaying simple notifications to the user the dictionary members currently not supported are titledir, bodydir of notificationoptions dictionary privilege level public privilege http //tizen org/privilege/notification wd performance and optimization specification description status web workers partial api that allows web application authors to spawn background workers running scripts in parallel to their main page the event handlers, interfaces and attributes currently not supported are ononline, onoffline of workerglobalscope interface sharedworkerglobalscope and sharedworker interfaces lineno, filename of errorevent interface cr page visibility this specification defines a means for developers to programmatically determine the current visibility state of the page in order to develop power and cpu efficient web applications cr timing control for script-based animations resource effective animation timing control by user agent lcwd navigation timing this specification defines an interface for web applications to access timing information related to navigation and elements rec location specification description status geolocation api specification provides scripted access to geographical location information associated with the hosting device privilege level public privilege http //tizen org/privilege/location required feature http //tizen org/feature/location gps pr widget specification description status widget packaging and xml configuration a packaging format and metadata for a class of software known as widgets rec widget interface api for widgets that provides, amongst other things, functionality for accessing a widget's metadata and persistently storing data lcwd xml digital signatures for widgets a profile of the xml signature syntax and processing 1 1 specification to allow a widget package to be digitally signed pr widget access request policy the security model controlling network access from within a widget, as well as a method for authors to request that the user agent grant access to certain network resources or sets thereof rec w3c specification status ed editor’s draft wd working draft lcwd last call working draft cr candidate recommendation pr proposed recommendation rec recommendation see w3c technical report development process for more details notethe apis in ed, wd, lc status are considered to be in preliminary state such apis do not carry a version compatibility promise they may change in future versions of tizen if the specifications change
Develop Smart Signage
apiw3c/html5 api references dom, forms and styles specification description status html5 forms partial html5 form features the content attribute currently not supported is formnovalidate of form element lcwd selectors api level 1 api for retrieving element nodes from the dom by matching against a group of selectors lcwd selectors api level 2 partial api for retrieving element nodes from the dom by matching against a group of selectors, and for testing if a given element matches a particular selector the methods currently not supported are queryscopedselector, queryscopedselectorall of nodeselector interface matchesselector of element interface wd media queries partial offers a mechanism that allows adapting the layout and behavior of a web page based on some of the characteristics of the device, including the screen width/height the query currently not supported is color-index, min-color-index, max-color-index, resolution, scan, print, 3d-glasses, grid rec css transforms css transforms allows elements styled with css to be transformed in two-dimensional or three-dimensional space wd css animations module level 3 css animations allow an author to modify css property values over time wd css transitions module level 3 partial css transitions allow property changes in css values to occur smoothly over a specified duration the method and attribute currently not supported are inittransitionevent of transitionevent interface pseudoelement of transitionevent interface wd css color module level 3 css3 color enhancements related to color values and properties for foreground color and group opacity rec css backgrounds and borders module level 3 rounded corners, complex background images, shadow effects cr css flexible box layout module css box model optimized for user interface design lcwd css multi-column layout module partial creates multiple columns for laying out text the property currently not supported is column-fill the values currently not supported are column, avoid-page and avoid-column of properties break-before and break-afteravoid-page and avoid-column of property break-inside cr css text module level 3 partial css properties for text manipulation and specifies their processing model the properties currently not supported are text-justify, text-decoration-color, text-decoration-line, text-decoration-style, text-decoration-skip, hanging-punctuation wd css basic user interface module level 3 css3 ui user interface related css enhancements lcwd css fonts module level 3 partial @font-face rule with downloadable font src url the features currently not supported are font-feature-settings, font-language-override, font-synthesis, font-variant-alternates, font-variant-caps, font-variant-east-asian, font-variant-numeric, font-variant-position, font-size-adjust, font-stretch wd woff file format 1 0 web open font format file format 1 0 pr dom/javascript related html5 enhancements handy dom/javascript related enhancements in html5 lcwd device specification description status touch events version 1 partial w3c touch event specification for touch devices the method currently not supported is identifiedtouch of touchlist interface wd deviceorientation event specification partial provides access to orientation and acceleration data the method and event currently not supported are initaccelerometerevent of devicemotionevent interface compassneedscalibration event required feature http //tizen org/feature/sensor accelerometer http //tizen org/feature/sensor gyroscope http //tizen org/feature/sensor magnetometer lcwd battery status api w3c battery api defines new dom event types that provide information about the battery status of the hosting device cr vibration api haptic feedback api from w3c lcwd html5 browser state signals when network connectivity is available to the web environment lcwd the screen orientation api to provide an interface for web applications to be able to read the screen orientation state, to be informed when this state changes and to be able to lock the screen orientation to a specific staterequired feature http //tizen org/feature/sensor magnetometer wd the network information api w3c network information api provides an interface for the web applications to access the underlying network information connection info of the device wd gamepad api the gamepad api specifies interfaces to access and respond to signals from gaming controllers and other game accessory devices in a structured way it contains 3 interfaces gamepad gamepadbutton gamepadevent the method navigator getgamepads returns an array of gamepad objects for each instance of gamepad connected to the device wd graphics specification description status html5 the canvas element partial html5 canvas element including 2d context and text the method currently not supported is toblob of htmlcanvaselement interface lcwd html canvas 2d context partial 2d context for the html canvas element the methods currently not supported are drawsystemfocusring, drawcustomfocusring, scrollpathintoview of canvasrenderingcontext2d interface wd html5 svg inline svg 1 1 support in html5 lcwd media specification description status html5 the video element partial html5 video element the attributes currently not supported are startoffsettime and videotracks of htmlmediaelement interface lcwd html5 the audio element partial html5 audio element the attributes currently not supported are startoffsettime and audiotracks of htmlmediaelement interface lcwd getusermedia partial api that directly manipulates streams from cameras and microphones the dictionary member currently not supported is audio of mediastreamoptions dictionary privilege http //tizen org/privilege/mediacapture public level required feature http //tizen org/feature/camera http //tizen org/feature/microphone ed web audio api partial w3c web audio api describes a high-level javascript api for processing and synthesizing audio in web applications the interfaces and attribute currently not supported are mediaelementaudiosourcenode and mediastreamaudiosourcenode interfaces computedvalue of audioparam interface the enum string constant value currently not supported for panningmodel attribute is soundfield of panningmodeltype enum wd html media capture capture and record multimedia content with input tag required feature http //tizen org/feature/camera http //tizen org/feature/microphone lcwd communication specification description status the websocket api offers bi-directional network connectivity cr xmlhttprequest level 2 enhancements on xhr, including binary file uploading, formdata submission, transfer progress, etc wd html5 the session history of browsing contexts partial navigating the sequence of documents in a browsing context the methods currently not supported are resolveurl of location interface initpopstateevent of popstateevent interface initpagetransitionevent of pagetransitionevent interface lcwd server-sent events the api allows triggering dom events based on push notifications via http and other protocols wd html5 web messaging html5 web messaging the postmessage api allows for web applications to communicate between each other cr storage specification description status web storage w3c storage specification including session and local storage cr file api reads files from local device file system wd file api directories and system api that allows accessing the device file system privilege level public privilege http //tizen org/privilege/unlimitedstorage wd file api writer partial saves or modifies files in local device file system the interface and method currently not supported are filesaver interface saveas of window interface privilege level public privilege http //tizen org/privilege/unlimitedstorage wd html5 application caches html5 application cache and custom handlers lcwd indexed database api partial a database of values and hierarchical objects that integrates naturally with javascript, and can be queried and updated very efficiently the attributes and method currently not supported are oldversion, newversion of idbversionchangeevent interface initidbversionchangeevent of idbversionchangeevent interface privilege level public privilege http //tizen org/privilege/unlimitedstorage wd web sql database api for storing data in databases that can be queried using a variant of sql privilege level public privilege http //tizen org/privilege/unlimitedstorage note security specification description status cross-origin resource sharing sharing of resources across different domains lcwd html5 the iframe element access restriction sandboxing for iframe content the available values of sandbox attribute are allow-same-origin, allow-scripts, allow-forms, allow-top-navigation lcwd content security policy 1 0 partial defines a policy language used to declare a set of content restrictions for a web resource, and a mechanism for transmitting the policy from a server to a client where the policy is enforced the directive currently not supported is object-src cr ui specification description status clipboard api and events partial to describe apis for clipboard operations such as copy, cut & paste in web applications the constructor of clipboardevent interface is not supported wd html5 drag and drop partial to define an event-based drag-and-drop mechanism the method currently not supported is addelement of datatransfer interface lcwd web notifications partial to define an api for displaying simple notifications to the user the dictionary members currently not supported are titledir, bodydir of notificationoptions dictionary privilege level public privilege http //tizen org/privilege/notification wd performance and optimization specification description status web workers partial api that allows web application authors to spawn background workers running scripts in parallel to their main page the event handlers, interfaces and attributes currently not supported are ononline, onoffline of workerglobalscope interface sharedworkerglobalscope and sharedworker interfaces lineno, filename of errorevent interface cr page visibility this specification defines a means for developers to programmatically determine the current visibility state of the page in order to develop power and cpu efficient web applications cr timing control for script-based animations resource effective animation timing control by user agent lcwd navigation timing this specification defines an interface for web applications to access timing information related to navigation and elements rec location specification description status geolocation api specification provides scripted access to geographical location information associated with the hosting device privilege level public privilege http //tizen org/privilege/location required feature http //tizen org/feature/location gps pr widget specification description status widget packaging and xml configuration a packaging format and metadata for a class of software known as widgets rec widget interface api for widgets that provides, amongst other things, functionality for accessing a widget's metadata and persistently storing data lcwd xml digital signatures for widgets a profile of the xml signature syntax and processing 1 1 specification to allow a widget package to be digitally signed pr widget access request policy the security model controlling network access from within a widget, as well as a method for authors to request that the user agent grant access to certain network resources or sets thereof rec w3c specification status ed editor’s draft wd working draft lcwd last call working draft cr candidate recommendation pr proposed recommendation rec recommendation see w3c technical report development process for more details notethe apis in ed, wd, lc status are considered to be in preliminary state such apis do not carry a version compatibility promise they may change in future versions of tizen if the specifications change
Develop Smart Hospitality Display
apiw3c/html5 api references dom, forms and styles specification description status html5 forms partial html5 form features the content attribute currently not supported is formnovalidate of form element lcwd selectors api level 1 api for retrieving element nodes from the dom by matching against a group of selectors lcwd selectors api level 2 partial api for retrieving element nodes from the dom by matching against a group of selectors, and for testing if a given element matches a particular selector the methods currently not supported are queryscopedselector, queryscopedselectorall of nodeselector interface matchesselector of element interface wd media queries partial offers a mechanism that allows adapting the layout and behavior of a web page based on some of the characteristics of the device, including the screen width/height the query currently not supported is color-index, min-color-index, max-color-index, resolution, scan, print, 3d-glasses, grid rec css transforms css transforms allows elements styled with css to be transformed in two-dimensional or three-dimensional space wd css animations module level 3 css animations allow an author to modify css property values over time wd css transitions module level 3 partial css transitions allow property changes in css values to occur smoothly over a specified duration the method and attribute currently not supported are inittransitionevent of transitionevent interface pseudoelement of transitionevent interface wd css color module level 3 css3 color enhancements related to color values and properties for foreground color and group opacity rec css backgrounds and borders module level 3 rounded corners, complex background images, shadow effects cr css flexible box layout module css box model optimized for user interface design lcwd css multi-column layout module partial creates multiple columns for laying out text the property currently not supported is column-fill the values currently not supported are column, avoid-page and avoid-column of properties break-before and break-afteravoid-page and avoid-column of property break-inside cr css text module level 3 partial css properties for text manipulation and specifies their processing model the properties currently not supported are text-justify, text-decoration-color, text-decoration-line, text-decoration-style, text-decoration-skip, hanging-punctuation wd css basic user interface module level 3 css3 ui user interface related css enhancements lcwd css fonts module level 3 partial @font-face rule with downloadable font src url the features currently not supported are font-feature-settings, font-language-override, font-synthesis, font-variant-alternates, font-variant-caps, font-variant-east-asian, font-variant-numeric, font-variant-position, font-size-adjust, font-stretch wd woff file format 1 0 web open font format file format 1 0 pr dom/javascript related html5 enhancements handy dom/javascript related enhancements in html5 lcwd device specification description status touch events version 1 partial w3c touch event specification for touch devices the method currently not supported is identifiedtouch of touchlist interface wd deviceorientation event specification partial provides access to orientation and acceleration data the method and event currently not supported are initaccelerometerevent of devicemotionevent interface compassneedscalibration event required feature http //tizen org/feature/sensor accelerometer http //tizen org/feature/sensor gyroscope http //tizen org/feature/sensor magnetometer lcwd battery status api w3c battery api defines new dom event types that provide information about the battery status of the hosting device cr vibration api haptic feedback api from w3c lcwd html5 browser state signals when network connectivity is available to the web environment lcwd the screen orientation api to provide an interface for web applications to be able to read the screen orientation state, to be informed when this state changes and to be able to lock the screen orientation to a specific staterequired feature http //tizen org/feature/sensor magnetometer wd the network information api w3c network information api provides an interface for the web applications to access the underlying network information connection info of the device wd gamepad api the gamepad api specifies interfaces to access and respond to signals from gaming controllers and other game accessory devices in a structured way it contains 3 interfaces gamepad gamepadbutton gamepadevent the method navigator getgamepads returns an array of gamepad objects for each instance of gamepad connected to the device wd graphics specification description status html5 the canvas element partial html5 canvas element including 2d context and text the method currently not supported is toblob of htmlcanvaselement interface lcwd html canvas 2d context partial 2d context for the html canvas element the methods currently not supported are drawsystemfocusring, drawcustomfocusring, scrollpathintoview of canvasrenderingcontext2d interface wd html5 svg inline svg 1 1 support in html5 lcwd media specification description status html5 the video element partial html5 video element the attributes currently not supported are startoffsettime and videotracks of htmlmediaelement interface lcwd html5 the audio element partial html5 audio element the attributes currently not supported are startoffsettime and audiotracks of htmlmediaelement interface lcwd getusermedia partial api that directly manipulates streams from cameras and microphones the dictionary member currently not supported is audio of mediastreamoptions dictionary privilege http //tizen org/privilege/mediacapture public level required feature http //tizen org/feature/camera http //tizen org/feature/microphone ed web audio api partial w3c web audio api describes a high-level javascript api for processing and synthesizing audio in web applications the interfaces and attribute currently not supported are mediaelementaudiosourcenode and mediastreamaudiosourcenode interfaces computedvalue of audioparam interface the enum string constant value currently not supported for panningmodel attribute is soundfield of panningmodeltype enum wd html media capture capture and record multimedia content with input tag required feature http //tizen org/feature/camera http //tizen org/feature/microphone lcwd communication specification description status the websocket api offers bi-directional network connectivity cr xmlhttprequest level 2 enhancements on xhr, including binary file uploading, formdata submission, transfer progress, etc wd html5 the session history of browsing contexts partial navigating the sequence of documents in a browsing context the methods currently not supported are resolveurl of location interface initpopstateevent of popstateevent interface initpagetransitionevent of pagetransitionevent interface lcwd server-sent events the api allows triggering dom events based on push notifications via http and other protocols wd html5 web messaging html5 web messaging the postmessage api allows for web applications to communicate between each other cr storage specification description status web storage w3c storage specification including session and local storage cr file api reads files from local device file system wd file api directories and system api that allows accessing the device file system privilege level public privilege http //tizen org/privilege/unlimitedstorage wd file api writer partial saves or modifies files in local device file system the interface and method currently not supported are filesaver interface saveas of window interface privilege level public privilege http //tizen org/privilege/unlimitedstorage wd html5 application caches html5 application cache and custom handlers lcwd indexed database api partial a database of values and hierarchical objects that integrates naturally with javascript, and can be queried and updated very efficiently the attributes and method currently not supported are oldversion, newversion of idbversionchangeevent interface initidbversionchangeevent of idbversionchangeevent interface privilege level public privilege http //tizen org/privilege/unlimitedstorage wd web sql database api for storing data in databases that can be queried using a variant of sql privilege level public privilege http //tizen org/privilege/unlimitedstorage note security specification description status cross-origin resource sharing sharing of resources across different domains lcwd html5 the iframe element access restriction sandboxing for iframe content the available values of sandbox attribute are allow-same-origin, allow-scripts, allow-forms, allow-top-navigation lcwd content security policy 1 0 partial defines a policy language used to declare a set of content restrictions for a web resource, and a mechanism for transmitting the policy from a server to a client where the policy is enforced the directive currently not supported is object-src cr ui specification description status clipboard api and events partial to describe apis for clipboard operations such as copy, cut & paste in web applications the constructor of clipboardevent interface is not supported wd html5 drag and drop partial to define an event-based drag-and-drop mechanism the method currently not supported is addelement of datatransfer interface lcwd web notifications partial to define an api for displaying simple notifications to the user the dictionary members currently not supported are titledir, bodydir of notificationoptions dictionary privilege level public privilege http //tizen org/privilege/notification wd performance and optimization specification description status web workers partial api that allows web application authors to spawn background workers running scripts in parallel to their main page the event handlers, interfaces and attributes currently not supported are ononline, onoffline of workerglobalscope interface sharedworkerglobalscope and sharedworker interfaces lineno, filename of errorevent interface cr page visibility this specification defines a means for developers to programmatically determine the current visibility state of the page in order to develop power and cpu efficient web applications cr timing control for script-based animations resource effective animation timing control by user agent lcwd navigation timing this specification defines an interface for web applications to access timing information related to navigation and elements rec location specification description status geolocation api specification provides scripted access to geographical location information associated with the hosting device privilege level public privilege http //tizen org/privilege/location required feature http //tizen org/feature/location gps pr widget specification description status widget packaging and xml configuration a packaging format and metadata for a class of software known as widgets rec widget interface api for widgets that provides, amongst other things, functionality for accessing a widget's metadata and persistently storing data lcwd xml digital signatures for widgets a profile of the xml signature syntax and processing 1 1 specification to allow a widget package to be digitally signed pr widget access request policy the security model controlling network access from within a widget, as well as a method for authors to request that the user agent grant access to certain network resources or sets thereof rec w3c specification status ed editor’s draft wd working draft lcwd last call working draft cr candidate recommendation pr proposed recommendation rec recommendation see w3c technical report development process for more details notethe apis in ed, wd, lc status are considered to be in preliminary state such apis do not carry a version compatibility promise they may change in future versions of tizen if the specifications change
Develop Smart Hospitality Display
apigetting device capabilities using systeminfo api the following keys are available to obtain the device capability information using systeminfo api device capability keys battery camera content api database download api graphics input iotcon push api led location microphone multi-point touch multimedia transcoder network opengl® es platform profile sensor screen shell dynamic box sip speech tv usb vision web service system keys build information model name platform name tizen id the following table lists the keys to check if a device has a battery key type description version http //tizen org/feature/battery boolean the platform returns true for this key, if the device has a battery if it is true, w3c battery status api, battery property in systeminfo api, and power api must be supported 2 3 the following table lists the camera feature keys key type description version http //tizen org/feature/camera boolean the platform returns true for this key, if the device provides any kind of a camera if it is true, w3c getusermedia and html media capture apis are supported 2 2 1 http //tizen org/feature/camera back boolean the platform returns true for this key and the http //tizen org/feature/camera key, if the device provides a back-facing camera 2 2 1 http //tizen org/feature/camera back flash boolean the platform returns true for this key and the http //tizen org/feature/camera back key, if the device provides a back-facing camera with a flash 2 2 1 http //tizen org/feature/camera front boolean the platform returns true for this key and the http //tizen org/feature/camera key, if the device provides a front-facing camera 2 2 1 http //tizen org/feature/camera front flash boolean the platform returns true for this key and the http //tizen org/feature/camera front key, if the device provides a front-facing camera with a flash 2 2 1 the following table lists the keys related to content api features key type description version http //tizen org/feature/content scanning others boolean the platform returns true for this key, if the device supports the media scanning feature for "other"-type files which are not included in the media content types such as "image", "video", "sound" or "music" 4 0 the following table lists the database feature keys key type description version http //tizen org/feature/database encryption boolean the platform returns true for this key, if the device supports database encryption 2 2 1 the following table lists the keys to check if download api is supported on a tizen device key type description version http //tizen org/feature/download boolean the platform returns true for this key, if the device supports download api 2 3 http //tizen org/feature/network telephony boolean the platform returns true for this key, if the device supports all apis which require telephony feature if it is true, "cellular" in downloadnetworktype is supported 2 2 1 http //tizen org/feature/network wifi boolean the platform returns true for this key, if the device supports all apis which require wi-fi if it is true, "wifi" in downloadnetworktype is supported 2 2 1 the following table lists the graphics feature keys key type description version http //tizen org/feature/graphics acceleration boolean the platform returns true for this key, if the device supports graphics hardware acceleration 2 2 1 the following table lists the input feature keys key type description version http //tizen org/feature/input keyboard boolean the platform returns true for this key, if the device provides a built-in keyboard supporting any keyboard layout 2 2 1 http //tizen org/feature/input keyboard layout domstring the platform returns the keyboard layout such as qwerty supported by the built-in keyboard for this key and returns true for the http //tizen org/feature/input keyboard key if the device does not provide a built-in keyboard, the platform returns an empty string for this key and returns false for the http //tizen org/feature/input keyboard key 2 2 1 http //tizen org/feature/input rotating_bezel boolean the platform returns true for this key, if the device provides a built-in rotating bezel 2 3 1 the following table lists the keys related to iotcon api features key type description version http //tizen org/feature/iot ocf boolean the platform returns true for this key, if the device supports the iot connectivity if it is true, iotcon api is supported 4 0 the following table lists the led feature key key type description version http //tizen org/feature/led boolean the platform returns true for this key, if the device supports led 2 3 the following table lists the location feature keys key type description version http //tizen org/feature/location boolean the platform returns true for this key, if the device supports location positioning 2 2 1 http //tizen org/feature/location batch boolean the platform returns true for this key and the http //tizen org/feature/location key, if the device supports gps batch feature 2 3 http //tizen org/feature/location gps boolean the platform returns true and the http //tizen org/feature/location, if the device supports the global positioning system gps 2 2 1 http //tizen org/feature/location wps boolean the platform returns true for this key and the http //tizen org/feature/location key, if the device supports the wi-fi-based positioning system wps 2 2 1 the following table lists the microphone feature keys key type description version http //tizen org/feature/microphone boolean the platform returns true for this key, if the device supports a microphone if it is true, w3c getusermedia and html media capture apis are supported 2 2 1 http //tizen org/feature/media audio_recording boolean the platform returns true for this key, if the device supports to record audio files on a device if it is true, cordova media api is supported 3 0 the following table lists the multi-point touch feature keys key type description version http //tizen org/feature/multi_point_touch pinch_zoom boolean the platform returns true for this key, if the device supports pinch zoom gestures 2 2 1 http //tizen org/feature/multi_point_touch point_count long the platform returns the maximum number of supported multi-touch points for this key the platform returns a value less than 2 for this key, if the device does not support multi-point touch 2 2 1 the following table lists the multimedia transcoder feature key key type description version http //tizen org/feature/multimedia transcoder boolean the platform returns true for this key, if the device supports multimedia transcoder 2 3 the following table lists the network feature keys key type description version http //tizen org/capability/network bluetooth always_on boolean the platform returns true for this key, if the device must always enable bluetooth it means that an application cannot change the bluetooth's state visibility, connectivity, device name 2 3 http //tizen org/feature/network bluetooth boolean the platform returns true for this key, if the device supports bluetooth 2 2 1 http //tizen org/feature/network bluetooth audio call boolean the platform returns true for this key, if the device supports bluetooth handsfree profile hfp 2 3 http //tizen org/feature/network bluetooth audio media boolean the platform returns true for this key, if the device supports bluetooth advanced audio distribute profile a2dp 2 3 http //tizen org/feature/network bluetooth health boolean the platform returns true for this key, if the device supports bluetooth health device profile hdp 2 3 http //tizen org/feature/network bluetooth hid boolean the platform returns true for this key, if the device supports bluetooth human input device hid 2 3 http //tizen org/feature/network bluetooth le boolean the platform returns true for this key, if the device supports bluetooth low energy related methods in bluetooth api 2 3 http //tizen org/feature/network bluetooth opp boolean the platform returns true for this key, if the device supports bluetooth object push profile opp 2 3 http //tizen org/feature/network ethernet boolean the platform returns true for this key, if the device supports ethernet if it is true, "all" in downloadnetworktype and systeminfoethernetnetwork is supported 2 4 http //tizen org/feature/network internet boolean the platform returns true for this key, if the device supports internet 2 3 1 http //tizen org/feature/network net_proxy boolean the platform returns true for this key, if the device supports network proxy for internet connection 3 0 http //tizen org/feature/network nfc boolean the platform returns true for this key, if the device supports near field communication nfc 2 2 1 http //tizen org/feature/network nfc card_emulation boolean the platform returns true for this key, if the device is recognized by the nfc card readers 2 3 http //tizen org/feature/network nfc card_emulation hce boolean the platform returns true for this key, if the device supports nfc host-based card emulation 2 3 1 http //tizen org/feature/network nfc p2p boolean the platform returns true for this key, if the device supports p2p apis which require near field communication nfc 2 3 1 http //tizen org/feature/network nfc reserved_push boolean the platform returns true for this key and the http //tizen org/feature/network nfc key, if the device supports the nfc reserved push feature 2 2 1 http //tizen org/feature/network nfc tag boolean the platform returns true for this key, if the device supports tag apis which require near field communication nfc 2 3 1 http //tizen org/feature/network push boolean the platform returns true for this key, if the device supports push api which requires the ip push service provided by the tizen reference implementation 2 2 1 http //tizen org/feature/network secure_element boolean the platform returns true for this key, if the device supports secure elements 2 2 1 http //tizen org/feature/network telephony boolean the platform returns true for this key, if the device supports the telephony related apis 2 2 1 http //tizen org/feature/network telephony mms boolean the platform returns true for this key and the http //tizen org/feature/network telephony key, if the device supports mms 2 2 1 http //tizen org/feature/network wifi boolean the platform returns true for this key, if the device supports all apis which require wi-fi 2 2 1 http //tizen org/feature/network wifi direct boolean the platform returns true for this key and the http //tizen org/feature/network wifi key, if the device supports wi-fi direct™ 2 2 1 the following table lists the opengl® es feature keys key type description version http //tizen org/feature/opengles boolean the platform returns true for this key, if the device supports any opengl® es version and any texture format 2 2 1 http //tizen org/feature/opengles texture_format domstring the supported texture formats for the opengl® es e g "3dc/atc/etc/ptc" the platform returns an empty string for this key if opengl® es or compressed texture formats are not supported 2 3 http //tizen org/feature/opengles texture_format 3dc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the 3dc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles texture_format atc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the atc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles texture_format etc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the etc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles texture_format ptc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the ptc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles texture_format pvrtc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the pvrtc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles texture_format utc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the utc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles version 1_1 boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the opengl® es version 1 1 2 2 1 http //tizen org/feature/opengles version 2_0 boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the opengl® es version 2 0 2 2 1 the following table lists the platform feature keys key type description version http //tizen org/feature/platform core api version domstring the version of the tizen core api in the [major] [minor] format for example, "1 0" represents a web api version where the major version is 1 and the minor version is 0 if a device doesn't provide tizen core api, it returns an empty string "" 2 3 http //tizen org/feature/platform core cpu arch domstring the platform returns the cpu architecture e g "armv7", "x86" of a device 2 3 http //tizen org/feature/platform core cpu arch armv6 boolean the platform returns true for this key, if the device runs on the armv6 cpu architecture 2 2 1 http //tizen org/feature/platform core cpu arch armv7 boolean the platform returns true for this key, if the device runs on the armv7 cpu architecture 2 2 1 http //tizen org/feature/platform core cpu arch x86 boolean the platform returns true for this key, if the device runs on the x86 cpu architecture 2 2 1 http //tizen org/feature/platform core cpu frequency long the platform returns the frequency at which a core cpu is running unit mhz 2 3 http //tizen org/feature/platform core fpu arch domstring the platform returns the fpu architecture e g "vfpv3", "ssse3" of a device if there is no fpu on a device, it returns an empty string "" 2 3 http //tizen org/feature/platform core fpu arch sse2 boolean the platform returns true for this key, if the device runs on the sse2 fpu architecture 2 2 1 http //tizen org/feature/platform core fpu arch sse3 boolean the platform returns true for this key, if the device runs on the sse3 fpu architecture 2 2 1 http //tizen org/feature/platform core fpu arch ssse3 boolean the platform returns true for this key, if the device runs on the ssse3 fpu architecture 2 2 1 http //tizen org/feature/platform core fpu arch vfpv2 boolean the platform returns true for this key, if the device runs on the vfpv2 fpu architecture 2 2 1 http //tizen org/feature/platform core fpu arch vfpv3 boolean the platform returns true for this key, if the device runs on the vfpv3 fpu architecture 2 2 1 http //tizen org/feature/platform native api version domstring the version of the native api in the [major] [minor] format for example, 1 0 represents a native api version where the major version is 1 and the minor version is 0 if a device doesn't provide tizen native api, it returns an empty string "" 2 2 1 http //tizen org/feature/platform native osp_compatible boolean the platform returns true for this key, if the device supports the bada compatibility mode 2 2 1 http //tizen org/feature/platform version domstring the version of the platform in the [major] [minor] [patch version] format for example, 1 0 0 represents a platform version where the major version is 1 and the minor and build versions are 0 2 2 1 http //tizen org/feature/platform web api version domstring the version of the web api in the [major] [minor] format for example, 1 0 represents a web api version where the major version is 1 and the minor version is 0 2 2 1 http //tizen org/feature/platform version name domstring the platform return the platform version name e g tizen 2 0 magnolia, tizen 2 1 nectarine 2 3 the following table lists the profile feature keys key type description version http //tizen org/feature/profile systeminfoprofile the platform returns a compliant device profile such as "mobile", "wearable" for this key 2 2 1 the following table lists the sensor feature keys key type description version http //tizen org/feature/sensor accelerometer boolean the platform returns true for this key, if the device supports the acceleration sensor 2 2 1 http //tizen org/feature/sensor accelerometer wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor accelerometer key, if the device supports the wake-up operation by the acceleration sensor 2 2 1 http //tizen org/feature/sensor activity_recognition boolean the platform returns true for this key, if the device supports activity recognition 2 3 http //tizen org/feature/sensor barometer boolean the platform returns true for this key, if the device supports the barometer pressure sensor 2 2 1 http //tizen org/feature/sensor barometer wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor barometer key, if the device supports the wake-up operation by the barometer sensor 2 2 1 http //tizen org/feature/sensor gesture_recognition boolean the platform returns true for this key, if the device supports the gesture recognition 2 3 http //tizen org/feature/sensor gravity boolean the platform returns true for this key, if the device supports gravity 2 3 http //tizen org/feature/sensor gyroscope boolean the platform returns true for this key, if the device supports gyroscope 2 2 1 http //tizen org/feature/sensor gyroscope_rotation_vector boolean the platform returns true for this key, if the device supports gyroscope rotation vector 3 0 http //tizen org/feature/sensor gyroscope wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor gyroscope key, if the device supports the wake-up operation by the gyro sensor 2 2 1 http //tizen org/feature/sensor heart_rate_monitor boolean the platform returns true for this key if the device supports hrm 2 3 http //tizen org/feature/sensor heart_rate_monitor led_green boolean the platform returns true for this key if the device supports green light spectrum 2 3 1 http //tizen org/feature/sensor heart_rate_monitor led_ir boolean the platform returns true for this key if the device supports infrared spectrum 2 3 1 http //tizen org/feature/sensor heart_rate_monitor led_red boolean the platform returns true for this key if the device supports red light spectrum 2 3 1 http //tizen org/feature/sensor humidity boolean the platform returns true for this key, if the device supports the humidity sensor 2 3 http //tizen org/feature/sensor linear_acceleration boolean the platform returns true for this key, if the device supports the linear acceleration sensor 2 3 http //tizen org/feature/sensor magnetometer boolean the platform returns true for this key, if the device supports the magnetic sensor 2 2 1 http //tizen org/feature/sensor magnetometer wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor magnetometer key, if the device supports the wake-up operation by the magnetic sensor 2 2 1 http //tizen org/feature/sensor pedometer boolean the platform returns true for this key, if the device supports pedometer 2 3 http //tizen org/feature/sensor photometer boolean the platform returns true for this key, if the device supports the photometer sensor 2 2 1 http //tizen org/feature/sensor photometer wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor photometer key, if the device supports the wake-up operation by the photo sensor 2 2 1 http //tizen org/feature/sensor proximity boolean the platform returns true for this key, if the device supports the proximity sensor 2 2 1 http //tizen org/feature/sensor proximity wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor proximity key, if the device supports the wake-up operation by the proximity sensor 2 2 1 http //tizen org/feature/sensor rotation_vector boolean the platform returns true for this key, if the device supports the rotation vector sensor 2 3 http //tizen org/feature/sensor sleep_monitor boolean the platform returns true for this key, if the device supports sleep_monitor 3 0 http //tizen org/feature/sensor temperature boolean the platform returns true for this key, if the device supports the temperature sensor 2 3 http //tizen org/feature/sensor tiltmeter boolean the platform returns true for this key, if the device supports the tilt sensor 2 2 1 http //tizen org/feature/sensor tiltmeter wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor tiltmeter key, if the device supports the wake-up operation by the tilt sensor 2 2 1 http //tizen org/feature/sensor ultraviolet boolean the platform returns true for this key if the device supports ultraviolet sensor 2 3 http //tizen org/feature/sensor wrist_up boolean the platform returns true for this key if the device supports wrist_up 2 3 the following table lists the screen feature keys key type description version http //tizen org/feature/screen boolean the platform returns true for this key, if the device has a display screen 2 3 http //tizen org/feature/screen auto_rotation boolean the platform returns true for this key, if the device supports screen auto-rotation 2 2 1 http //tizen org/feature/screen bpp long the platform returns the number of bits per pixel supported by the device for this key the value depends on the screen, and is typically 8, 16, 24, or 32 2 2 1 http //tizen org/feature/screen coordinate_system size large boolean the platform returns true for this key, if the device supports the large screen size for the coordinate system 2 2 1 http //tizen org/feature/screen coordinate_system size normal boolean the platform returns true for this key, if the device supports the normal screen size for the coordinate system 2 2 1 http //tizen org/feature/screen dpi long the platform returns the number of dots per inch supported by the device for this key 2 2 1 http //tizen org/feature/screen height long the platform returns the height of the screen in pixels supported by the device for this key 2 2 1 http //tizen org/feature/screen output hdmi boolean the platform returns true for this key, if the device supports hdmi output 2 2 1 http //tizen org/feature/screen output rca boolean the platform returns true for this key, if the device supports rca output 2 2 1 http //tizen org/feature/screen shape circle boolean the platform returns true for this key, if the device supports a circular shaped screen 2 3 1 http //tizen org/feature/screen shape rectangle boolean the platform returns true for this key, if the device supports a rectangular shaped screen 2 3 1 http //tizen org/feature/screen size all boolean the platform can return true if the device supports any of screen sizes and resolutions if the device has a display screen, it returns true 2 2 1 http //tizen org/feature/screen size large boolean the platform can return true if the device supports the large screen size 2 2 1 http //tizen org/feature/screen size normal boolean the platform can return true the device supports the normal screen size 2 2 1 http //tizen org/feature/screen size normal 240 400 boolean the platform returns true for this key, if the device supports the 240 x 400 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 320 320 boolean the platform returns true for this key, if the device supports the 320 x 320 resolution for the normal screen size the platform can return true for multiple resolution keys 2 3 http //tizen org/feature/screen size normal 320 480 boolean the platform returns true for this key, if the device supports the 320 x 480 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 360 360 boolean the platform returns true for this key, if the device supports the 360 x 360 resolution for the normal screen size the platform can return true for multiple resolution keys 2 3 2 http //tizen org/feature/screen size normal 360 480 boolean the platform returns true for this key, if the device supports the 360 x 480 resolution for the normal screen size the platform can return true for multiple resolution keys 2 3 http //tizen org/feature/screen size normal 480 800 boolean the platform returns true for this key, if the device supports the 480 x 800 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 540 960 boolean the platform returns true for this key, if the device supports the 540 x 960 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 600 1024 boolean the platform returns true for this key, if the device supports the 600 x 1024 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 720 1280 boolean the platform returns true for this key, if the device supports the 720 x 1280 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 1080 1920 boolean the platform returns true for this key, if the device supports the 1080 x 1920 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen width long the platform returns the width of the screen in pixels supported by the device for this key 2 2 1 the following table lists the shell dynamic box feature keys key type description version http //tizen org/feature/shell appwidget boolean the platform returns true for this key, if the device supports the widget since 2 3 1, this key indicates only native widget 2 2 1 the following table lists the sip feature keys key type description version http //tizen org/feature/sip voip boolean the platform returns true for this key, if the device supports the voice over internet protocol voip 2 2 1 the following table lists the speech feature keys key type description version http //tizen org/feature/speech recognition boolean the platform returns true for this key, if the device supports speech recognition stt 2 2 1 http //tizen org/feature/speech synthesis boolean the platform returns true for this key, if the device supports speech synthesis tts 2 2 1 http //tizen org/feature/speech control boolean the platform returns true for this key, if the device supports speech control 4 0 the following table lists the tv feature keys key type description version http //tizen org/feature/tv audio boolean the platform returns true for this key, if the device supports control of tv audio if it is true, tvaudiocontrol api is supported 2 3 http //tizen org/feature/tv display boolean the platform returns true for this key, if the device supports getting information about the effects of stereoscopy 3d mode if it is true, tv display control api is supported 2 3 http //tizen org/feature/tv inputdevice boolean the platform returns true for this key, if the device supports receiving key events generated when the user presses a key of an input device for example a tv remote control if it is true, tv input device api is supported 2 3 http //tizen org/feature/tv pip boolean the platform returns true for this key, if the device supports control of tv window e g main window, pip window if it is true, tv window api is supported 2 3 the following table lists the usb feature keys key type description version http //tizen org/feature/usb accessory boolean the platform returns true for this key, if the device supports the usb client or accessory mode 2 2 1 http //tizen org/feature/usb host boolean the platform returns true for this key, if the device supports the usb host mode 2 2 1 the following table lists the vision feature keys key type description version http //tizen org/feature/vision face_recognition boolean the platform returns true for this key, if the device supports face recognition 2 2 1 http //tizen org/feature/vision image_recognition boolean the platform returns true for this key, if the device supports image recognition 2 2 1 http //tizen org/feature/vision qrcode_generation boolean the platform returns true for this key, if the device supports qr code generation 2 2 1 http //tizen org/feature/vision qrcode_recognition boolean the platform returns true for this key, if the device supports qr code recognition 2 2 1 the following table lists the web service model feature keys key type description version http //tizen org/feature/web service boolean the platform returns true for this key, if the device supports the web service model 2 3 the following table lists the build information key key type description version http //tizen org/system/build date domstring the platform returns the build date the format yyyy mm dd 2 3 http //tizen org/system/build string domstring the platform returns the build string including build date and time 2 3 http //tizen org/system/build time domstring the platform returns the build time the format hh mm ss 2 3 http //tizen org/system/manufacturer domstring the platform returns the device manufacturer's name 2 3 http //tizen org/system/build release domstring the platform returns the build version information the build version information is made when the platform image is created 3 0 http //tizen org/system/build type domstring the platform returns the build type, such as "user" or "eng" the build type is made when the platform image is created 3 0 http //tizen org/system/build variant domstring the platform returns the variant release information the variant release information is made when the platform image is created 3 0 http //tizen org/system/build id domstring the platform returns the build id the build id is made when the platform image is created 3 0 the following table lists the model name key key type description version http //tizen org/system/model_name domstring the platform returns the model name 2 3 the following table lists the platform system keys key type description version http //tizen org/system/platform communication_processor domstring the platform returns the device communication processor name 2 3 http //tizen org/system/platform name domstring the platform returns the platform name it must be tizen 2 2 1 http //tizen org/system/platform processor domstring the platform returns the device processor name 2 3 the following table lists the tizen id system key key type description version http //tizen org/system/tizenid domstring the platform returns the tizen id it is a randomly generated value based on the model name 2 3
Develop Smart TV
apigetting device capabilities using systeminfo api the following keys are available to obtain the device capability information using systeminfo api device capability keys battery camera content api database download api graphics input iotcon push api led location microphone multi-point touch multimedia transcoder network opengl® es platform profile sensor screen shell dynamic box sip speech tv usb vision web service system keys build information model name platform name tizen id the following table lists the keys to check if a device has a battery key type description version http //tizen org/feature/battery boolean the platform returns true for this key, if the device has a battery if it is true, w3c battery status api, battery property in systeminfo api, and power api must be supported 2 3 the following table lists the camera feature keys key type description version http //tizen org/feature/camera boolean the platform returns true for this key, if the device provides any kind of a camera if it is true, w3c getusermedia and html media capture apis are supported 2 2 1 http //tizen org/feature/camera back boolean the platform returns true for this key and the http //tizen org/feature/camera key, if the device provides a back-facing camera 2 2 1 http //tizen org/feature/camera back flash boolean the platform returns true for this key and the http //tizen org/feature/camera back key, if the device provides a back-facing camera with a flash 2 2 1 http //tizen org/feature/camera front boolean the platform returns true for this key and the http //tizen org/feature/camera key, if the device provides a front-facing camera 2 2 1 http //tizen org/feature/camera front flash boolean the platform returns true for this key and the http //tizen org/feature/camera front key, if the device provides a front-facing camera with a flash 2 2 1 the following table lists the keys related to content api features key type description version http //tizen org/feature/content scanning others boolean the platform returns true for this key, if the device supports the media scanning feature for "other"-type files which are not included in the media content types such as "image", "video", "sound" or "music" 4 0 the following table lists the database feature keys key type description version http //tizen org/feature/database encryption boolean the platform returns true for this key, if the device supports database encryption 2 2 1 the following table lists the keys to check if download api is supported on a tizen device key type description version http //tizen org/feature/download boolean the platform returns true for this key, if the device supports download api 2 3 http //tizen org/feature/network telephony boolean the platform returns true for this key, if the device supports all apis which require telephony feature if it is true, "cellular" in downloadnetworktype is supported 2 2 1 http //tizen org/feature/network wifi boolean the platform returns true for this key, if the device supports all apis which require wi-fi if it is true, "wifi" in downloadnetworktype is supported 2 2 1 the following table lists the graphics feature keys key type description version http //tizen org/feature/graphics acceleration boolean the platform returns true for this key, if the device supports graphics hardware acceleration 2 2 1 the following table lists the input feature keys key type description version http //tizen org/feature/input keyboard boolean the platform returns true for this key, if the device provides a built-in keyboard supporting any keyboard layout 2 2 1 http //tizen org/feature/input keyboard layout domstring the platform returns the keyboard layout such as qwerty supported by the built-in keyboard for this key and returns true for the http //tizen org/feature/input keyboard key if the device does not provide a built-in keyboard, the platform returns an empty string for this key and returns false for the http //tizen org/feature/input keyboard key 2 2 1 http //tizen org/feature/input rotating_bezel boolean the platform returns true for this key, if the device provides a built-in rotating bezel 2 3 1 the following table lists the keys related to iotcon api features key type description version http //tizen org/feature/iot ocf boolean the platform returns true for this key, if the device supports the iot connectivity if it is true, iotcon api is supported 4 0 the following table lists the led feature key key type description version http //tizen org/feature/led boolean the platform returns true for this key, if the device supports led 2 3 the following table lists the location feature keys key type description version http //tizen org/feature/location boolean the platform returns true for this key, if the device supports location positioning 2 2 1 http //tizen org/feature/location batch boolean the platform returns true for this key and the http //tizen org/feature/location key, if the device supports gps batch feature 2 3 http //tizen org/feature/location gps boolean the platform returns true and the http //tizen org/feature/location, if the device supports the global positioning system gps 2 2 1 http //tizen org/feature/location wps boolean the platform returns true for this key and the http //tizen org/feature/location key, if the device supports the wi-fi-based positioning system wps 2 2 1 the following table lists the microphone feature keys key type description version http //tizen org/feature/microphone boolean the platform returns true for this key, if the device supports a microphone if it is true, w3c getusermedia and html media capture apis are supported 2 2 1 http //tizen org/feature/media audio_recording boolean the platform returns true for this key, if the device supports to record audio files on a device if it is true, cordova media api is supported 3 0 the following table lists the multi-point touch feature keys key type description version http //tizen org/feature/multi_point_touch pinch_zoom boolean the platform returns true for this key, if the device supports pinch zoom gestures 2 2 1 http //tizen org/feature/multi_point_touch point_count long the platform returns the maximum number of supported multi-touch points for this key the platform returns a value less than 2 for this key, if the device does not support multi-point touch 2 2 1 the following table lists the multimedia transcoder feature key key type description version http //tizen org/feature/multimedia transcoder boolean the platform returns true for this key, if the device supports multimedia transcoder 2 3 the following table lists the network feature keys key type description version http //tizen org/capability/network bluetooth always_on boolean the platform returns true for this key, if the device must always enable bluetooth it means that an application cannot change the bluetooth's state visibility, connectivity, device name 2 3 http //tizen org/feature/network bluetooth boolean the platform returns true for this key, if the device supports bluetooth 2 2 1 http //tizen org/feature/network bluetooth audio call boolean the platform returns true for this key, if the device supports bluetooth handsfree profile hfp 2 3 http //tizen org/feature/network bluetooth audio media boolean the platform returns true for this key, if the device supports bluetooth advanced audio distribute profile a2dp 2 3 http //tizen org/feature/network bluetooth health boolean the platform returns true for this key, if the device supports bluetooth health device profile hdp 2 3 http //tizen org/feature/network bluetooth hid boolean the platform returns true for this key, if the device supports bluetooth human input device hid 2 3 http //tizen org/feature/network bluetooth le boolean the platform returns true for this key, if the device supports bluetooth low energy related methods in bluetooth api 2 3 http //tizen org/feature/network bluetooth opp boolean the platform returns true for this key, if the device supports bluetooth object push profile opp 2 3 http //tizen org/feature/network ethernet boolean the platform returns true for this key, if the device supports ethernet if it is true, "all" in downloadnetworktype and systeminfoethernetnetwork is supported 2 4 http //tizen org/feature/network internet boolean the platform returns true for this key, if the device supports internet 2 3 1 http //tizen org/feature/network net_proxy boolean the platform returns true for this key, if the device supports network proxy for internet connection 3 0 http //tizen org/feature/network nfc boolean the platform returns true for this key, if the device supports near field communication nfc 2 2 1 http //tizen org/feature/network nfc card_emulation boolean the platform returns true for this key, if the device is recognized by the nfc card readers 2 3 http //tizen org/feature/network nfc card_emulation hce boolean the platform returns true for this key, if the device supports nfc host-based card emulation 2 3 1 http //tizen org/feature/network nfc p2p boolean the platform returns true for this key, if the device supports p2p apis which require near field communication nfc 2 3 1 http //tizen org/feature/network nfc reserved_push boolean the platform returns true for this key and the http //tizen org/feature/network nfc key, if the device supports the nfc reserved push feature 2 2 1 http //tizen org/feature/network nfc tag boolean the platform returns true for this key, if the device supports tag apis which require near field communication nfc 2 3 1 http //tizen org/feature/network push boolean the platform returns true for this key, if the device supports push api which requires the ip push service provided by the tizen reference implementation 2 2 1 http //tizen org/feature/network secure_element boolean the platform returns true for this key, if the device supports secure elements 2 2 1 http //tizen org/feature/network telephony boolean the platform returns true for this key, if the device supports the telephony related apis 2 2 1 http //tizen org/feature/network telephony mms boolean the platform returns true for this key and the http //tizen org/feature/network telephony key, if the device supports mms 2 2 1 http //tizen org/feature/network wifi boolean the platform returns true for this key, if the device supports all apis which require wi-fi 2 2 1 http //tizen org/feature/network wifi direct boolean the platform returns true for this key and the http //tizen org/feature/network wifi key, if the device supports wi-fi direct™ 2 2 1 the following table lists the opengl® es feature keys key type description version http //tizen org/feature/opengles boolean the platform returns true for this key, if the device supports any opengl® es version and any texture format 2 2 1 http //tizen org/feature/opengles texture_format domstring the supported texture formats for the opengl® es e g "3dc/atc/etc/ptc" the platform returns an empty string for this key if opengl® es or compressed texture formats are not supported 2 3 http //tizen org/feature/opengles texture_format 3dc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the 3dc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles texture_format atc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the atc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles texture_format etc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the etc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles texture_format ptc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the ptc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles texture_format pvrtc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the pvrtc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles texture_format utc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the utc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles version 1_1 boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the opengl® es version 1 1 2 2 1 http //tizen org/feature/opengles version 2_0 boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the opengl® es version 2 0 2 2 1 the following table lists the platform feature keys key type description version http //tizen org/feature/platform core api version domstring the version of the tizen core api in the [major] [minor] format for example, "1 0" represents a web api version where the major version is 1 and the minor version is 0 if a device doesn't provide tizen core api, it returns an empty string "" 2 3 http //tizen org/feature/platform core cpu arch domstring the platform returns the cpu architecture e g "armv7", "x86" of a device 2 3 http //tizen org/feature/platform core cpu arch armv6 boolean the platform returns true for this key, if the device runs on the armv6 cpu architecture 2 2 1 http //tizen org/feature/platform core cpu arch armv7 boolean the platform returns true for this key, if the device runs on the armv7 cpu architecture 2 2 1 http //tizen org/feature/platform core cpu arch x86 boolean the platform returns true for this key, if the device runs on the x86 cpu architecture 2 2 1 http //tizen org/feature/platform core cpu frequency long the platform returns the frequency at which a core cpu is running unit mhz 2 3 http //tizen org/feature/platform core fpu arch domstring the platform returns the fpu architecture e g "vfpv3", "ssse3" of a device if there is no fpu on a device, it returns an empty string "" 2 3 http //tizen org/feature/platform core fpu arch sse2 boolean the platform returns true for this key, if the device runs on the sse2 fpu architecture 2 2 1 http //tizen org/feature/platform core fpu arch sse3 boolean the platform returns true for this key, if the device runs on the sse3 fpu architecture 2 2 1 http //tizen org/feature/platform core fpu arch ssse3 boolean the platform returns true for this key, if the device runs on the ssse3 fpu architecture 2 2 1 http //tizen org/feature/platform core fpu arch vfpv2 boolean the platform returns true for this key, if the device runs on the vfpv2 fpu architecture 2 2 1 http //tizen org/feature/platform core fpu arch vfpv3 boolean the platform returns true for this key, if the device runs on the vfpv3 fpu architecture 2 2 1 http //tizen org/feature/platform native api version domstring the version of the native api in the [major] [minor] format for example, 1 0 represents a native api version where the major version is 1 and the minor version is 0 if a device doesn't provide tizen native api, it returns an empty string "" 2 2 1 http //tizen org/feature/platform native osp_compatible boolean the platform returns true for this key, if the device supports the bada compatibility mode 2 2 1 http //tizen org/feature/platform version domstring the version of the platform in the [major] [minor] [patch version] format for example, 1 0 0 represents a platform version where the major version is 1 and the minor and build versions are 0 2 2 1 http //tizen org/feature/platform web api version domstring the version of the web api in the [major] [minor] format for example, 1 0 represents a web api version where the major version is 1 and the minor version is 0 2 2 1 http //tizen org/feature/platform version name domstring the platform return the platform version name e g tizen 2 0 magnolia, tizen 2 1 nectarine 2 3 the following table lists the profile feature keys key type description version http //tizen org/feature/profile systeminfoprofile the platform returns a compliant device profile such as "mobile", "wearable" for this key 2 2 1 the following table lists the sensor feature keys key type description version http //tizen org/feature/sensor accelerometer boolean the platform returns true for this key, if the device supports the acceleration sensor 2 2 1 http //tizen org/feature/sensor accelerometer wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor accelerometer key, if the device supports the wake-up operation by the acceleration sensor 2 2 1 http //tizen org/feature/sensor activity_recognition boolean the platform returns true for this key, if the device supports activity recognition 2 3 http //tizen org/feature/sensor barometer boolean the platform returns true for this key, if the device supports the barometer pressure sensor 2 2 1 http //tizen org/feature/sensor barometer wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor barometer key, if the device supports the wake-up operation by the barometer sensor 2 2 1 http //tizen org/feature/sensor gesture_recognition boolean the platform returns true for this key, if the device supports the gesture recognition 2 3 http //tizen org/feature/sensor gravity boolean the platform returns true for this key, if the device supports gravity 2 3 http //tizen org/feature/sensor gyroscope boolean the platform returns true for this key, if the device supports gyroscope 2 2 1 http //tizen org/feature/sensor gyroscope_rotation_vector boolean the platform returns true for this key, if the device supports gyroscope rotation vector 3 0 http //tizen org/feature/sensor gyroscope wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor gyroscope key, if the device supports the wake-up operation by the gyro sensor 2 2 1 http //tizen org/feature/sensor heart_rate_monitor boolean the platform returns true for this key if the device supports hrm 2 3 http //tizen org/feature/sensor heart_rate_monitor led_green boolean the platform returns true for this key if the device supports green light spectrum 2 3 1 http //tizen org/feature/sensor heart_rate_monitor led_ir boolean the platform returns true for this key if the device supports infrared spectrum 2 3 1 http //tizen org/feature/sensor heart_rate_monitor led_red boolean the platform returns true for this key if the device supports red light spectrum 2 3 1 http //tizen org/feature/sensor humidity boolean the platform returns true for this key, if the device supports the humidity sensor 2 3 http //tizen org/feature/sensor linear_acceleration boolean the platform returns true for this key, if the device supports the linear acceleration sensor 2 3 http //tizen org/feature/sensor magnetometer boolean the platform returns true for this key, if the device supports the magnetic sensor 2 2 1 http //tizen org/feature/sensor magnetometer wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor magnetometer key, if the device supports the wake-up operation by the magnetic sensor 2 2 1 http //tizen org/feature/sensor pedometer boolean the platform returns true for this key, if the device supports pedometer 2 3 http //tizen org/feature/sensor photometer boolean the platform returns true for this key, if the device supports the photometer sensor 2 2 1 http //tizen org/feature/sensor photometer wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor photometer key, if the device supports the wake-up operation by the photo sensor 2 2 1 http //tizen org/feature/sensor proximity boolean the platform returns true for this key, if the device supports the proximity sensor 2 2 1 http //tizen org/feature/sensor proximity wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor proximity key, if the device supports the wake-up operation by the proximity sensor 2 2 1 http //tizen org/feature/sensor rotation_vector boolean the platform returns true for this key, if the device supports the rotation vector sensor 2 3 http //tizen org/feature/sensor sleep_monitor boolean the platform returns true for this key, if the device supports sleep_monitor 3 0 http //tizen org/feature/sensor temperature boolean the platform returns true for this key, if the device supports the temperature sensor 2 3 http //tizen org/feature/sensor tiltmeter boolean the platform returns true for this key, if the device supports the tilt sensor 2 2 1 http //tizen org/feature/sensor tiltmeter wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor tiltmeter key, if the device supports the wake-up operation by the tilt sensor 2 2 1 http //tizen org/feature/sensor ultraviolet boolean the platform returns true for this key if the device supports ultraviolet sensor 2 3 http //tizen org/feature/sensor wrist_up boolean the platform returns true for this key if the device supports wrist_up 2 3 the following table lists the screen feature keys key type description version http //tizen org/feature/screen boolean the platform returns true for this key, if the device has a display screen 2 3 http //tizen org/feature/screen auto_rotation boolean the platform returns true for this key, if the device supports screen auto-rotation 2 2 1 http //tizen org/feature/screen bpp long the platform returns the number of bits per pixel supported by the device for this key the value depends on the screen, and is typically 8, 16, 24, or 32 2 2 1 http //tizen org/feature/screen coordinate_system size large boolean the platform returns true for this key, if the device supports the large screen size for the coordinate system 2 2 1 http //tizen org/feature/screen coordinate_system size normal boolean the platform returns true for this key, if the device supports the normal screen size for the coordinate system 2 2 1 http //tizen org/feature/screen dpi long the platform returns the number of dots per inch supported by the device for this key 2 2 1 http //tizen org/feature/screen height long the platform returns the height of the screen in pixels supported by the device for this key 2 2 1 http //tizen org/feature/screen output hdmi boolean the platform returns true for this key, if the device supports hdmi output 2 2 1 http //tizen org/feature/screen output rca boolean the platform returns true for this key, if the device supports rca output 2 2 1 http //tizen org/feature/screen shape circle boolean the platform returns true for this key, if the device supports a circular shaped screen 2 3 1 http //tizen org/feature/screen shape rectangle boolean the platform returns true for this key, if the device supports a rectangular shaped screen 2 3 1 http //tizen org/feature/screen size all boolean the platform can return true if the device supports any of screen sizes and resolutions if the device has a display screen, it returns true 2 2 1 http //tizen org/feature/screen size large boolean the platform can return true if the device supports the large screen size 2 2 1 http //tizen org/feature/screen size normal boolean the platform can return true the device supports the normal screen size 2 2 1 http //tizen org/feature/screen size normal 240 400 boolean the platform returns true for this key, if the device supports the 240 x 400 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 320 320 boolean the platform returns true for this key, if the device supports the 320 x 320 resolution for the normal screen size the platform can return true for multiple resolution keys 2 3 http //tizen org/feature/screen size normal 320 480 boolean the platform returns true for this key, if the device supports the 320 x 480 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 360 360 boolean the platform returns true for this key, if the device supports the 360 x 360 resolution for the normal screen size the platform can return true for multiple resolution keys 2 3 2 http //tizen org/feature/screen size normal 360 480 boolean the platform returns true for this key, if the device supports the 360 x 480 resolution for the normal screen size the platform can return true for multiple resolution keys 2 3 http //tizen org/feature/screen size normal 480 800 boolean the platform returns true for this key, if the device supports the 480 x 800 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 540 960 boolean the platform returns true for this key, if the device supports the 540 x 960 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 600 1024 boolean the platform returns true for this key, if the device supports the 600 x 1024 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 720 1280 boolean the platform returns true for this key, if the device supports the 720 x 1280 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 1080 1920 boolean the platform returns true for this key, if the device supports the 1080 x 1920 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen width long the platform returns the width of the screen in pixels supported by the device for this key 2 2 1 the following table lists the shell dynamic box feature keys key type description version http //tizen org/feature/shell appwidget boolean the platform returns true for this key, if the device supports the widget since 2 3 1, this key indicates only native widget 2 2 1 the following table lists the sip feature keys key type description version http //tizen org/feature/sip voip boolean the platform returns true for this key, if the device supports the voice over internet protocol voip 2 2 1 the following table lists the speech feature keys key type description version http //tizen org/feature/speech recognition boolean the platform returns true for this key, if the device supports speech recognition stt 2 2 1 http //tizen org/feature/speech synthesis boolean the platform returns true for this key, if the device supports speech synthesis tts 2 2 1 http //tizen org/feature/speech control boolean the platform returns true for this key, if the device supports speech control 4 0 the following table lists the tv feature keys key type description version http //tizen org/feature/tv audio boolean the platform returns true for this key, if the device supports control of tv audio if it is true, tvaudiocontrol api is supported 2 3 http //tizen org/feature/tv display boolean the platform returns true for this key, if the device supports getting information about the effects of stereoscopy 3d mode if it is true, tv display control api is supported 2 3 http //tizen org/feature/tv inputdevice boolean the platform returns true for this key, if the device supports receiving key events generated when the user presses a key of an input device for example a tv remote control if it is true, tv input device api is supported 2 3 http //tizen org/feature/tv pip boolean the platform returns true for this key, if the device supports control of tv window e g main window, pip window if it is true, tv window api is supported 2 3 the following table lists the usb feature keys key type description version http //tizen org/feature/usb accessory boolean the platform returns true for this key, if the device supports the usb client or accessory mode 2 2 1 http //tizen org/feature/usb host boolean the platform returns true for this key, if the device supports the usb host mode 2 2 1 the following table lists the vision feature keys key type description version http //tizen org/feature/vision face_recognition boolean the platform returns true for this key, if the device supports face recognition 2 2 1 http //tizen org/feature/vision image_recognition boolean the platform returns true for this key, if the device supports image recognition 2 2 1 http //tizen org/feature/vision qrcode_generation boolean the platform returns true for this key, if the device supports qr code generation 2 2 1 http //tizen org/feature/vision qrcode_recognition boolean the platform returns true for this key, if the device supports qr code recognition 2 2 1 the following table lists the web service model feature keys key type description version http //tizen org/feature/web service boolean the platform returns true for this key, if the device supports the web service model 2 3 the following table lists the build information key key type description version http //tizen org/system/build date domstring the platform returns the build date the format yyyy mm dd 2 3 http //tizen org/system/build string domstring the platform returns the build string including build date and time 2 3 http //tizen org/system/build time domstring the platform returns the build time the format hh mm ss 2 3 http //tizen org/system/manufacturer domstring the platform returns the device manufacturer's name 2 3 http //tizen org/system/build release domstring the platform returns the build version information the build version information is made when the platform image is created 3 0 http //tizen org/system/build type domstring the platform returns the build type, such as "user" or "eng" the build type is made when the platform image is created 3 0 http //tizen org/system/build variant domstring the platform returns the variant release information the variant release information is made when the platform image is created 3 0 http //tizen org/system/build id domstring the platform returns the build id the build id is made when the platform image is created 3 0 the following table lists the model name key key type description version http //tizen org/system/model_name domstring the platform returns the model name 2 3 the following table lists the platform system keys key type description version http //tizen org/system/platform communication_processor domstring the platform returns the device communication processor name 2 3 http //tizen org/system/platform name domstring the platform returns the platform name it must be tizen 2 2 1 http //tizen org/system/platform processor domstring the platform returns the device processor name 2 3 the following table lists the tizen id system key key type description version http //tizen org/system/tizenid domstring the platform returns the tizen id it is a randomly generated value based on the model name 2 3
Develop Smart Signage
apigetting device capabilities using systeminfo api the following keys are available to obtain the device capability information using systeminfo api device capability keys battery camera content api database download api graphics input iotcon push api led location microphone multi-point touch multimedia transcoder network opengl® es platform profile sensor screen shell dynamic box sip speech tv usb vision web service system keys build information model name platform name tizen id the following table lists the keys to check if a device has a battery key type description version http //tizen org/feature/battery boolean the platform returns true for this key, if the device has a battery if it is true, w3c battery status api, battery property in systeminfo api, and power api must be supported 2 3 the following table lists the camera feature keys key type description version http //tizen org/feature/camera boolean the platform returns true for this key, if the device provides any kind of a camera if it is true, w3c getusermedia and html media capture apis are supported 2 2 1 http //tizen org/feature/camera back boolean the platform returns true for this key and the http //tizen org/feature/camera key, if the device provides a back-facing camera 2 2 1 http //tizen org/feature/camera back flash boolean the platform returns true for this key and the http //tizen org/feature/camera back key, if the device provides a back-facing camera with a flash 2 2 1 http //tizen org/feature/camera front boolean the platform returns true for this key and the http //tizen org/feature/camera key, if the device provides a front-facing camera 2 2 1 http //tizen org/feature/camera front flash boolean the platform returns true for this key and the http //tizen org/feature/camera front key, if the device provides a front-facing camera with a flash 2 2 1 the following table lists the keys related to content api features key type description version http //tizen org/feature/content scanning others boolean the platform returns true for this key, if the device supports the media scanning feature for "other"-type files which are not included in the media content types such as "image", "video", "sound" or "music" 4 0 the following table lists the database feature keys key type description version http //tizen org/feature/database encryption boolean the platform returns true for this key, if the device supports database encryption 2 2 1 the following table lists the keys to check if download api is supported on a tizen device key type description version http //tizen org/feature/download boolean the platform returns true for this key, if the device supports download api 2 3 http //tizen org/feature/network telephony boolean the platform returns true for this key, if the device supports all apis which require telephony feature if it is true, "cellular" in downloadnetworktype is supported 2 2 1 http //tizen org/feature/network wifi boolean the platform returns true for this key, if the device supports all apis which require wi-fi if it is true, "wifi" in downloadnetworktype is supported 2 2 1 the following table lists the graphics feature keys key type description version http //tizen org/feature/graphics acceleration boolean the platform returns true for this key, if the device supports graphics hardware acceleration 2 2 1 the following table lists the input feature keys key type description version http //tizen org/feature/input keyboard boolean the platform returns true for this key, if the device provides a built-in keyboard supporting any keyboard layout 2 2 1 http //tizen org/feature/input keyboard layout domstring the platform returns the keyboard layout such as qwerty supported by the built-in keyboard for this key and returns true for the http //tizen org/feature/input keyboard key if the device does not provide a built-in keyboard, the platform returns an empty string for this key and returns false for the http //tizen org/feature/input keyboard key 2 2 1 http //tizen org/feature/input rotating_bezel boolean the platform returns true for this key, if the device provides a built-in rotating bezel 2 3 1 the following table lists the keys related to iotcon api features key type description version http //tizen org/feature/iot ocf boolean the platform returns true for this key, if the device supports the iot connectivity if it is true, iotcon api is supported 4 0 the following table lists the led feature key key type description version http //tizen org/feature/led boolean the platform returns true for this key, if the device supports led 2 3 the following table lists the location feature keys key type description version http //tizen org/feature/location boolean the platform returns true for this key, if the device supports location positioning 2 2 1 http //tizen org/feature/location batch boolean the platform returns true for this key and the http //tizen org/feature/location key, if the device supports gps batch feature 2 3 http //tizen org/feature/location gps boolean the platform returns true and the http //tizen org/feature/location, if the device supports the global positioning system gps 2 2 1 http //tizen org/feature/location wps boolean the platform returns true for this key and the http //tizen org/feature/location key, if the device supports the wi-fi-based positioning system wps 2 2 1 the following table lists the microphone feature keys key type description version http //tizen org/feature/microphone boolean the platform returns true for this key, if the device supports a microphone if it is true, w3c getusermedia and html media capture apis are supported 2 2 1 http //tizen org/feature/media audio_recording boolean the platform returns true for this key, if the device supports to record audio files on a device if it is true, cordova media api is supported 3 0 the following table lists the multi-point touch feature keys key type description version http //tizen org/feature/multi_point_touch pinch_zoom boolean the platform returns true for this key, if the device supports pinch zoom gestures 2 2 1 http //tizen org/feature/multi_point_touch point_count long the platform returns the maximum number of supported multi-touch points for this key the platform returns a value less than 2 for this key, if the device does not support multi-point touch 2 2 1 the following table lists the multimedia transcoder feature key key type description version http //tizen org/feature/multimedia transcoder boolean the platform returns true for this key, if the device supports multimedia transcoder 2 3 the following table lists the network feature keys key type description version http //tizen org/capability/network bluetooth always_on boolean the platform returns true for this key, if the device must always enable bluetooth it means that an application cannot change the bluetooth's state visibility, connectivity, device name 2 3 http //tizen org/feature/network bluetooth boolean the platform returns true for this key, if the device supports bluetooth 2 2 1 http //tizen org/feature/network bluetooth audio call boolean the platform returns true for this key, if the device supports bluetooth handsfree profile hfp 2 3 http //tizen org/feature/network bluetooth audio media boolean the platform returns true for this key, if the device supports bluetooth advanced audio distribute profile a2dp 2 3 http //tizen org/feature/network bluetooth health boolean the platform returns true for this key, if the device supports bluetooth health device profile hdp 2 3 http //tizen org/feature/network bluetooth hid boolean the platform returns true for this key, if the device supports bluetooth human input device hid 2 3 http //tizen org/feature/network bluetooth le boolean the platform returns true for this key, if the device supports bluetooth low energy related methods in bluetooth api 2 3 http //tizen org/feature/network bluetooth opp boolean the platform returns true for this key, if the device supports bluetooth object push profile opp 2 3 http //tizen org/feature/network ethernet boolean the platform returns true for this key, if the device supports ethernet if it is true, "all" in downloadnetworktype and systeminfoethernetnetwork is supported 2 4 http //tizen org/feature/network internet boolean the platform returns true for this key, if the device supports internet 2 3 1 http //tizen org/feature/network net_proxy boolean the platform returns true for this key, if the device supports network proxy for internet connection 3 0 http //tizen org/feature/network nfc boolean the platform returns true for this key, if the device supports near field communication nfc 2 2 1 http //tizen org/feature/network nfc card_emulation boolean the platform returns true for this key, if the device is recognized by the nfc card readers 2 3 http //tizen org/feature/network nfc card_emulation hce boolean the platform returns true for this key, if the device supports nfc host-based card emulation 2 3 1 http //tizen org/feature/network nfc p2p boolean the platform returns true for this key, if the device supports p2p apis which require near field communication nfc 2 3 1 http //tizen org/feature/network nfc reserved_push boolean the platform returns true for this key and the http //tizen org/feature/network nfc key, if the device supports the nfc reserved push feature 2 2 1 http //tizen org/feature/network nfc tag boolean the platform returns true for this key, if the device supports tag apis which require near field communication nfc 2 3 1 http //tizen org/feature/network push boolean the platform returns true for this key, if the device supports push api which requires the ip push service provided by the tizen reference implementation 2 2 1 http //tizen org/feature/network secure_element boolean the platform returns true for this key, if the device supports secure elements 2 2 1 http //tizen org/feature/network telephony boolean the platform returns true for this key, if the device supports the telephony related apis 2 2 1 http //tizen org/feature/network telephony mms boolean the platform returns true for this key and the http //tizen org/feature/network telephony key, if the device supports mms 2 2 1 http //tizen org/feature/network wifi boolean the platform returns true for this key, if the device supports all apis which require wi-fi 2 2 1 http //tizen org/feature/network wifi direct boolean the platform returns true for this key and the http //tizen org/feature/network wifi key, if the device supports wi-fi direct™ 2 2 1 the following table lists the opengl® es feature keys key type description version http //tizen org/feature/opengles boolean the platform returns true for this key, if the device supports any opengl® es version and any texture format 2 2 1 http //tizen org/feature/opengles texture_format domstring the supported texture formats for the opengl® es e g "3dc/atc/etc/ptc" the platform returns an empty string for this key if opengl® es or compressed texture formats are not supported 2 3 http //tizen org/feature/opengles texture_format 3dc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the 3dc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles texture_format atc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the atc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles texture_format etc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the etc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles texture_format ptc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the ptc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles texture_format pvrtc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the pvrtc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles texture_format utc boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the utc texture format for opengl® es 2 2 1 http //tizen org/feature/opengles version 1_1 boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the opengl® es version 1 1 2 2 1 http //tizen org/feature/opengles version 2_0 boolean the platform returns true for this key and the http //tizen org/feature/opengles key, if the device supports the opengl® es version 2 0 2 2 1 the following table lists the platform feature keys key type description version http //tizen org/feature/platform core api version domstring the version of the tizen core api in the [major] [minor] format for example, "1 0" represents a web api version where the major version is 1 and the minor version is 0 if a device doesn't provide tizen core api, it returns an empty string "" 2 3 http //tizen org/feature/platform core cpu arch domstring the platform returns the cpu architecture e g "armv7", "x86" of a device 2 3 http //tizen org/feature/platform core cpu arch armv6 boolean the platform returns true for this key, if the device runs on the armv6 cpu architecture 2 2 1 http //tizen org/feature/platform core cpu arch armv7 boolean the platform returns true for this key, if the device runs on the armv7 cpu architecture 2 2 1 http //tizen org/feature/platform core cpu arch x86 boolean the platform returns true for this key, if the device runs on the x86 cpu architecture 2 2 1 http //tizen org/feature/platform core cpu frequency long the platform returns the frequency at which a core cpu is running unit mhz 2 3 http //tizen org/feature/platform core fpu arch domstring the platform returns the fpu architecture e g "vfpv3", "ssse3" of a device if there is no fpu on a device, it returns an empty string "" 2 3 http //tizen org/feature/platform core fpu arch sse2 boolean the platform returns true for this key, if the device runs on the sse2 fpu architecture 2 2 1 http //tizen org/feature/platform core fpu arch sse3 boolean the platform returns true for this key, if the device runs on the sse3 fpu architecture 2 2 1 http //tizen org/feature/platform core fpu arch ssse3 boolean the platform returns true for this key, if the device runs on the ssse3 fpu architecture 2 2 1 http //tizen org/feature/platform core fpu arch vfpv2 boolean the platform returns true for this key, if the device runs on the vfpv2 fpu architecture 2 2 1 http //tizen org/feature/platform core fpu arch vfpv3 boolean the platform returns true for this key, if the device runs on the vfpv3 fpu architecture 2 2 1 http //tizen org/feature/platform native api version domstring the version of the native api in the [major] [minor] format for example, 1 0 represents a native api version where the major version is 1 and the minor version is 0 if a device doesn't provide tizen native api, it returns an empty string "" 2 2 1 http //tizen org/feature/platform native osp_compatible boolean the platform returns true for this key, if the device supports the bada compatibility mode 2 2 1 http //tizen org/feature/platform version domstring the version of the platform in the [major] [minor] [patch version] format for example, 1 0 0 represents a platform version where the major version is 1 and the minor and build versions are 0 2 2 1 http //tizen org/feature/platform web api version domstring the version of the web api in the [major] [minor] format for example, 1 0 represents a web api version where the major version is 1 and the minor version is 0 2 2 1 http //tizen org/feature/platform version name domstring the platform return the platform version name e g tizen 2 0 magnolia, tizen 2 1 nectarine 2 3 the following table lists the profile feature keys key type description version http //tizen org/feature/profile systeminfoprofile the platform returns a compliant device profile such as "mobile", "wearable" for this key 2 2 1 the following table lists the sensor feature keys key type description version http //tizen org/feature/sensor accelerometer boolean the platform returns true for this key, if the device supports the acceleration sensor 2 2 1 http //tizen org/feature/sensor accelerometer wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor accelerometer key, if the device supports the wake-up operation by the acceleration sensor 2 2 1 http //tizen org/feature/sensor activity_recognition boolean the platform returns true for this key, if the device supports activity recognition 2 3 http //tizen org/feature/sensor barometer boolean the platform returns true for this key, if the device supports the barometer pressure sensor 2 2 1 http //tizen org/feature/sensor barometer wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor barometer key, if the device supports the wake-up operation by the barometer sensor 2 2 1 http //tizen org/feature/sensor gesture_recognition boolean the platform returns true for this key, if the device supports the gesture recognition 2 3 http //tizen org/feature/sensor gravity boolean the platform returns true for this key, if the device supports gravity 2 3 http //tizen org/feature/sensor gyroscope boolean the platform returns true for this key, if the device supports gyroscope 2 2 1 http //tizen org/feature/sensor gyroscope_rotation_vector boolean the platform returns true for this key, if the device supports gyroscope rotation vector 3 0 http //tizen org/feature/sensor gyroscope wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor gyroscope key, if the device supports the wake-up operation by the gyro sensor 2 2 1 http //tizen org/feature/sensor heart_rate_monitor boolean the platform returns true for this key if the device supports hrm 2 3 http //tizen org/feature/sensor heart_rate_monitor led_green boolean the platform returns true for this key if the device supports green light spectrum 2 3 1 http //tizen org/feature/sensor heart_rate_monitor led_ir boolean the platform returns true for this key if the device supports infrared spectrum 2 3 1 http //tizen org/feature/sensor heart_rate_monitor led_red boolean the platform returns true for this key if the device supports red light spectrum 2 3 1 http //tizen org/feature/sensor humidity boolean the platform returns true for this key, if the device supports the humidity sensor 2 3 http //tizen org/feature/sensor linear_acceleration boolean the platform returns true for this key, if the device supports the linear acceleration sensor 2 3 http //tizen org/feature/sensor magnetometer boolean the platform returns true for this key, if the device supports the magnetic sensor 2 2 1 http //tizen org/feature/sensor magnetometer wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor magnetometer key, if the device supports the wake-up operation by the magnetic sensor 2 2 1 http //tizen org/feature/sensor pedometer boolean the platform returns true for this key, if the device supports pedometer 2 3 http //tizen org/feature/sensor photometer boolean the platform returns true for this key, if the device supports the photometer sensor 2 2 1 http //tizen org/feature/sensor photometer wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor photometer key, if the device supports the wake-up operation by the photo sensor 2 2 1 http //tizen org/feature/sensor proximity boolean the platform returns true for this key, if the device supports the proximity sensor 2 2 1 http //tizen org/feature/sensor proximity wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor proximity key, if the device supports the wake-up operation by the proximity sensor 2 2 1 http //tizen org/feature/sensor rotation_vector boolean the platform returns true for this key, if the device supports the rotation vector sensor 2 3 http //tizen org/feature/sensor sleep_monitor boolean the platform returns true for this key, if the device supports sleep_monitor 3 0 http //tizen org/feature/sensor temperature boolean the platform returns true for this key, if the device supports the temperature sensor 2 3 http //tizen org/feature/sensor tiltmeter boolean the platform returns true for this key, if the device supports the tilt sensor 2 2 1 http //tizen org/feature/sensor tiltmeter wakeup boolean the platform returns true for this key and the http //tizen org/feature/sensor tiltmeter key, if the device supports the wake-up operation by the tilt sensor 2 2 1 http //tizen org/feature/sensor ultraviolet boolean the platform returns true for this key if the device supports ultraviolet sensor 2 3 http //tizen org/feature/sensor wrist_up boolean the platform returns true for this key if the device supports wrist_up 2 3 the following table lists the screen feature keys key type description version http //tizen org/feature/screen boolean the platform returns true for this key, if the device has a display screen 2 3 http //tizen org/feature/screen auto_rotation boolean the platform returns true for this key, if the device supports screen auto-rotation 2 2 1 http //tizen org/feature/screen bpp long the platform returns the number of bits per pixel supported by the device for this key the value depends on the screen, and is typically 8, 16, 24, or 32 2 2 1 http //tizen org/feature/screen coordinate_system size large boolean the platform returns true for this key, if the device supports the large screen size for the coordinate system 2 2 1 http //tizen org/feature/screen coordinate_system size normal boolean the platform returns true for this key, if the device supports the normal screen size for the coordinate system 2 2 1 http //tizen org/feature/screen dpi long the platform returns the number of dots per inch supported by the device for this key 2 2 1 http //tizen org/feature/screen height long the platform returns the height of the screen in pixels supported by the device for this key 2 2 1 http //tizen org/feature/screen output hdmi boolean the platform returns true for this key, if the device supports hdmi output 2 2 1 http //tizen org/feature/screen output rca boolean the platform returns true for this key, if the device supports rca output 2 2 1 http //tizen org/feature/screen shape circle boolean the platform returns true for this key, if the device supports a circular shaped screen 2 3 1 http //tizen org/feature/screen shape rectangle boolean the platform returns true for this key, if the device supports a rectangular shaped screen 2 3 1 http //tizen org/feature/screen size all boolean the platform can return true if the device supports any of screen sizes and resolutions if the device has a display screen, it returns true 2 2 1 http //tizen org/feature/screen size large boolean the platform can return true if the device supports the large screen size 2 2 1 http //tizen org/feature/screen size normal boolean the platform can return true the device supports the normal screen size 2 2 1 http //tizen org/feature/screen size normal 240 400 boolean the platform returns true for this key, if the device supports the 240 x 400 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 320 320 boolean the platform returns true for this key, if the device supports the 320 x 320 resolution for the normal screen size the platform can return true for multiple resolution keys 2 3 http //tizen org/feature/screen size normal 320 480 boolean the platform returns true for this key, if the device supports the 320 x 480 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 360 360 boolean the platform returns true for this key, if the device supports the 360 x 360 resolution for the normal screen size the platform can return true for multiple resolution keys 2 3 2 http //tizen org/feature/screen size normal 360 480 boolean the platform returns true for this key, if the device supports the 360 x 480 resolution for the normal screen size the platform can return true for multiple resolution keys 2 3 http //tizen org/feature/screen size normal 480 800 boolean the platform returns true for this key, if the device supports the 480 x 800 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 540 960 boolean the platform returns true for this key, if the device supports the 540 x 960 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 600 1024 boolean the platform returns true for this key, if the device supports the 600 x 1024 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 720 1280 boolean the platform returns true for this key, if the device supports the 720 x 1280 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen size normal 1080 1920 boolean the platform returns true for this key, if the device supports the 1080 x 1920 resolution for the normal screen size the platform can return true for multiple resolution keys 2 2 1 http //tizen org/feature/screen width long the platform returns the width of the screen in pixels supported by the device for this key 2 2 1 the following table lists the shell dynamic box feature keys key type description version http //tizen org/feature/shell appwidget boolean the platform returns true for this key, if the device supports the widget since 2 3 1, this key indicates only native widget 2 2 1 the following table lists the sip feature keys key type description version http //tizen org/feature/sip voip boolean the platform returns true for this key, if the device supports the voice over internet protocol voip 2 2 1 the following table lists the speech feature keys key type description version http //tizen org/feature/speech recognition boolean the platform returns true for this key, if the device supports speech recognition stt 2 2 1 http //tizen org/feature/speech synthesis boolean the platform returns true for this key, if the device supports speech synthesis tts 2 2 1 http //tizen org/feature/speech control boolean the platform returns true for this key, if the device supports speech control 4 0 the following table lists the tv feature keys key type description version http //tizen org/feature/tv audio boolean the platform returns true for this key, if the device supports control of tv audio if it is true, tvaudiocontrol api is supported 2 3 http //tizen org/feature/tv display boolean the platform returns true for this key, if the device supports getting information about the effects of stereoscopy 3d mode if it is true, tv display control api is supported 2 3 http //tizen org/feature/tv inputdevice boolean the platform returns true for this key, if the device supports receiving key events generated when the user presses a key of an input device for example a tv remote control if it is true, tv input device api is supported 2 3 http //tizen org/feature/tv pip boolean the platform returns true for this key, if the device supports control of tv window e g main window, pip window if it is true, tv window api is supported 2 3 the following table lists the usb feature keys key type description version http //tizen org/feature/usb accessory boolean the platform returns true for this key, if the device supports the usb client or accessory mode 2 2 1 http //tizen org/feature/usb host boolean the platform returns true for this key, if the device supports the usb host mode 2 2 1 the following table lists the vision feature keys key type description version http //tizen org/feature/vision face_recognition boolean the platform returns true for this key, if the device supports face recognition 2 2 1 http //tizen org/feature/vision image_recognition boolean the platform returns true for this key, if the device supports image recognition 2 2 1 http //tizen org/feature/vision qrcode_generation boolean the platform returns true for this key, if the device supports qr code generation 2 2 1 http //tizen org/feature/vision qrcode_recognition boolean the platform returns true for this key, if the device supports qr code recognition 2 2 1 the following table lists the web service model feature keys key type description version http //tizen org/feature/web service boolean the platform returns true for this key, if the device supports the web service model 2 3 the following table lists the build information key key type description version http //tizen org/system/build date domstring the platform returns the build date the format yyyy mm dd 2 3 http //tizen org/system/build string domstring the platform returns the build string including build date and time 2 3 http //tizen org/system/build time domstring the platform returns the build time the format hh mm ss 2 3 http //tizen org/system/manufacturer domstring the platform returns the device manufacturer's name 2 3 http //tizen org/system/build release domstring the platform returns the build version information the build version information is made when the platform image is created 3 0 http //tizen org/system/build type domstring the platform returns the build type, such as "user" or "eng" the build type is made when the platform image is created 3 0 http //tizen org/system/build variant domstring the platform returns the variant release information the variant release information is made when the platform image is created 3 0 http //tizen org/system/build id domstring the platform returns the build id the build id is made when the platform image is created 3 0 the following table lists the model name key key type description version http //tizen org/system/model_name domstring the platform returns the model name 2 3 the following table lists the platform system keys key type description version http //tizen org/system/platform communication_processor domstring the platform returns the device communication processor name 2 3 http //tizen org/system/platform name domstring the platform returns the platform name it must be tizen 2 2 1 http //tizen org/system/platform processor domstring the platform returns the device processor name 2 3 the following table lists the tizen id system key key type description version http //tizen org/system/tizenid domstring the platform returns the tizen id it is a randomly generated value based on the model name 2 3
tutorials game, mobile
bloganti-aliasing is an important addition to any game to improve visual quality by smoothing out the jagged edges of a scene. msaa (multisample anti-aliasing) is one of the oldest methods to achieve this and is still the preferred solution for mobile. however it is only suitable for forward rendering and, with mobile performance improving year over year, deferred rendering is becoming more common, necessitating the use of post-process aa. this leaves slim pickings as such algorithms tend to be too expensive for mobile gpus with fxaa (fast approximate anti-aliasing) being the only ‘cheap’ option among them. fxaa may be performant enough but it only has simple colour discontinuity shape detection, leading to an often unwanted softening of the image. its kernel is also limited in size, so it struggles to anti-alias longer edges effectively. space module scene with cmaa applied. conservative morphological anti-aliasing conservative morphological anti-aliasing (cmaa) is a post-process aa solution originally developed by intel for their low power integrated gpus 1. its design goals are to be a better alternative to fxaa by: being minimally invasive so it can be acceptable as a replacement in a wide range of applications, including worst case scenarios such as text, repeating patterns, certain geometries (power lines, mesh fences, foliage), and moving images. running efficiently on low-medium range gpu hardware, such as integrated gpus (or, in our case, mobile gpus). we have repurposed this desktop-developed algorithm and come up with a hybrid between the original 1.3 version and the updated 2.0 version 2 to make the best use of mobile hardware. a demo app was created using khronos’ vulkan samples as a framework (which could also be done with gles) to implement this experiment. the sample has a drop down menu for easy switching between the different aa solutions and presents a frametime and bandwidth overlay. cmaa has four basic logical steps: image analysis for colour discontinuities (afterwards stored in a local compressed 'edge' buffer). the method used is not unique to cmaa. extracting locally dominant edges with a small kernel. (unique variation of existing algorithms.) handling of simple shapes. handling of symmetrical long edge shapes. (unique take on the original mlaa shape handling algorithm.) pass 1 edge detection result captured in renderdoc. a full screen edge detection pass is done in a fragment shader and the resulting colour discontinuity values are written into a colour attachment. our implementation uses the pixels’ luminance values to find edge discontinuities for speed and simplicity. an edge exists if the contrast between neighbouring pixels is above an empirically determined threshold. pass 2 neighbouring edges considered for local contrast adaptation. a local contrast adaptation is performed for each detected edge by comparing the value of the previous pass against the values of its closest neighbours by creating a threshold from the average and largest of these, as described by the formula below. any that pass the threshold are written into an image as a confirmed edge. threshold = (avg+avgxy) * (1.0 - nondominantedgeremovalamount) + maxe * (nondominantedgeremovalamount); nondominantedgeremovalamount is another empirically determined variable. pass 3 this pass collects all the edges for each pixel from the previous pass and packs them into a new image for the final pass. this pass also does the first part of edge blending. the detected edges are used to look for 2, 3 and 4 edges in a pixel and then blend in the colours from the adjacent pixels. this helps avoid the unnecessary blending of straight edges. pass 4 the final pass does long edge blending by identifying z-shapes in the detected edges. for each detected z-shape, the length of the edge is traced in both directions until it reaches the end or until it runs into a perpendicular edge. pixel blending is then performed along the traced edges proportional to their distance from the centre. before and after of z-shape detection. results image comparison shows a typical scenario for aa. cmaa manages high quality anti-aliasing while retaining sharpness on straight edges. cmaa demonstrates itself as a superior solution to aliasing than fxaa by avoiding the latter’s limitations. it maintains a crisper look to the overall image and won’t smudge thin lines, all while still providing effective anti-aliasing to curved edges. it also provides a significant performance advantage to qualcomm devices and only a small penalty to arm. image comparison shows a weakness of fxaa where it smudges thin lined geometry into the background. cmaa shows no such weakness and retains the colour of the railing while adding anti-aliasing effectively. msaa is still a clear winner and our recommended solution if your game allows for it to be resolved within a single render pass. for any case where that is impractical, cmaa is overall a better alternative than fxaa and should be strongly considered. graph shows the increase in frametime for each aa method across a range of samsung devices. follow up this site has many resources for developers looking to build for and integrate with samsung devices and services. stay in touch with the latest news by creating a free account or by subscribing to our monthly newsletter. visit the marketing resources page for information on promoting and distributing your apps. finally, our developer forum is an excellent way to stay up-to-date on all things related to the galaxy ecosystem. references filip strugar and leigh davies: conservative morphological anti-aliasing (cmaa) – march 2014. filip strugar and adam t lake: conservative morphological anti-aliasing 2.0 – april 2018.
Samsung GameDev Team
Develop Smart TV
docweb app html5 memory optimization guide nature of this document this is a best-practice guide it is not intended to mandate compliance or to trigger any action based on compliance — use it as a reference for better app quality and user experience contents why memory matters for tv web apps understanding the memory model of web apps image and graphics memory optimization dom management and list/grid virtualization preventing memory leaks javascript memory and gc management video & media memory management data handling optimization fetch / json / cache canvas / webgl / web audio / worker cautions 1 why memory matters for tv web apps tvs have different memory constraints than smartphones or pcs understanding this difference is the starting point of optimization memory is a shared resource when one app uses too much memory, it isn't only that app that slows down — the whole tv degrades app switching gets slower, other apps in the background get killed, and system animations stutter core principle memory is managed, not borrowed make "allocate when needed, release the moment it's no longer needed" the default for every feature you design 2 understanding the memory model of web apps to optimize, you first need to know where a web app's memory goes unlike native apps, a web app's memory is spread across several layers, much of which is not directly visible to the developer 2 1 major memory-consuming areas area description developer control v8 js heap javascript objects, arrays, closures, functions, etc high dom / render tree dom nodes, render objects, computed style high decoded images not the compressed file, but the bitmap expanded for display high gpu memory textures/layers compositing layers, textures, canvas back buffer medium media buffers video/audio decode buffers, mse sourcebuffer medium network & cache http cache, fetch responses, string buffers medium engine overhead v8/blink internal structures, fonts, parsers, etc low 2 2 "compressed file size" is not "memory usage" this is one of the most important concepts for understanding memory usage even a 100 kb jpeg must be decompressed into a bitmap to be displayed most pixels take 4 bytes rgba so a single 1920×1080 image = about 8 3 mb of decode memory 1920 × 1080 × 4 ≈ 8,294,400 bytes a single 4k 3840×2160 image is about 33 mb "it's a small file, so it's fine" is a misconception the real memory is the number of pixels actually drawn on screen × 4 bytes the same applies to json when you json parse a 200 kb json string, the original string stays in memory while the parsed object tree is created on top of it the parse result can take several times more memory than the original 2 3 the v8 heap and garbage collection gc javascript is a gc language gc only reclaims objects that are no longer reachable their references are cut conversely, if a reference remains anywhere, the object is never reclaimed this is the root cause of web app memory leaks gc isn't free while gc runs, the main thread can briefly pause, which shows up as animation frame drops v8 uses a generational gc newly created objects are reclaimed cheaply in the young generation, so creating and discarding temporary objects in ordinary code is not itself a problem the place to watch is hot paths that run tens to hundreds of times per second animation loops, scroll/input handlers, tight loops creating a new object every time there makes even a cheap gc run frequently, causing frame jank so the fix is not to reduce allocations blindly, but to reuse objects only in hot paths see 6 1 the cause of a leak is not "circular references" per se, but "something is still referencing it, so gc can't reclaim it " javascript's gc reclaims even a cyclic structure a→b, b→a correctly once nothing outside references it; the same is true for cycles involving dom nodes real leaks happen when global variables, long-lived arrays/objects, closures, or unremoved event listeners keep holding an object see section 5 3 image and graphics memory optimization images are the single largest memory consumer in almost every tv web app just following the principles in this section resolves most memory problems avoid animated gifs — they use a lot of memory use css animations for simple ui motion, and if you truly need raster animation, use animated webp instead of gif 3 1 load images at the size you display most important the key is not to download an image larger than the size you display and shrink it on the device don't shrink a large original into a small area putting a 1920×1080 original into a 200×300 thumbnail slot looks small on screen, but you still download that large original and decode it at least once — wasting network, cpu, and peak memory download images resized on the server to the display size thumbnails at thumbnail size, backgrounds at background size don't count on the browser to shrink it for you the browser sometimes downscales an image to the display size, but not always, and the cost of downloading and expanding the large original is incurred regardless the reliable way to save memory is to receive an image that is already at the display size <!-- bad using a 4k original for a thumbnail --> <img src="poster_4k jpg" style="width 200px; height 300px"> <!-- → small on screen, but the 4k original is still downloaded and decoded wasted network / cpu / memory --> <!-- good serve an image sized for display from the server --> <img src="poster_200x300 jpg" width="200" height="300"> 3 2 don't load offscreen images; release them when not visible lazy loading don't load images not yet visible from scrolling load them only as they approach the viewport, via the loading="lazy" attribute or intersectionobserver <img src="poster jpg" loading="lazy" width="200" height="300" alt=" "> actively release images that leave the screen in a long tv grid, reclaim decode memory for images far from the viewport by clearing src or removing the element see section 4 on virtualization // release image memory for a card far from the viewport function releaseimage imgel { imgel removeattribute 'src' ; // or imgel src = ''; imgel removeattribute 'srcset' ; } applying content-visibility auto to large offscreen sections can defer their rendering/layout cost and associated memory offscreen-section { content-visibility auto; contain-intrinsic-size 400px 300px; /* size hint */ } 3 3 treat css background images the same way an image set via background-image also uses bitmap memory once decoded background images of hidden elements can still load, so make large backgrounds load only when shown — by attaching a class at that moment 3 4 control decode timing suddenly attaching a large image to the screen can trigger a synchronous decode on the main thread and cause jank use the decoding="async" attribute or the img decode promise to decode ahead of time, asynchronously, before display const img = new image ; img src = 'poster jpg'; await img decode ; // after decode completes container appendchild img ; // attach without a frame drop 3 5 watch out for web fonts web fonts can be as large a single consumer as images, yet are often overlooked the browser keeps a font's glyphs resident in memory, and receiving a separate file per weight/style multiplies that in particular, languages with thousands to tens of thousands of glyphs, such as cjk chinese, japanese, korean , can have a single full-glyph font file reaching several mb, so take special care first ask whether you even need a web font if the tv platform's built-in fonts are enough, not using a web font at all is the surest saving load only the weights/styles you need limit to regular/bold and don't download unused light, thin, italic, etc use subset fonts building a font file that contains only the characters you actually use greatly reduces resident memory the more glyphs a language has, the bigger the effect unicode-range prevents downloading unused ranges when you split into multiple files, but to reduce resident memory itself, the fundamental approach is to prepare a subset file that contains only the glyphs you need use font-display swap so font loading doesn't block text rendering better perceived performance to reduce transfer size, use the well-compressed woff2 /* apply a subset only the needed glyphs to a specific character range */ @font-face { font-family 'appfont'; src url 'app-latin-subset woff2' format 'woff2' ; unicode-range u+0000-00ff; /* basic latin only */ font-display swap; } 4 dom management and list/grid virtualization after images, the biggest driver of a tv web app's memory is the number of dom nodes tv apps are especially vulnerable because they typically have long grid/carousel structures with hundreds to thousands of content cards 4 1 every dom node is memory each dom element carries a node object, computed style, layout info, and if displayed a render layer if you put thousands of cards into the dom at once, all of them stay resident even when only a few are visible as the dom grows, style recalculation, layout, and compositing costs grow too, hurting performance 4 2 virtualize long lists windowing — do it virtualization is a must for long lists/grids keep only the visible items plus a small buffer actually in the dom, and recycle as the user scrolls key ideas render only the items visible in the viewport + a margin above and below, not the whole list remove from the dom or recycle elements that scroll out of view fake the full scroll height with a spacer element or a transform // conceptual example simple windowing with intersectionobserver const buffer = 5; // extra items above and below function renderwindow startindex, endindex, alldata, container { container textcontent = ''; // remove previous items → reclaim dom nodes & image memory const frag = document createdocumentfragment ; for let i = startindex - buffer; i <= endindex + buffer; i++ { if i < 0 || i >= alldata length continue; frag appendchild createcard alldata[i] ; } container appendchild frag ; } in a tv app, any list with more than ~100 items should almost always consider virtualization during validation, apps that "render thousands of cards as one big dom" are a classic memory-overrun case 4 3 recycle elements — the dom version of the object pool pattern same idea as the object pool 6 2 creating and discarding a card every time increases dom create/destroy and gc load instead, create a fixed number of dom nodes and just swap their content // create only as many card dom nodes as can be visible, then reuse them const pool = []; function getcard { return pool pop || createcard ; } function recycle card { card queryselector 'img' removeattribute 'src' ; // release image memory pool push card ; } 4 4 clean up the previous screen's dom on navigation in an spa, leaving the previous screen's dom in place keeps occupying memory on routing, remove the previous view's dom and release its listeners, timers, and observers together giving each screen component a paired mount and destroy , where destroy undoes everything it created listeners, timers, observers, dom , structurally prevents leaks see section 5 4 5 reduce excessive wrapper / shadow dom unnecessary abstraction layers increase node count cut meaningless <div> nesting and excessive wrapper components, and remove unneeded layers to keep the dom shallow and simple 4 6 beware compositing-layer gpu memory blowup separate from dom node count, the browser promotes some elements to their own compositing layers, managed as gpu textures each layer takes width × height × 4 bytes of gpu memory, by the same principle as a decoded image a single full-screen layer is about 8 mb fhd , so if layers grow to dozens or hundreds, a tv with tight gpu memory hits its limit quickly layers arise mainly from forced-promotion hints like will-change, transform translatez 0 / translate3d 0,0,0 , or from animated elements don't slap translatez 0 on every card on the belief that "promoting to a layer makes it faster " it instead wastes gpu memory and increases compositing cost turn will-change on only right before an animation and remove it when done leaving it on permanently keeps that many layers resident don't stack multiple full-screen layers front overlays, fade layers, etc use the devtools layers panel or the "layer borders" option to check the actual layer count and sizes rule promote layers "only when needed, only on the elements that need it " don't sprinkle hints out of habit 5 preventing memory leaks a memory leak is when an object that is no longer needed can't be reclaimed because something still references it, and it is fatal in long-running tv apps the patterns that cause leaks in web apps are well known 5 1 unremoved event listeners the most common cause a listener registered with addeventlistener keeps holding the target object and the callback and everything its closure captures unless you explicitly remove it in particular, listeners on long-lived objects like window and document stay until the app ends // bad the listener remains after the component is removed, holding the whole object graph window addeventlistener 'resize', this onresize ; // good 1 always remove in a matching pair window removeeventlistener 'resize', this onresize ; // good 2 clean up all at once with abortcontroller const controller = new abortcontroller ; window addeventlistener 'resize', onresize, { signal controller signal } ; element addeventlistener 'keydown', onkey, { signal controller signal } ; // on cleanup controller abort ; // removes every listener registered with this controller at once rule listeners you register when creating a component/screen must all be removed when destroying it making abortcontroller + signal your standard pattern reduces mistakes 5 2 reduce listeners with delegation in a tv grid with hundreds to thousands of cards, attaching a click/keydown listener to each card keeps as many callback closures resident as there are listeners, plus register/unregister cost every time a card is created or discarded instead, attach a single listener to a parent container and use event bubbling with event target to determine which card fired it event delegation the listener count drops to one, cutting both memory and cleanup burden // bad a listener per card → n callback closures resident cards foreach card => card addeventlistener 'click', onclick ; // good delegate to a single container → 1 listener grid addeventlistener 'click', e => { const card = e target closest ' card' ; if !card return; handleselect card dataset id ; } ; it pairs especially well with virtualization 4 2 and element recycling 4 3 even when you swap card dom, the container's listener stays, so you don't have to re-register a listener each time cleanup is also just removing the one container listener, which reduces the listener-leak risk from 5 1 5 3 unremoved timers and callbacks if setinterval, settimeout, or requestanimationframe reference objects in their callbacks, those objects stay alive as long as the timer does in particular, setinterval and a recursive requestanimationframe run forever unless you explicitly stop them const timerid = setinterval update, 1000 ; // cleanup clearinterval timerid ; let rafid = requestanimationframe loop ; // cleanup cancelanimationframe rafid ; always stop animation loops and polling timers when the screen goes to the background or is destroyed you can detect visibility with the visibilitychange event 5 4 detached dom nodes a node removed from the dom but still referenced by a javascript variable is not gc'd this is called "detached dom" and is a classic type of web app leak // bad const cache = {}; const list = document getelementbyid 'list' ; cache oldlist = list; // keeps a reference list remove ; // removed from the dom // removed from the dom, but cache oldlist still holds it, so it isn't reclaimed including all child nodes // good cache oldlist = null; // cut the reference so it can be reclaimed 5 5 global caches/arrays that grow without bound logs, event records, response caches, and so on grow without limit if you keep piling them into global arrays/objects always cap the size e g , lru or clear periodically because map preserves insertion order, deleting and re-inserting an item on each access keeps the "least recently used" item at the front, giving you a simple lru // a simple bounded lru cache const max = 50; const cache = new map ; function get key { if !cache has key return undefined; const value = cache get key ; cache delete key ; // delete, then cache set key, value ; // re-insert → most-recently-used moves to the back return value; } function put key, value { if cache has key cache delete key ; // reset order on update else if cache size >= max { cache delete cache keys next value ; // evict the least-recently-used front } cache set key, value ; } 5 6 large objects held by closures a closure captures variables from its outer scope a single callback can keep a huge data structure alive reference only the values you actually need inside the callback 5 7 use weakmap / weakref when you want to attach extra info to an object without affecting its lifetime, use weakmap when the key object disappears, the related entry is reclaimed automatically const metadata = new weakmap ; metadata set domnode, { lastfocused 0 } ; // when domnode is gc'd, this entry disappears too 5 8 release memory aggressively when backgrounded as seen in section 1, when memory is low the tv kills background apps if your app holds a lot of memory while off-screen the user switched to another app/input , it becomes the first to be killed and reloads from scratch on return, hurting ux so the moment your app becomes invisible, give back memory you don't currently need release offscreen images / decoded bitmaps 3 2 return videos/decoders not currently playing 7 1 clear caches you can rebuild 5 5 stop animation loops / polling timers 5 3 detect show/hide with visibilitychange document hidden release resources the moment the app is hidden, and restore only what's needed when it becomes visible again document addeventlistener 'visibilitychange', => { if document hidden { releaseoffscreenimages ; // release image bitmaps pauseandreleasevideos ; // return videos not currently playing stopanimationloops ; // stop raf / timers trimcaches ; // clear caches you can rebuild } else { restoreonresume ; // on return, re-prepare only what's needed } } ; rule preserve lightweight state such as scroll position and focus, but drop heavy resources bitmaps, buffers, caches in the background and rebuild them on return 5 9 how to diagnose leaks in chrome devtools' memory panel, take two or more heap snapshots and compare them comparison to find objects that keep growing filter by "detached" to directly inspect detached dom nodes open and close the same screen several times, then compare snapshots; objects that keep accumulating even after closing indicate a leak 6 javascript memory and gc management 6 1 suppress memory churn memory churn means creating and discarding many temporary objects in a short time this makes gc run often, leading to animation frame drops and performance degradation watch these places especially inside animation loops requestanimationframe inside scroll handlers and input remote-control key handlers inside frequently running for loops // bad a new object/array every frame function onframe { const pos = { x computex , y computey }; // new object every frame → gc pressure moveto pos ; requestanimationframe onframe ; } // good reuse the object const pos = { x 0, y 0 }; function onframe { pos x = computex ; pos y = computey ; moveto pos ; requestanimationframe onframe ; } to maintain 60 fps, the budget per frame is about 16 ms to stay within it, minimize allocations during the frame 6 2 object pool — use with care returning reusable objects particles, card view-models, etc to a pool instead of discarding them can reduce allocation/gc but a pool has its own management cost, and an oversized pool actually increases resident memory and gc load apply it only where allocation is a real bottleneck hot paths , after measuring 6 3 choose efficient data structures choosing the right data structure for the job saves memory for large numeric data, use a typedarray int32array, float32array, uint8array, etc instead of a plain array [] it stores the values themselves densely in contiguous memory without creating a separate object per element, so the difference is large compared with, for example, an array of {x, y} objects for frequent key-value lookups, map is more suitable and clearer than an object {} ; for membership only, use set when handling large arrays, don't overuse unnecessary copies slice, spread [ arr], concat each copy allocates new memory // bad a million coordinates as an array of objects const points = []; for let i = 0; i < 1_000_000; i++ points push { x 0, y 0 } ; // good a single typedarray x, y interleaved const points = new float32array 1_000_000 * 2 ; 6 4 watch strings when concatenating string fragments many times, collecting them in an array and joining once with join is safer for memory and performance don't keep a huge response string in its original form for long extract only what you need, then cut the reference to the original so it can be reclaimed 6 5 cut references explicitly assign null to a large object you no longer need to cut the reference so gc can reclaim it especially when the variable's scope is wide or long-lived this bigdata = null; // release the large data note to empty a value, obj prop = null is generally better than delete obj prop delete can break the engine's internal object optimizations and hurt performance 6 6 your app code bundle takes memory too so far we've covered data created at runtime images, dom, objects , but your app's javascript/css code itself uses memory v8 parses loaded scripts and keeps them resident, so the bigger the bundle, the higher the baseline footprint from startup the less code you load, the less resident memory don't include unnecessarily large libraries instead of pulling in a heavy dependency whole for one or two features, use only the parts you need, or consider a lighter alternative or your own implementation also avoid including duplicate libraries that do the same thing minify + tree-shaking at build time to remove unused dead code code-split to load only per-screen code don't ship every route's code on the first screen; split with dynamic import import at entry time not loading unused screens' code into memory at all is best excessive abstraction layers increase code size the same principle as 4 5 removing unnecessary dom wrappers applies to code 7 video & media memory management the core of a tv app is mostly video playback media uses a lot of memory, so managing it matters 7 1 always release media resources that finished/left playback if you only remove a <video> element from the screen and leave it, the decoder and buffers may remain release it definitively in this order function releasevideo video { video pause ; video removeattribute 'src' ; // remove the src attribute // if you used <source> child elements, remove those too video load ; // prompt release of internal buffers/decoder // if you used mse, also clean up sourcebuffer/mediasource } don't keep multiple <video> elements alive at once when implementing preview autoplay etc , release a preview video the moment it leaves the screen a tv has a limited number of hardware video decoders, and each decoder uses large buffers reusing a single <video> element is safer than creating and discarding one per content item 7 2 mse media source extensions buffer management if you implement adaptive streaming yourself, remove the buffer for already-played ranges with sourcebuffer remove otherwise the buffer keeps growing and eats memory cap the forward buffer prefetching minutes ahead is convenient but uses a lot of memory be conservative with buffer size, especially at 4k / high bitrate 7 3 subtitle / thumbnail tracks don't keep thumbnail-preview scrub-preview sprites fully resident; load/release only the ranges you need reclaim used subtitle tracks and blob urls with url revokeobjecturl a blob url is not released unless you explicitly revoke it const url = url createobjecturl blob ; // after use url revokeobjecturl url ; 8 data handling optimization fetch / json / cache the amount and handling of data fetched over the network directly affect memory usage 8 1 fetch only as much as you need server-side filtering & paging don't fetch thousands of list items at once; split them via paging / infinite scroll don't receive large responses containing fields the client won't use design the api so the server filters down to only the needed fields e g , graphql field selection, a rest fields= parameter fetching, parsing, and storing large data itself leads to excessive memory use, which in turn degrades performance 8 2 understand the cost of json parse json parse str turns a string into an object tree, taking memory for the parsed objects on top of the original string the larger the json, the more this double occupancy hurts don't keep holding the original string reference after parsing cut it to allow reclamation for very large datasets, consider streaming parsing or partial parsing avoid the pattern of parsing everything and holding it all 8 3 don't hold parse results whole for long rather than keeping the entire list api response in memory, transform it into the shape the screen needs a view-model and then discard the original response in infinite scroll, cap and clean up data for pages already passed far from the screen data, like the dom, is a target for "windowing " 8 4 efficient data formats for large, repetitive data, use a compact representation rather than a verbose format json is usually the standard on the web, but consider the following avoid unnecessarily nested or verbose json structures; keep key names and structure compact don't stuff binary data into json as base64 about 33% bloat ; receive it as a separate binary response or an arraybuffer if very large structured data is sent repeatedly, consider binary serialization e g , protobuf, cbor 8 5 cap your caches cap response caches, image caches, and computed-result caches with an lru limit so they don't grow without bound see 5 5 don't put large data in localstorage/sessionstorage; they have size limits and are synchronous apis bad for performance if you truly need large data, use indexeddb — and still manage a cap 9 canvas / webgl / web audio / worker cautions more powerful web apis can use a lot of memory and often hold resources gc won't reclaim automatically the following applies only if you use these apis directly — skip it if you don't 9 1 canvas 2d canvas back-buffer memory = width × height × 4 bytes don't create many large canvases for an unused canvas, shrink its size to width = height = 0 to reclaim the back buffer, and cut the reference creating a large array every frame with getimagedata/putimagedata causes memory churn reuse buffers 9 2 webgl webgl resources textures, buffers, programs, framebuffers are not reclaimed by gc automatically delete them explicitly deletetexture, deletebuffer, deleteprogram, deleteframebuffer when you no longer need the context, release it with getextension 'webgl_lose_context' losecontext textures use large gpu memory by the same principle as image bitmaps control texture size and count 9 3 web audio close an audiocontext with close after use don't leave many open a decoded audiobuffer can be large; cut the reference when done 9 4 web worker a worker has its own memory space terminate a finished worker with terminate ; leaving it keeps occupying memory passing large data to a worker copies it structured clone , creating two copies use a transferable e g , transferring ownership of an arraybuffer to avoid the copy worker postmessage buffer, [buffer] ; // transfer ownership of buffer → no copy 9 5 iframe each iframe loads its own document and resources, using a lot of memory create ad / external-widget iframes only when needed, and remove them from the dom to destroy them completely when done in closing tv web app memory optimization boils down to three principles create only as much as you show — images at display size, lists only as far as visible, data only as much as needed release the moment it's no longer needed — clean up listeners, timers, observers, media, dom, and caches along their lifecycle measure and verify on a real device — confirm memory doesn't trend upward across repeated open/close and long runs apply these three principles from the design stage, and you'll deliver a smooth, stable app experience to users ↑ back to top
Develop Smart Signage
docweb app html5 memory optimization guide nature of this document this is a best-practice guide it is not intended to mandate compliance or to trigger any action based on compliance — use it as a reference for better app quality and user experience contents why memory matters for tv web apps understanding the memory model of web apps image and graphics memory optimization dom management and list/grid virtualization preventing memory leaks javascript memory and gc management video & media memory management data handling optimization fetch / json / cache canvas / webgl / web audio / worker cautions 1 why memory matters for tv web apps tvs have different memory constraints than smartphones or pcs understanding this difference is the starting point of optimization memory is a shared resource when one app uses too much memory, it isn't only that app that slows down — the whole tv degrades app switching gets slower, other apps in the background get killed, and system animations stutter core principle memory is managed, not borrowed make "allocate when needed, release the moment it's no longer needed" the default for every feature you design 2 understanding the memory model of web apps to optimize, you first need to know where a web app's memory goes unlike native apps, a web app's memory is spread across several layers, much of which is not directly visible to the developer 2 1 major memory-consuming areas area description developer control v8 js heap javascript objects, arrays, closures, functions, etc high dom / render tree dom nodes, render objects, computed style high decoded images not the compressed file, but the bitmap expanded for display high gpu memory textures/layers compositing layers, textures, canvas back buffer medium media buffers video/audio decode buffers, mse sourcebuffer medium network & cache http cache, fetch responses, string buffers medium engine overhead v8/blink internal structures, fonts, parsers, etc low 2 2 "compressed file size" is not "memory usage" this is one of the most important concepts for understanding memory usage even a 100 kb jpeg must be decompressed into a bitmap to be displayed most pixels take 4 bytes rgba so a single 1920×1080 image = about 8 3 mb of decode memory 1920 × 1080 × 4 ≈ 8,294,400 bytes a single 4k 3840×2160 image is about 33 mb "it's a small file, so it's fine" is a misconception the real memory is the number of pixels actually drawn on screen × 4 bytes the same applies to json when you json parse a 200 kb json string, the original string stays in memory while the parsed object tree is created on top of it the parse result can take several times more memory than the original 2 3 the v8 heap and garbage collection gc javascript is a gc language gc only reclaims objects that are no longer reachable their references are cut conversely, if a reference remains anywhere, the object is never reclaimed this is the root cause of web app memory leaks gc isn't free while gc runs, the main thread can briefly pause, which shows up as animation frame drops v8 uses a generational gc newly created objects are reclaimed cheaply in the young generation, so creating and discarding temporary objects in ordinary code is not itself a problem the place to watch is hot paths that run tens to hundreds of times per second animation loops, scroll/input handlers, tight loops creating a new object every time there makes even a cheap gc run frequently, causing frame jank so the fix is not to reduce allocations blindly, but to reuse objects only in hot paths see 6 1 the cause of a leak is not "circular references" per se, but "something is still referencing it, so gc can't reclaim it " javascript's gc reclaims even a cyclic structure a→b, b→a correctly once nothing outside references it; the same is true for cycles involving dom nodes real leaks happen when global variables, long-lived arrays/objects, closures, or unremoved event listeners keep holding an object see section 5 3 image and graphics memory optimization images are the single largest memory consumer in almost every tv web app just following the principles in this section resolves most memory problems avoid animated gifs — they use a lot of memory use css animations for simple ui motion, and if you truly need raster animation, use animated webp instead of gif 3 1 load images at the size you display most important the key is not to download an image larger than the size you display and shrink it on the device don't shrink a large original into a small area putting a 1920×1080 original into a 200×300 thumbnail slot looks small on screen, but you still download that large original and decode it at least once — wasting network, cpu, and peak memory download images resized on the server to the display size thumbnails at thumbnail size, backgrounds at background size don't count on the browser to shrink it for you the browser sometimes downscales an image to the display size, but not always, and the cost of downloading and expanding the large original is incurred regardless the reliable way to save memory is to receive an image that is already at the display size <!-- bad using a 4k original for a thumbnail --> <img src="poster_4k jpg" style="width 200px; height 300px"> <!-- → small on screen, but the 4k original is still downloaded and decoded wasted network / cpu / memory --> <!-- good serve an image sized for display from the server --> <img src="poster_200x300 jpg" width="200" height="300"> 3 2 don't load offscreen images; release them when not visible lazy loading don't load images not yet visible from scrolling load them only as they approach the viewport, via the loading="lazy" attribute or intersectionobserver <img src="poster jpg" loading="lazy" width="200" height="300" alt=" "> actively release images that leave the screen in a long tv grid, reclaim decode memory for images far from the viewport by clearing src or removing the element see section 4 on virtualization // release image memory for a card far from the viewport function releaseimage imgel { imgel removeattribute 'src' ; // or imgel src = ''; imgel removeattribute 'srcset' ; } applying content-visibility auto to large offscreen sections can defer their rendering/layout cost and associated memory offscreen-section { content-visibility auto; contain-intrinsic-size 400px 300px; /* size hint */ } 3 3 treat css background images the same way an image set via background-image also uses bitmap memory once decoded background images of hidden elements can still load, so make large backgrounds load only when shown — by attaching a class at that moment 3 4 control decode timing suddenly attaching a large image to the screen can trigger a synchronous decode on the main thread and cause jank use the decoding="async" attribute or the img decode promise to decode ahead of time, asynchronously, before display const img = new image ; img src = 'poster jpg'; await img decode ; // after decode completes container appendchild img ; // attach without a frame drop 3 5 watch out for web fonts web fonts can be as large a single consumer as images, yet are often overlooked the browser keeps a font's glyphs resident in memory, and receiving a separate file per weight/style multiplies that in particular, languages with thousands to tens of thousands of glyphs, such as cjk chinese, japanese, korean , can have a single full-glyph font file reaching several mb, so take special care first ask whether you even need a web font if the tv platform's built-in fonts are enough, not using a web font at all is the surest saving load only the weights/styles you need limit to regular/bold and don't download unused light, thin, italic, etc use subset fonts building a font file that contains only the characters you actually use greatly reduces resident memory the more glyphs a language has, the bigger the effect unicode-range prevents downloading unused ranges when you split into multiple files, but to reduce resident memory itself, the fundamental approach is to prepare a subset file that contains only the glyphs you need use font-display swap so font loading doesn't block text rendering better perceived performance to reduce transfer size, use the well-compressed woff2 /* apply a subset only the needed glyphs to a specific character range */ @font-face { font-family 'appfont'; src url 'app-latin-subset woff2' format 'woff2' ; unicode-range u+0000-00ff; /* basic latin only */ font-display swap; } 4 dom management and list/grid virtualization after images, the biggest driver of a tv web app's memory is the number of dom nodes tv apps are especially vulnerable because they typically have long grid/carousel structures with hundreds to thousands of content cards 4 1 every dom node is memory each dom element carries a node object, computed style, layout info, and if displayed a render layer if you put thousands of cards into the dom at once, all of them stay resident even when only a few are visible as the dom grows, style recalculation, layout, and compositing costs grow too, hurting performance 4 2 virtualize long lists windowing — do it virtualization is a must for long lists/grids keep only the visible items plus a small buffer actually in the dom, and recycle as the user scrolls key ideas render only the items visible in the viewport + a margin above and below, not the whole list remove from the dom or recycle elements that scroll out of view fake the full scroll height with a spacer element or a transform // conceptual example simple windowing with intersectionobserver const buffer = 5; // extra items above and below function renderwindow startindex, endindex, alldata, container { container textcontent = ''; // remove previous items → reclaim dom nodes & image memory const frag = document createdocumentfragment ; for let i = startindex - buffer; i <= endindex + buffer; i++ { if i < 0 || i >= alldata length continue; frag appendchild createcard alldata[i] ; } container appendchild frag ; } in a tv app, any list with more than ~100 items should almost always consider virtualization during validation, apps that "render thousands of cards as one big dom" are a classic memory-overrun case 4 3 recycle elements — the dom version of the object pool pattern same idea as the object pool 6 2 creating and discarding a card every time increases dom create/destroy and gc load instead, create a fixed number of dom nodes and just swap their content // create only as many card dom nodes as can be visible, then reuse them const pool = []; function getcard { return pool pop || createcard ; } function recycle card { card queryselector 'img' removeattribute 'src' ; // release image memory pool push card ; } 4 4 clean up the previous screen's dom on navigation in an spa, leaving the previous screen's dom in place keeps occupying memory on routing, remove the previous view's dom and release its listeners, timers, and observers together giving each screen component a paired mount and destroy , where destroy undoes everything it created listeners, timers, observers, dom , structurally prevents leaks see section 5 4 5 reduce excessive wrapper / shadow dom unnecessary abstraction layers increase node count cut meaningless <div> nesting and excessive wrapper components, and remove unneeded layers to keep the dom shallow and simple 4 6 beware compositing-layer gpu memory blowup separate from dom node count, the browser promotes some elements to their own compositing layers, managed as gpu textures each layer takes width × height × 4 bytes of gpu memory, by the same principle as a decoded image a single full-screen layer is about 8 mb fhd , so if layers grow to dozens or hundreds, a tv with tight gpu memory hits its limit quickly layers arise mainly from forced-promotion hints like will-change, transform translatez 0 / translate3d 0,0,0 , or from animated elements don't slap translatez 0 on every card on the belief that "promoting to a layer makes it faster " it instead wastes gpu memory and increases compositing cost turn will-change on only right before an animation and remove it when done leaving it on permanently keeps that many layers resident don't stack multiple full-screen layers front overlays, fade layers, etc use the devtools layers panel or the "layer borders" option to check the actual layer count and sizes rule promote layers "only when needed, only on the elements that need it " don't sprinkle hints out of habit 5 preventing memory leaks a memory leak is when an object that is no longer needed can't be reclaimed because something still references it, and it is fatal in long-running tv apps the patterns that cause leaks in web apps are well known 5 1 unremoved event listeners the most common cause a listener registered with addeventlistener keeps holding the target object and the callback and everything its closure captures unless you explicitly remove it in particular, listeners on long-lived objects like window and document stay until the app ends // bad the listener remains after the component is removed, holding the whole object graph window addeventlistener 'resize', this onresize ; // good 1 always remove in a matching pair window removeeventlistener 'resize', this onresize ; // good 2 clean up all at once with abortcontroller const controller = new abortcontroller ; window addeventlistener 'resize', onresize, { signal controller signal } ; element addeventlistener 'keydown', onkey, { signal controller signal } ; // on cleanup controller abort ; // removes every listener registered with this controller at once rule listeners you register when creating a component/screen must all be removed when destroying it making abortcontroller + signal your standard pattern reduces mistakes 5 2 reduce listeners with delegation in a tv grid with hundreds to thousands of cards, attaching a click/keydown listener to each card keeps as many callback closures resident as there are listeners, plus register/unregister cost every time a card is created or discarded instead, attach a single listener to a parent container and use event bubbling with event target to determine which card fired it event delegation the listener count drops to one, cutting both memory and cleanup burden // bad a listener per card → n callback closures resident cards foreach card => card addeventlistener 'click', onclick ; // good delegate to a single container → 1 listener grid addeventlistener 'click', e => { const card = e target closest ' card' ; if !card return; handleselect card dataset id ; } ; it pairs especially well with virtualization 4 2 and element recycling 4 3 even when you swap card dom, the container's listener stays, so you don't have to re-register a listener each time cleanup is also just removing the one container listener, which reduces the listener-leak risk from 5 1 5 3 unremoved timers and callbacks if setinterval, settimeout, or requestanimationframe reference objects in their callbacks, those objects stay alive as long as the timer does in particular, setinterval and a recursive requestanimationframe run forever unless you explicitly stop them const timerid = setinterval update, 1000 ; // cleanup clearinterval timerid ; let rafid = requestanimationframe loop ; // cleanup cancelanimationframe rafid ; always stop animation loops and polling timers when the screen goes to the background or is destroyed you can detect visibility with the visibilitychange event 5 4 detached dom nodes a node removed from the dom but still referenced by a javascript variable is not gc'd this is called "detached dom" and is a classic type of web app leak // bad const cache = {}; const list = document getelementbyid 'list' ; cache oldlist = list; // keeps a reference list remove ; // removed from the dom // removed from the dom, but cache oldlist still holds it, so it isn't reclaimed including all child nodes // good cache oldlist = null; // cut the reference so it can be reclaimed 5 5 global caches/arrays that grow without bound logs, event records, response caches, and so on grow without limit if you keep piling them into global arrays/objects always cap the size e g , lru or clear periodically because map preserves insertion order, deleting and re-inserting an item on each access keeps the "least recently used" item at the front, giving you a simple lru // a simple bounded lru cache const max = 50; const cache = new map ; function get key { if !cache has key return undefined; const value = cache get key ; cache delete key ; // delete, then cache set key, value ; // re-insert → most-recently-used moves to the back return value; } function put key, value { if cache has key cache delete key ; // reset order on update else if cache size >= max { cache delete cache keys next value ; // evict the least-recently-used front } cache set key, value ; } 5 6 large objects held by closures a closure captures variables from its outer scope a single callback can keep a huge data structure alive reference only the values you actually need inside the callback 5 7 use weakmap / weakref when you want to attach extra info to an object without affecting its lifetime, use weakmap when the key object disappears, the related entry is reclaimed automatically const metadata = new weakmap ; metadata set domnode, { lastfocused 0 } ; // when domnode is gc'd, this entry disappears too 5 8 release memory aggressively when backgrounded as seen in section 1, when memory is low the tv kills background apps if your app holds a lot of memory while off-screen the user switched to another app/input , it becomes the first to be killed and reloads from scratch on return, hurting ux so the moment your app becomes invisible, give back memory you don't currently need release offscreen images / decoded bitmaps 3 2 return videos/decoders not currently playing 7 1 clear caches you can rebuild 5 5 stop animation loops / polling timers 5 3 detect show/hide with visibilitychange document hidden release resources the moment the app is hidden, and restore only what's needed when it becomes visible again document addeventlistener 'visibilitychange', => { if document hidden { releaseoffscreenimages ; // release image bitmaps pauseandreleasevideos ; // return videos not currently playing stopanimationloops ; // stop raf / timers trimcaches ; // clear caches you can rebuild } else { restoreonresume ; // on return, re-prepare only what's needed } } ; rule preserve lightweight state such as scroll position and focus, but drop heavy resources bitmaps, buffers, caches in the background and rebuild them on return 5 9 how to diagnose leaks in chrome devtools' memory panel, take two or more heap snapshots and compare them comparison to find objects that keep growing filter by "detached" to directly inspect detached dom nodes open and close the same screen several times, then compare snapshots; objects that keep accumulating even after closing indicate a leak 6 javascript memory and gc management 6 1 suppress memory churn memory churn means creating and discarding many temporary objects in a short time this makes gc run often, leading to animation frame drops and performance degradation watch these places especially inside animation loops requestanimationframe inside scroll handlers and input remote-control key handlers inside frequently running for loops // bad a new object/array every frame function onframe { const pos = { x computex , y computey }; // new object every frame → gc pressure moveto pos ; requestanimationframe onframe ; } // good reuse the object const pos = { x 0, y 0 }; function onframe { pos x = computex ; pos y = computey ; moveto pos ; requestanimationframe onframe ; } to maintain 60 fps, the budget per frame is about 16 ms to stay within it, minimize allocations during the frame 6 2 object pool — use with care returning reusable objects particles, card view-models, etc to a pool instead of discarding them can reduce allocation/gc but a pool has its own management cost, and an oversized pool actually increases resident memory and gc load apply it only where allocation is a real bottleneck hot paths , after measuring 6 3 choose efficient data structures choosing the right data structure for the job saves memory for large numeric data, use a typedarray int32array, float32array, uint8array, etc instead of a plain array [] it stores the values themselves densely in contiguous memory without creating a separate object per element, so the difference is large compared with, for example, an array of {x, y} objects for frequent key-value lookups, map is more suitable and clearer than an object {} ; for membership only, use set when handling large arrays, don't overuse unnecessary copies slice, spread [ arr], concat each copy allocates new memory // bad a million coordinates as an array of objects const points = []; for let i = 0; i < 1_000_000; i++ points push { x 0, y 0 } ; // good a single typedarray x, y interleaved const points = new float32array 1_000_000 * 2 ; 6 4 watch strings when concatenating string fragments many times, collecting them in an array and joining once with join is safer for memory and performance don't keep a huge response string in its original form for long extract only what you need, then cut the reference to the original so it can be reclaimed 6 5 cut references explicitly assign null to a large object you no longer need to cut the reference so gc can reclaim it especially when the variable's scope is wide or long-lived this bigdata = null; // release the large data note to empty a value, obj prop = null is generally better than delete obj prop delete can break the engine's internal object optimizations and hurt performance 6 6 your app code bundle takes memory too so far we've covered data created at runtime images, dom, objects , but your app's javascript/css code itself uses memory v8 parses loaded scripts and keeps them resident, so the bigger the bundle, the higher the baseline footprint from startup the less code you load, the less resident memory don't include unnecessarily large libraries instead of pulling in a heavy dependency whole for one or two features, use only the parts you need, or consider a lighter alternative or your own implementation also avoid including duplicate libraries that do the same thing minify + tree-shaking at build time to remove unused dead code code-split to load only per-screen code don't ship every route's code on the first screen; split with dynamic import import at entry time not loading unused screens' code into memory at all is best excessive abstraction layers increase code size the same principle as 4 5 removing unnecessary dom wrappers applies to code 7 video & media memory management the core of a tv app is mostly video playback media uses a lot of memory, so managing it matters 7 1 always release media resources that finished/left playback if you only remove a <video> element from the screen and leave it, the decoder and buffers may remain release it definitively in this order function releasevideo video { video pause ; video removeattribute 'src' ; // remove the src attribute // if you used <source> child elements, remove those too video load ; // prompt release of internal buffers/decoder // if you used mse, also clean up sourcebuffer/mediasource } don't keep multiple <video> elements alive at once when implementing preview autoplay etc , release a preview video the moment it leaves the screen a tv has a limited number of hardware video decoders, and each decoder uses large buffers reusing a single <video> element is safer than creating and discarding one per content item 7 2 mse media source extensions buffer management if you implement adaptive streaming yourself, remove the buffer for already-played ranges with sourcebuffer remove otherwise the buffer keeps growing and eats memory cap the forward buffer prefetching minutes ahead is convenient but uses a lot of memory be conservative with buffer size, especially at 4k / high bitrate 7 3 subtitle / thumbnail tracks don't keep thumbnail-preview scrub-preview sprites fully resident; load/release only the ranges you need reclaim used subtitle tracks and blob urls with url revokeobjecturl a blob url is not released unless you explicitly revoke it const url = url createobjecturl blob ; // after use url revokeobjecturl url ; 8 data handling optimization fetch / json / cache the amount and handling of data fetched over the network directly affect memory usage 8 1 fetch only as much as you need server-side filtering & paging don't fetch thousands of list items at once; split them via paging / infinite scroll don't receive large responses containing fields the client won't use design the api so the server filters down to only the needed fields e g , graphql field selection, a rest fields= parameter fetching, parsing, and storing large data itself leads to excessive memory use, which in turn degrades performance 8 2 understand the cost of json parse json parse str turns a string into an object tree, taking memory for the parsed objects on top of the original string the larger the json, the more this double occupancy hurts don't keep holding the original string reference after parsing cut it to allow reclamation for very large datasets, consider streaming parsing or partial parsing avoid the pattern of parsing everything and holding it all 8 3 don't hold parse results whole for long rather than keeping the entire list api response in memory, transform it into the shape the screen needs a view-model and then discard the original response in infinite scroll, cap and clean up data for pages already passed far from the screen data, like the dom, is a target for "windowing " 8 4 efficient data formats for large, repetitive data, use a compact representation rather than a verbose format json is usually the standard on the web, but consider the following avoid unnecessarily nested or verbose json structures; keep key names and structure compact don't stuff binary data into json as base64 about 33% bloat ; receive it as a separate binary response or an arraybuffer if very large structured data is sent repeatedly, consider binary serialization e g , protobuf, cbor 8 5 cap your caches cap response caches, image caches, and computed-result caches with an lru limit so they don't grow without bound see 5 5 don't put large data in localstorage/sessionstorage; they have size limits and are synchronous apis bad for performance if you truly need large data, use indexeddb — and still manage a cap 9 canvas / webgl / web audio / worker cautions more powerful web apis can use a lot of memory and often hold resources gc won't reclaim automatically the following applies only if you use these apis directly — skip it if you don't 9 1 canvas 2d canvas back-buffer memory = width × height × 4 bytes don't create many large canvases for an unused canvas, shrink its size to width = height = 0 to reclaim the back buffer, and cut the reference creating a large array every frame with getimagedata/putimagedata causes memory churn reuse buffers 9 2 webgl webgl resources textures, buffers, programs, framebuffers are not reclaimed by gc automatically delete them explicitly deletetexture, deletebuffer, deleteprogram, deleteframebuffer when you no longer need the context, release it with getextension 'webgl_lose_context' losecontext textures use large gpu memory by the same principle as image bitmaps control texture size and count 9 3 web audio close an audiocontext with close after use don't leave many open a decoded audiobuffer can be large; cut the reference when done 9 4 web worker a worker has its own memory space terminate a finished worker with terminate ; leaving it keeps occupying memory passing large data to a worker copies it structured clone , creating two copies use a transferable e g , transferring ownership of an arraybuffer to avoid the copy worker postmessage buffer, [buffer] ; // transfer ownership of buffer → no copy 9 5 iframe each iframe loads its own document and resources, using a lot of memory create ad / external-widget iframes only when needed, and remove them from the dom to destroy them completely when done in closing tv web app memory optimization boils down to three principles create only as much as you show — images at display size, lists only as far as visible, data only as much as needed release the moment it's no longer needed — clean up listeners, timers, observers, media, dom, and caches along their lifecycle measure and verify on a real device — confirm memory doesn't trend upward across repeated open/close and long runs apply these three principles from the design stage, and you'll deliver a smooth, stable app experience to users ↑ back to top
Develop Smart Hospitality Display
docweb app html5 memory optimization guide nature of this document this is a best-practice guide it is not intended to mandate compliance or to trigger any action based on compliance — use it as a reference for better app quality and user experience contents why memory matters for tv web apps understanding the memory model of web apps image and graphics memory optimization dom management and list/grid virtualization preventing memory leaks javascript memory and gc management video & media memory management data handling optimization fetch / json / cache canvas / webgl / web audio / worker cautions 1 why memory matters for tv web apps tvs have different memory constraints than smartphones or pcs understanding this difference is the starting point of optimization memory is a shared resource when one app uses too much memory, it isn't only that app that slows down — the whole tv degrades app switching gets slower, other apps in the background get killed, and system animations stutter core principle memory is managed, not borrowed make "allocate when needed, release the moment it's no longer needed" the default for every feature you design 2 understanding the memory model of web apps to optimize, you first need to know where a web app's memory goes unlike native apps, a web app's memory is spread across several layers, much of which is not directly visible to the developer 2 1 major memory-consuming areas area description developer control v8 js heap javascript objects, arrays, closures, functions, etc high dom / render tree dom nodes, render objects, computed style high decoded images not the compressed file, but the bitmap expanded for display high gpu memory textures/layers compositing layers, textures, canvas back buffer medium media buffers video/audio decode buffers, mse sourcebuffer medium network & cache http cache, fetch responses, string buffers medium engine overhead v8/blink internal structures, fonts, parsers, etc low 2 2 "compressed file size" is not "memory usage" this is one of the most important concepts for understanding memory usage even a 100 kb jpeg must be decompressed into a bitmap to be displayed most pixels take 4 bytes rgba so a single 1920×1080 image = about 8 3 mb of decode memory 1920 × 1080 × 4 ≈ 8,294,400 bytes a single 4k 3840×2160 image is about 33 mb "it's a small file, so it's fine" is a misconception the real memory is the number of pixels actually drawn on screen × 4 bytes the same applies to json when you json parse a 200 kb json string, the original string stays in memory while the parsed object tree is created on top of it the parse result can take several times more memory than the original 2 3 the v8 heap and garbage collection gc javascript is a gc language gc only reclaims objects that are no longer reachable their references are cut conversely, if a reference remains anywhere, the object is never reclaimed this is the root cause of web app memory leaks gc isn't free while gc runs, the main thread can briefly pause, which shows up as animation frame drops v8 uses a generational gc newly created objects are reclaimed cheaply in the young generation, so creating and discarding temporary objects in ordinary code is not itself a problem the place to watch is hot paths that run tens to hundreds of times per second animation loops, scroll/input handlers, tight loops creating a new object every time there makes even a cheap gc run frequently, causing frame jank so the fix is not to reduce allocations blindly, but to reuse objects only in hot paths see 6 1 the cause of a leak is not "circular references" per se, but "something is still referencing it, so gc can't reclaim it " javascript's gc reclaims even a cyclic structure a→b, b→a correctly once nothing outside references it; the same is true for cycles involving dom nodes real leaks happen when global variables, long-lived arrays/objects, closures, or unremoved event listeners keep holding an object see section 5 3 image and graphics memory optimization images are the single largest memory consumer in almost every tv web app just following the principles in this section resolves most memory problems avoid animated gifs — they use a lot of memory use css animations for simple ui motion, and if you truly need raster animation, use animated webp instead of gif 3 1 load images at the size you display most important the key is not to download an image larger than the size you display and shrink it on the device don't shrink a large original into a small area putting a 1920×1080 original into a 200×300 thumbnail slot looks small on screen, but you still download that large original and decode it at least once — wasting network, cpu, and peak memory download images resized on the server to the display size thumbnails at thumbnail size, backgrounds at background size don't count on the browser to shrink it for you the browser sometimes downscales an image to the display size, but not always, and the cost of downloading and expanding the large original is incurred regardless the reliable way to save memory is to receive an image that is already at the display size <!-- bad using a 4k original for a thumbnail --> <img src="poster_4k jpg" style="width 200px; height 300px"> <!-- → small on screen, but the 4k original is still downloaded and decoded wasted network / cpu / memory --> <!-- good serve an image sized for display from the server --> <img src="poster_200x300 jpg" width="200" height="300"> 3 2 don't load offscreen images; release them when not visible lazy loading don't load images not yet visible from scrolling load them only as they approach the viewport, via the loading="lazy" attribute or intersectionobserver <img src="poster jpg" loading="lazy" width="200" height="300" alt=" "> actively release images that leave the screen in a long tv grid, reclaim decode memory for images far from the viewport by clearing src or removing the element see section 4 on virtualization // release image memory for a card far from the viewport function releaseimage imgel { imgel removeattribute 'src' ; // or imgel src = ''; imgel removeattribute 'srcset' ; } applying content-visibility auto to large offscreen sections can defer their rendering/layout cost and associated memory offscreen-section { content-visibility auto; contain-intrinsic-size 400px 300px; /* size hint */ } 3 3 treat css background images the same way an image set via background-image also uses bitmap memory once decoded background images of hidden elements can still load, so make large backgrounds load only when shown — by attaching a class at that moment 3 4 control decode timing suddenly attaching a large image to the screen can trigger a synchronous decode on the main thread and cause jank use the decoding="async" attribute or the img decode promise to decode ahead of time, asynchronously, before display const img = new image ; img src = 'poster jpg'; await img decode ; // after decode completes container appendchild img ; // attach without a frame drop 3 5 watch out for web fonts web fonts can be as large a single consumer as images, yet are often overlooked the browser keeps a font's glyphs resident in memory, and receiving a separate file per weight/style multiplies that in particular, languages with thousands to tens of thousands of glyphs, such as cjk chinese, japanese, korean , can have a single full-glyph font file reaching several mb, so take special care first ask whether you even need a web font if the tv platform's built-in fonts are enough, not using a web font at all is the surest saving load only the weights/styles you need limit to regular/bold and don't download unused light, thin, italic, etc use subset fonts building a font file that contains only the characters you actually use greatly reduces resident memory the more glyphs a language has, the bigger the effect unicode-range prevents downloading unused ranges when you split into multiple files, but to reduce resident memory itself, the fundamental approach is to prepare a subset file that contains only the glyphs you need use font-display swap so font loading doesn't block text rendering better perceived performance to reduce transfer size, use the well-compressed woff2 /* apply a subset only the needed glyphs to a specific character range */ @font-face { font-family 'appfont'; src url 'app-latin-subset woff2' format 'woff2' ; unicode-range u+0000-00ff; /* basic latin only */ font-display swap; } 4 dom management and list/grid virtualization after images, the biggest driver of a tv web app's memory is the number of dom nodes tv apps are especially vulnerable because they typically have long grid/carousel structures with hundreds to thousands of content cards 4 1 every dom node is memory each dom element carries a node object, computed style, layout info, and if displayed a render layer if you put thousands of cards into the dom at once, all of them stay resident even when only a few are visible as the dom grows, style recalculation, layout, and compositing costs grow too, hurting performance 4 2 virtualize long lists windowing — do it virtualization is a must for long lists/grids keep only the visible items plus a small buffer actually in the dom, and recycle as the user scrolls key ideas render only the items visible in the viewport + a margin above and below, not the whole list remove from the dom or recycle elements that scroll out of view fake the full scroll height with a spacer element or a transform // conceptual example simple windowing with intersectionobserver const buffer = 5; // extra items above and below function renderwindow startindex, endindex, alldata, container { container textcontent = ''; // remove previous items → reclaim dom nodes & image memory const frag = document createdocumentfragment ; for let i = startindex - buffer; i <= endindex + buffer; i++ { if i < 0 || i >= alldata length continue; frag appendchild createcard alldata[i] ; } container appendchild frag ; } in a tv app, any list with more than ~100 items should almost always consider virtualization during validation, apps that "render thousands of cards as one big dom" are a classic memory-overrun case 4 3 recycle elements — the dom version of the object pool pattern same idea as the object pool 6 2 creating and discarding a card every time increases dom create/destroy and gc load instead, create a fixed number of dom nodes and just swap their content // create only as many card dom nodes as can be visible, then reuse them const pool = []; function getcard { return pool pop || createcard ; } function recycle card { card queryselector 'img' removeattribute 'src' ; // release image memory pool push card ; } 4 4 clean up the previous screen's dom on navigation in an spa, leaving the previous screen's dom in place keeps occupying memory on routing, remove the previous view's dom and release its listeners, timers, and observers together giving each screen component a paired mount and destroy , where destroy undoes everything it created listeners, timers, observers, dom , structurally prevents leaks see section 5 4 5 reduce excessive wrapper / shadow dom unnecessary abstraction layers increase node count cut meaningless <div> nesting and excessive wrapper components, and remove unneeded layers to keep the dom shallow and simple 4 6 beware compositing-layer gpu memory blowup separate from dom node count, the browser promotes some elements to their own compositing layers, managed as gpu textures each layer takes width × height × 4 bytes of gpu memory, by the same principle as a decoded image a single full-screen layer is about 8 mb fhd , so if layers grow to dozens or hundreds, a tv with tight gpu memory hits its limit quickly layers arise mainly from forced-promotion hints like will-change, transform translatez 0 / translate3d 0,0,0 , or from animated elements don't slap translatez 0 on every card on the belief that "promoting to a layer makes it faster " it instead wastes gpu memory and increases compositing cost turn will-change on only right before an animation and remove it when done leaving it on permanently keeps that many layers resident don't stack multiple full-screen layers front overlays, fade layers, etc use the devtools layers panel or the "layer borders" option to check the actual layer count and sizes rule promote layers "only when needed, only on the elements that need it " don't sprinkle hints out of habit 5 preventing memory leaks a memory leak is when an object that is no longer needed can't be reclaimed because something still references it, and it is fatal in long-running tv apps the patterns that cause leaks in web apps are well known 5 1 unremoved event listeners the most common cause a listener registered with addeventlistener keeps holding the target object and the callback and everything its closure captures unless you explicitly remove it in particular, listeners on long-lived objects like window and document stay until the app ends // bad the listener remains after the component is removed, holding the whole object graph window addeventlistener 'resize', this onresize ; // good 1 always remove in a matching pair window removeeventlistener 'resize', this onresize ; // good 2 clean up all at once with abortcontroller const controller = new abortcontroller ; window addeventlistener 'resize', onresize, { signal controller signal } ; element addeventlistener 'keydown', onkey, { signal controller signal } ; // on cleanup controller abort ; // removes every listener registered with this controller at once rule listeners you register when creating a component/screen must all be removed when destroying it making abortcontroller + signal your standard pattern reduces mistakes 5 2 reduce listeners with delegation in a tv grid with hundreds to thousands of cards, attaching a click/keydown listener to each card keeps as many callback closures resident as there are listeners, plus register/unregister cost every time a card is created or discarded instead, attach a single listener to a parent container and use event bubbling with event target to determine which card fired it event delegation the listener count drops to one, cutting both memory and cleanup burden // bad a listener per card → n callback closures resident cards foreach card => card addeventlistener 'click', onclick ; // good delegate to a single container → 1 listener grid addeventlistener 'click', e => { const card = e target closest ' card' ; if !card return; handleselect card dataset id ; } ; it pairs especially well with virtualization 4 2 and element recycling 4 3 even when you swap card dom, the container's listener stays, so you don't have to re-register a listener each time cleanup is also just removing the one container listener, which reduces the listener-leak risk from 5 1 5 3 unremoved timers and callbacks if setinterval, settimeout, or requestanimationframe reference objects in their callbacks, those objects stay alive as long as the timer does in particular, setinterval and a recursive requestanimationframe run forever unless you explicitly stop them const timerid = setinterval update, 1000 ; // cleanup clearinterval timerid ; let rafid = requestanimationframe loop ; // cleanup cancelanimationframe rafid ; always stop animation loops and polling timers when the screen goes to the background or is destroyed you can detect visibility with the visibilitychange event 5 4 detached dom nodes a node removed from the dom but still referenced by a javascript variable is not gc'd this is called "detached dom" and is a classic type of web app leak // bad const cache = {}; const list = document getelementbyid 'list' ; cache oldlist = list; // keeps a reference list remove ; // removed from the dom // removed from the dom, but cache oldlist still holds it, so it isn't reclaimed including all child nodes // good cache oldlist = null; // cut the reference so it can be reclaimed 5 5 global caches/arrays that grow without bound logs, event records, response caches, and so on grow without limit if you keep piling them into global arrays/objects always cap the size e g , lru or clear periodically because map preserves insertion order, deleting and re-inserting an item on each access keeps the "least recently used" item at the front, giving you a simple lru // a simple bounded lru cache const max = 50; const cache = new map ; function get key { if !cache has key return undefined; const value = cache get key ; cache delete key ; // delete, then cache set key, value ; // re-insert → most-recently-used moves to the back return value; } function put key, value { if cache has key cache delete key ; // reset order on update else if cache size >= max { cache delete cache keys next value ; // evict the least-recently-used front } cache set key, value ; } 5 6 large objects held by closures a closure captures variables from its outer scope a single callback can keep a huge data structure alive reference only the values you actually need inside the callback 5 7 use weakmap / weakref when you want to attach extra info to an object without affecting its lifetime, use weakmap when the key object disappears, the related entry is reclaimed automatically const metadata = new weakmap ; metadata set domnode, { lastfocused 0 } ; // when domnode is gc'd, this entry disappears too 5 8 release memory aggressively when backgrounded as seen in section 1, when memory is low the tv kills background apps if your app holds a lot of memory while off-screen the user switched to another app/input , it becomes the first to be killed and reloads from scratch on return, hurting ux so the moment your app becomes invisible, give back memory you don't currently need release offscreen images / decoded bitmaps 3 2 return videos/decoders not currently playing 7 1 clear caches you can rebuild 5 5 stop animation loops / polling timers 5 3 detect show/hide with visibilitychange document hidden release resources the moment the app is hidden, and restore only what's needed when it becomes visible again document addeventlistener 'visibilitychange', => { if document hidden { releaseoffscreenimages ; // release image bitmaps pauseandreleasevideos ; // return videos not currently playing stopanimationloops ; // stop raf / timers trimcaches ; // clear caches you can rebuild } else { restoreonresume ; // on return, re-prepare only what's needed } } ; rule preserve lightweight state such as scroll position and focus, but drop heavy resources bitmaps, buffers, caches in the background and rebuild them on return 5 9 how to diagnose leaks in chrome devtools' memory panel, take two or more heap snapshots and compare them comparison to find objects that keep growing filter by "detached" to directly inspect detached dom nodes open and close the same screen several times, then compare snapshots; objects that keep accumulating even after closing indicate a leak 6 javascript memory and gc management 6 1 suppress memory churn memory churn means creating and discarding many temporary objects in a short time this makes gc run often, leading to animation frame drops and performance degradation watch these places especially inside animation loops requestanimationframe inside scroll handlers and input remote-control key handlers inside frequently running for loops // bad a new object/array every frame function onframe { const pos = { x computex , y computey }; // new object every frame → gc pressure moveto pos ; requestanimationframe onframe ; } // good reuse the object const pos = { x 0, y 0 }; function onframe { pos x = computex ; pos y = computey ; moveto pos ; requestanimationframe onframe ; } to maintain 60 fps, the budget per frame is about 16 ms to stay within it, minimize allocations during the frame 6 2 object pool — use with care returning reusable objects particles, card view-models, etc to a pool instead of discarding them can reduce allocation/gc but a pool has its own management cost, and an oversized pool actually increases resident memory and gc load apply it only where allocation is a real bottleneck hot paths , after measuring 6 3 choose efficient data structures choosing the right data structure for the job saves memory for large numeric data, use a typedarray int32array, float32array, uint8array, etc instead of a plain array [] it stores the values themselves densely in contiguous memory without creating a separate object per element, so the difference is large compared with, for example, an array of {x, y} objects for frequent key-value lookups, map is more suitable and clearer than an object {} ; for membership only, use set when handling large arrays, don't overuse unnecessary copies slice, spread [ arr], concat each copy allocates new memory // bad a million coordinates as an array of objects const points = []; for let i = 0; i < 1_000_000; i++ points push { x 0, y 0 } ; // good a single typedarray x, y interleaved const points = new float32array 1_000_000 * 2 ; 6 4 watch strings when concatenating string fragments many times, collecting them in an array and joining once with join is safer for memory and performance don't keep a huge response string in its original form for long extract only what you need, then cut the reference to the original so it can be reclaimed 6 5 cut references explicitly assign null to a large object you no longer need to cut the reference so gc can reclaim it especially when the variable's scope is wide or long-lived this bigdata = null; // release the large data note to empty a value, obj prop = null is generally better than delete obj prop delete can break the engine's internal object optimizations and hurt performance 6 6 your app code bundle takes memory too so far we've covered data created at runtime images, dom, objects , but your app's javascript/css code itself uses memory v8 parses loaded scripts and keeps them resident, so the bigger the bundle, the higher the baseline footprint from startup the less code you load, the less resident memory don't include unnecessarily large libraries instead of pulling in a heavy dependency whole for one or two features, use only the parts you need, or consider a lighter alternative or your own implementation also avoid including duplicate libraries that do the same thing minify + tree-shaking at build time to remove unused dead code code-split to load only per-screen code don't ship every route's code on the first screen; split with dynamic import import at entry time not loading unused screens' code into memory at all is best excessive abstraction layers increase code size the same principle as 4 5 removing unnecessary dom wrappers applies to code 7 video & media memory management the core of a tv app is mostly video playback media uses a lot of memory, so managing it matters 7 1 always release media resources that finished/left playback if you only remove a <video> element from the screen and leave it, the decoder and buffers may remain release it definitively in this order function releasevideo video { video pause ; video removeattribute 'src' ; // remove the src attribute // if you used <source> child elements, remove those too video load ; // prompt release of internal buffers/decoder // if you used mse, also clean up sourcebuffer/mediasource } don't keep multiple <video> elements alive at once when implementing preview autoplay etc , release a preview video the moment it leaves the screen a tv has a limited number of hardware video decoders, and each decoder uses large buffers reusing a single <video> element is safer than creating and discarding one per content item 7 2 mse media source extensions buffer management if you implement adaptive streaming yourself, remove the buffer for already-played ranges with sourcebuffer remove otherwise the buffer keeps growing and eats memory cap the forward buffer prefetching minutes ahead is convenient but uses a lot of memory be conservative with buffer size, especially at 4k / high bitrate 7 3 subtitle / thumbnail tracks don't keep thumbnail-preview scrub-preview sprites fully resident; load/release only the ranges you need reclaim used subtitle tracks and blob urls with url revokeobjecturl a blob url is not released unless you explicitly revoke it const url = url createobjecturl blob ; // after use url revokeobjecturl url ; 8 data handling optimization fetch / json / cache the amount and handling of data fetched over the network directly affect memory usage 8 1 fetch only as much as you need server-side filtering & paging don't fetch thousands of list items at once; split them via paging / infinite scroll don't receive large responses containing fields the client won't use design the api so the server filters down to only the needed fields e g , graphql field selection, a rest fields= parameter fetching, parsing, and storing large data itself leads to excessive memory use, which in turn degrades performance 8 2 understand the cost of json parse json parse str turns a string into an object tree, taking memory for the parsed objects on top of the original string the larger the json, the more this double occupancy hurts don't keep holding the original string reference after parsing cut it to allow reclamation for very large datasets, consider streaming parsing or partial parsing avoid the pattern of parsing everything and holding it all 8 3 don't hold parse results whole for long rather than keeping the entire list api response in memory, transform it into the shape the screen needs a view-model and then discard the original response in infinite scroll, cap and clean up data for pages already passed far from the screen data, like the dom, is a target for "windowing " 8 4 efficient data formats for large, repetitive data, use a compact representation rather than a verbose format json is usually the standard on the web, but consider the following avoid unnecessarily nested or verbose json structures; keep key names and structure compact don't stuff binary data into json as base64 about 33% bloat ; receive it as a separate binary response or an arraybuffer if very large structured data is sent repeatedly, consider binary serialization e g , protobuf, cbor 8 5 cap your caches cap response caches, image caches, and computed-result caches with an lru limit so they don't grow without bound see 5 5 don't put large data in localstorage/sessionstorage; they have size limits and are synchronous apis bad for performance if you truly need large data, use indexeddb — and still manage a cap 9 canvas / webgl / web audio / worker cautions more powerful web apis can use a lot of memory and often hold resources gc won't reclaim automatically the following applies only if you use these apis directly — skip it if you don't 9 1 canvas 2d canvas back-buffer memory = width × height × 4 bytes don't create many large canvases for an unused canvas, shrink its size to width = height = 0 to reclaim the back buffer, and cut the reference creating a large array every frame with getimagedata/putimagedata causes memory churn reuse buffers 9 2 webgl webgl resources textures, buffers, programs, framebuffers are not reclaimed by gc automatically delete them explicitly deletetexture, deletebuffer, deleteprogram, deleteframebuffer when you no longer need the context, release it with getextension 'webgl_lose_context' losecontext textures use large gpu memory by the same principle as image bitmaps control texture size and count 9 3 web audio close an audiocontext with close after use don't leave many open a decoded audiobuffer can be large; cut the reference when done 9 4 web worker a worker has its own memory space terminate a finished worker with terminate ; leaving it keeps occupying memory passing large data to a worker copies it structured clone , creating two copies use a transferable e g , transferring ownership of an arraybuffer to avoid the copy worker postmessage buffer, [buffer] ; // transfer ownership of buffer → no copy 9 5 iframe each iframe loads its own document and resources, using a lot of memory create ad / external-widget iframes only when needed, and remove them from the dom to destroy them completely when done in closing tv web app memory optimization boils down to three principles create only as much as you show — images at display size, lists only as far as visible, data only as much as needed release the moment it's no longer needed — clean up listeners, timers, observers, media, dom, and caches along their lifecycle measure and verify on a real device — confirm memory doesn't trend upward across repeated open/close and long runs apply these three principles from the design stage, and you'll deliver a smooth, stable app experience to users ↑ back to top
We use cookies to improve your experience on our website and to show you relevant advertising. Manage you settings for our cookies below.
These cookies are essential as they enable you to move around the website. This category cannot be disabled.
These cookies collect information about how you use our website. for example which pages you visit most often. All information these cookies collect is used to improve how the website works.
These cookies allow our website to remember choices you make (such as your user name, language or the region your are in) and tailor the website to provide enhanced features and content for you.
You have successfully updated your cookie preferences.