Index of every page on this site: llms.txt
All skills
oahc09 avatar

/cocosair-audio-video

@ed38648
by oahc09oahc09/cocosairjs3 stars
2
Run it yourself

Play media with AudioService, VideoPlayer and WebView. Use for silent autoplay, advancing currentTime, BGM/SFX channels or DOM video and iframe overlays.

  • 9 files
  • 40.4 KB
  • MIT
  • Updated last month
  • GitHub
Use this Skill: https://skilld.dev/gh/oahc09/cocosairjs/cocosair-audio-video

Nothing lands on disk. Nothing to clean up.

Fork this Skill

Edit a local copy. It keeps the author and licence.

referencestriggers.md

≈248 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Cocos AIR audio, video and WebView triggers

Source annotations refer to the AIR checkout.

When to use what

  • "BGM + SFX channels, volume switches" -> AudioService (src/air/audio-service.ts:46); it wraps AudioSource, one persistent node per BGM id, one transient node per SFX voice.
  • "single raw clip, seek, PCM data" -> AudioSource directly (src/cocos/audio/audio-source.ts:63); AudioService exposes no per-clip seek or playOneShot (:430).
  • "play a real video in the scene rect" -> VideoPlayer (src/cocos/video/video-player.ts:51); it is a DOM <video>, not a texture - codec support is the browser's.
  • "show a web page inside the app" -> WebView (src/cocos/web-view/web-view.ts:48); an iframe overlay, never rendered into the WebGL canvas.
  • "did playback actually happen?" -> audio.bgmState().currentTime (src/air/audio-service.ts:199-204), player.currentTime after PLAYING (src/cocos/video/video-player.ts:321), iframe-side state for WebView.

Source: SKILL.md on GitHub

skilld matched fixed text patterns in SKILL.md and file names. Patterns miss obfuscated code.

skilld run checks every file with the same patterns. It asks for approval before it loads a Skill with a behavior marked Needs approval.

No third-party reports yet.

Signed by skilld at ed38648. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub yesterday.

Activeupdated last month
layer
subsystem
All 1 allowed tools
Read Edit Write Bash
Other metadata
compatibility
Cocos AIR source checkout or installed cocosair.js package. Browser rendering requires WebGL 2; source tooling requires Node.js >=18. Use the host-provided tools and user-authorized workspace.
when_to_use
[
  "audio starts silently before a user gesture",
  "control BGM and SFX channels or volume",
  "prove playback time actually advances",
  "place video above or below the canvas",
  "WebView mounts the wrong URL"
]
owns
[
  "audio-service",
  "autoplay-unlock",
  "playback-time",
  "video-player",
  "webview"
]
not_for
[
  "shared remote-file caching -> cocosair-assets",
  "DOM input geometry or HTML textures -> cocosair-graphics-and-dom",
  "keyboard and action focus -> cocosair-input-action"
]
metadata
{
  "author": "oahc09@gmail.com",
  "version": "1.0.0",
  "last-updated": "2026-10-13",
  "description_zh": "管理音频通道、用户手势解锁、播放证据、VideoPlayer 和 WebView。用于媒体加载、播放、平台限制或资源清理。"
}

README badge

README badge for oahc09/cocosairjs/cocosair-audio-video