Ytaudio
YouTube Audio Player generation class. Allows for easy creation and daisy-chaining. Example linked below.
Install / Use
/learn @navarr/YtaudioREADME
YouTube Audio Player Generation Library
YTAudio is a helper designed to help generate a "YouTube audio embeddable" - a version of the YouTube flash player that is small enough that only the audio controls show.
YTAudio does not extract the audio from YouTube videos, nor does it eliminate the overhead of processing YouTube videos when playing the files.
Most of the class allows daisy-chaining, since it is primarily controlled through setters and is intended as a helper class. Below are two examples of rendering a YTAudio object.
use Navarr\YouTube\AudioPlayer;
AudioPlayer::create('http://www.youtube.com/watch?v=dvgZkm1xWPE&ob=av2n')
->size(AudioPlayer::SIZE_LARGE)
->theme(AudioPlayer::THEME_DARK)
->hd() // Force HD
->loop() // Loop
->progressBar() // Show Progress Bar
->timeCode() // Show Time Code
->autoplay() // Autoplay
->render(); // Output XHTML
This method uses daisy-chaining for setting. Any daisy-chain function that turns a feature on or off takes a boolean, with the default value being true.
use Navarr\YouTube\AudioPlayer;
AudioPlayer::create(
'http://www.youtube.com/watch?v=dvgZkm1xWPE&ob=av2n',
[
'size' => AudioPlayer::SIZE_LARGE,
'theme' => AudioPlayer::THEME_DARK,
'hd',
'loop',
'autoplay',
'progressbar',
'timecode',
]
)->render();
This method accepts the configuration as an array. You can daisy chain after it, but you probably will not need to.
Related Skills
node-connect
346.4kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
107.2kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
346.4kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
qqbot-media
346.4kQQBot 富媒体收发能力。使用 <qqmedia> 标签,系统根据文件扩展名自动识别类型(图片/语音/视频/文件)。



