{"id":15722427,"url":"https://github.com/defold/extension-kaios","last_synced_at":"2025-09-13T05:40:10.061Z","repository":{"id":146435035,"uuid":"339561245","full_name":"defold/extension-kaios","owner":"defold","description":"Defold native extension for use with KaiOS","archived":false,"fork":false,"pushed_at":"2024-04-17T07:15:48.000Z","size":131,"stargazers_count":3,"open_issues_count":6,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-01-30T15:25:12.783Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/defold.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2021-02-16T23:40:42.000Z","updated_at":"2022-11-22T17:57:40.000Z","dependencies_parsed_at":"2024-02-27T09:44:29.769Z","dependency_job_id":null,"html_url":"https://github.com/defold/extension-kaios","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defold%2Fextension-kaios","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defold%2Fextension-kaios/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defold%2Fextension-kaios/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/defold%2Fextension-kaios/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/defold","download_url":"https://codeload.github.com/defold/extension-kaios/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237267975,"owners_count":19282320,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T22:07:35.716Z","updated_at":"2025-02-05T08:31:10.423Z","avatar_url":"https://github.com/defold.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# KaiOS extension\nDefold native extension for use with KaiOS. See also [extension-kaiads](https://github.com/defold/extension-kaiads) for KaiAds integration.\n\n## KaiOS HTML template\nThe extension provides a [modified version](/kaios/engine_template.html) of the default `engine_template.html` from builtins. The modifications are:\n\n* Removed \"Made with Defold\" and Fullscreen\" `\u003cdiv\u003e`\n* Hardcoded `Module['isWASMSupported']` to false (WASM is not supported on current KaiOS devices)\n* Load `Defold.js` (see below)\n* Canvas always resized to `fit`.\n\n## KaiOS key support\nThe extension adds support for KaiOS specific keys:\n\n* Left Softkey - Mapped to KEY_F1\n* Right Softkey - Mapped to KEY_F2\n* Call - Mapped to KEY_MENU\n\n\n## API functions\nThe extension adds the following API functions:\n\n### kaios.exit()\nClose a KaiOS application (will call window.close()).\n\nTODO: Should we instead use sys.exit() and hook into the application lifecycle somehow through the extension and do a `window.close()`?\n\n### kaios.play_sound(sound, options)\nPlay a sound using JavaScript AudioContext. Sounds must be bundled using the \"bundle resources\" setting in game.project. Functionality for setting up an AudioContext and keeping track of audio buffers can be found in [`Defold.js`](https://github.com/defold/extension-kaios/blob/main/kaios/res/web/Defold.js) which is included with the extension.\n\n```\n-- play and loop sound\nkaios.play_sound(\"sound.wav\", { loop = true })\n```\n\n\n### kaios.stop_sound(sound)\nStop a sound played using `kaios.play_sound()`. Note: Sounds are of a \"fire and forget\" nature. If the same sound is played multiple times this function will only ever stop the most recently played instance of the sound.\n\n```\nkaios.stop_sound(\"sound.wav\")\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefold%2Fextension-kaios","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefold%2Fextension-kaios","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefold%2Fextension-kaios/lists"}