From ae04a5008e05e989a348965a9c2a23361d9ca5af Mon Sep 17 00:00:00 2001 From: mariusCZ Date: Sat, 6 Jan 2024 11:01:20 +0100 Subject: [PATCH] Add webaudio docs. --- docs/_static/webaudio_icon.png | Bin 0 -> 11575 bytes docs/directing_audio.rst | 46 +++++++++++++++++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 docs/_static/webaudio_icon.png diff --git a/docs/_static/webaudio_icon.png b/docs/_static/webaudio_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..8bc957ffc631c9f232fb5c801adee01ef856c749 GIT binary patch literal 11575 zcmbVybyQS;6z8M6l$I9hR0-)W5h>{u1O%kJo1sNOQc|Q#N*aU#0V$^Z>9dCa_b-}ig({lt9{sw(n$*p%211mP(v$f!dQG6#5Hh=~sVcJ|idgBL6Z z1zl$d!tX--A|UH(V?np%1F=?O@3j#cwc`m+a@Pz*>fPIV2$?`iRjbJ{bmsNrhlm&1-kH6QV+dE35n! zmHXeCQInb_WMoF`p8BggI$gWVq9=Qqn9wui@)xfLMN$PnpCi|S!3txrGP4kNk&=PqTjMLy45(2&~K=$@v%pMUEN_nBG zsU^W8iUHq{V!?@%a6E@JJ*R#N6f>)#qDrF5>ro*tz_Jn%qs%rQuifc1Wu=3Tk5MD! zS)Hhb(WHgZ)!i}vkb=~5&OF3x&t7%!X8@aX^&0!;N+!c=E27~5Ugr66Wf_^W=biGe zwnwTequWUS@(M^q!#)TY6EFHad#c|WeAzRmnwaz>-Dd3LcVU~w#-np6G|I5{p(Nf0%%eY3G4$iiJvFMI#I+FBbuq3l_@YHFB^+ANPS4Lt&xRwSQ@9x~n`}Ih zJE^|Ij;vfV--_Qp&ul#TDB$@v>Z*pPl8{IZR`^nf$aHJ`{@C4hn}uGCpyu7t zoe4PRiuR$7RPW#7GLDjH$*6^t`HEQ67!vN!B%vrq!=wiCa7=7yjo0)tgwmw3QE)(f z0n-(;xhzt|vgEWrVl47nE8A6$JYwg~TUX_VhC4Zdh#S>wnJ(WL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#X%9Q8H1z%C{5 zd%EE8oSGWkt#RKiK5ESc=kgepf&?G`wIOXf&Udv1+Qj!yX$E4Gn%?m7Gy|Jz(VwtgKkz0R~mJ zq;sGafp_xpSW#gex5=;z7SYP6&CQxC9WV50&1kwiZBdeJWr$8B#uc*ZV046F|z;`r$TcPmdS3pLqh9eZ}j zVo@_hbVH7haTT)~seo10VWR_?EO);UbpDGA5XoVytiCa<@)M=k;4OJfH+q?A(T^fO)ao z?krl8QYdg9E~ttC@#$#wjYVsAYr6Slv47vHvp@W=lb{h|kIj2PUt{mD|}5W$B^RLVjR?{qw-aKobRBCP=T$ zZvRJsfrc;X_FQ_*jC~t5Qv#9rT{D~yuAdIdjsEfD+(EQD*DAfT$yU+(d2)uaBQ^wppFc#d%LBqci_7=U2CqqGDjL`FB8( zK^r0>AqiFaB&2BfLIo^~z(Q%~VrRG^A23DnzR6qK-q$akKT>CglS}pfO@8kValde?TMr9EL6+mu~25)b|d2B8=L(4ro<*vCSUym zmj(zgU0q!TrOm(7W*xx1Fn`=MEn46%GLr$ahOx(qDS;v)0_)petG8h-c-&(NJl}!@ zk;gDGGBGXL`#1d_GcqzlSW9lySL%j_fWh3fXliRepbxDh-^;eZ>e&+*Io zXyxK&YR3(scy`34-)So2`;-+CLz<&Yh63uFp|#fM@ks_CCrcXsm$+Yb_9Ec{%^+4{2hjM Yck}P;2vkn+Bs8Qbt0Ge_WfJs103!nW$N&HU literal 0 HcmV?d00001 diff --git a/docs/directing_audio.rst b/docs/directing_audio.rst index e8c693b3d..2a9400ba4 100644 --- a/docs/directing_audio.rst +++ b/docs/directing_audio.rst @@ -110,3 +110,49 @@ Windows have output devices and input devices. LedFx works processing an input d - And if you want to still listen to the audio on the digital output, you can use the set the "Listen" device on the "Recording" input (right-click -> properties): .. image:: ./_static/directing_audio_win10_4.png + + +Webaudio +======= +.. warning:: + + This feature is still in alpha. + +.. rubric:: Enabling + +- Go to settings and enter "HackedByBlade!" and a window saying "dev mode activated" should appear. + +- Then in the same bar enter "BladeAlpha" and then click on the UI setting. + +- In the UI settings first enable expert mode and then you should see alpha mode, which you need to toggle on. + +- Open the alpha settings under client features and enable webaudio setting. + +.. rubric:: Usage + +- When your main LedFx instance (the one that is connected to all lights) is running, open another instance on another device (make sure webaudio is enabled on new instance). + +- In settings, under core settings, expand audio and you should see an icon that looks like this: + +.. image:: ./_static/webaudio_icon.png + +- Click on that icon and a small window should appear where you can enter the name for your device. Enter the name and click on the check mark. + +- In your browser you should get a pop-up which asks you to give permission to the site to use your microphone/other audio input, confirm it. + +- Refresh the webpage of the main LedFx instance and in the audio settings select your newly created device. Now your lights should be visualized from the audio of the other device. + +.. note:: + + If audio is not being sent or you were not able to allow microphone permission, it may be due to running LedFx without HTTPS. + In this case the solution is either to run LedFx as HTTPS or to allow media devices in your browser to be accessed without HTTPS. To fix this: + + - Firefox: https://stackoverflow.com/questions/60957829/navigator-mediadevices-is-undefined/66605018#66605018 + + - Chrome: https://sites.google.com/a/chromium.org/dev/Home/chromium-security/deprecating-powerful-features-on-insecure-origins (specifically "Testing Powerful Features" section) + +.. rubric:: Type Setting + +When creating a new webaudio device, you may see, below the name entering field, an ability to choose between ws-v1 and ws-v2. Unless something does not work, you should always use ws-v2. +The reason for that is ws-v2 using significantly less bandwidth. The ws-v1 setting sends audio data (which is float type) as plain text, meaning that for each number a byte is sent (can be up to 6 bytes per number), even though +the audio data being sampled is only 16-bit. The ws-v2 setting instead sends the audio data as base64, which is a binary data encoding method, greatly reducing the used bandwidth. \ No newline at end of file