![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
@clappr/clappr-tvs-key-mapping-plugin
Advanced tools
Maps smart TVs remote control keys to a common pattern for Clappr.
Most smart TV platforms implement their own key code for their remote controls. With this plugin, you can guarantee that the wanted action for one button is consistent through all mapped devices.
When the key of the mapped device is pressed, the plugin triggers one Clappr event with the key name on core
(CORE_SMART_TV_KEY_PRESSED
) and container
(CONTAINER_SMART_TV_KEY_PRESSED
) scope. This flow allows you to listen to one of those events and do what you want based on the returned key name.
console.log
for the rescueEnable/disable log dynamically to check the key code and key name of each remote control key (and find out if the key is not mapped too!). The log uses Clappr.Log
feature and is printed on the INFO
level.
You can use it from JSDelivr:
https://cdn.jsdelivr.net/npm/@clappr/clappr-tvs-key-mapping-plugin@latest/dist/clappr-tvs-key-mapping-plugin.min.js
or as an npm package:
# Using yarn
yarn add @clappr/clappr-tvs-key-mapping-plugin
# Using npm
npm i @clappr/clappr-tvs-key-mapping-plugin
Then just add the Watcher
into the list of plugins of your player instance and set the device name to watch on tvsKeyMapping.deviceToMap config:
var player = new Clappr.Player({
source: 'http://your.video/here.mp4',
plugins: [TVsKeyMappingPlugin.Watcher],
tvsKeyMapping: { deviceToMap: 'browser' },
});
The options for the plugin go in the tvsKeyMapping
property as shown below:
var player = new Clappr.Player({
source: 'http://your.video/here.mp4',
plugins: [TVsKeyMappingPlugin.Watcher],
tvsKeyMapping: {
deviceToMap: 'browser',
},
});
deviceToMap {String}
This config is mandatory for the plugin. The name needs to be one of the currently mapped devices. The current mapped devices names are below:
Name | Device |
---|---|
browser | This option is for test the plugin on a desktop device in any web browser. |
samsung_tizen | Samsung smart TVs with Tizen OS (>= 2015 launch year). |
samsung_orsay | Samsung smart TVs with Orsay OS (<= 2014 launch year). |
lg_webos | LG smart TVs with WebOS (>= 2014 launch year). |
panasonic | Panasonic smart TVs. |
method | arguments | description |
---|---|---|
plugin.start | device | Adds a listener for remote control keydown events of the mapped device to send the key name on the Clappr events. |
plugin.stop | Removes listener for remote control keydown events. | |
plugin.enableLog | Adds a listener for remote control keydown events of the mapped device to log remote control key data. | |
plugin.disableLog | Removes listener for remote control keydown events that logging remote control key data. |
Install dependencies: npm install
Run: npm start
Test: npm test
Lint: npm run lint
Build: npm run build
Minified version: npm run release
FAQs
Maps smart TVs remote control keys to a common pattern for Clappr.
The npm package @clappr/clappr-tvs-key-mapping-plugin receives a total of 4 weekly downloads. As such, @clappr/clappr-tvs-key-mapping-plugin popularity was classified as not popular.
We found that @clappr/clappr-tvs-key-mapping-plugin demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.