Click here to Skip to main content
16,020,305 members
Home / Discussions / JavaScript
   

JavaScript

 
QuestionRecording audio in Unity WebGL game Pin
G. Filkov19-Sep-24 14:13
G. Filkov19-Sep-24 14:13 
Hi everybody,
I am trying to provide recording functionality (save gameplay as video file) for my Unity WebGL game.
I can easily record video stream (via javascript plugin) as
let canvasStream = canvas.captureStream();
But I fail to record audio :frowning:
I can go with
stream = await navigator.mediaDevices.getUserMedia(constraints);
But I don’t like this method. It creates popup, interrupting the game. I’d like it to go smoothly, without interruption.
I see the WEBAudio object created on the page with WEBAudio.audioInstances, WEBAudio.audioContext, etc. But I failed to get audio stream from there.
No errors logged and no audio in my recording. Just video.

Appreciate your help and advice on how to get Audio Stream from any of these available objects:
WEBAudio
WEBAudio.audioContext
WEBAudio.audioContext.destination
WEBAudio.audioInstances[1].buffer
WEBAudio.audioInstances[1].getNumberOfChannels()
WEBAudio.audioInstances[2].gain

Thank you.
Questionimage scrolling Pin
Member 131084951-Sep-24 16:12
Member 131084951-Sep-24 16:12 
AnswerRe: image scrolling Pin
Dave Kreskowiak1-Sep-24 18:27
mveDave Kreskowiak1-Sep-24 18:27 
AnswerRe: image scrolling Pin
RedDk2-Sep-24 9:26
RedDk2-Sep-24 9:26 
AnswerRe: image scrolling Pin
Richard Deeming2-Sep-24 21:11
mveRichard Deeming2-Sep-24 21:11 
GeneralRe: image scrolling Pin
RedDk3-Sep-24 8:04
RedDk3-Sep-24 8:04 
QuestionMapping Touchscreen Events to Mouse Events Pin
Steve Raw17-Aug-24 13:38
professionalSteve Raw17-Aug-24 13:38 
AnswerRe: Mapping Touchscreen Events to Mouse Events Pin
Jeremy Falcon20-Aug-24 13:02
professionalJeremy Falcon20-Aug-24 13:02 
RantRe: Mapping Touchscreen Events to Mouse Events Pin
Richard Deeming20-Aug-24 18:54
mveRichard Deeming20-Aug-24 18:54 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Jeremy Falcon21-Aug-24 4:22
professionalJeremy Falcon21-Aug-24 4:22 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Chris Maunder21-Aug-24 9:41
cofounderChris Maunder21-Aug-24 9:41 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Jeremy Falcon21-Aug-24 9:52
professionalJeremy Falcon21-Aug-24 9:52 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Chris Maunder21-Aug-24 9:53
cofounderChris Maunder21-Aug-24 9:53 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Jeremy Falcon21-Aug-24 9:57
professionalJeremy Falcon21-Aug-24 9:57 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Steve Raw20-Aug-24 20:49
professionalSteve Raw20-Aug-24 20:49 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Jeremy Falcon21-Aug-24 4:39
professionalJeremy Falcon21-Aug-24 4:39 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Steve Raw21-Aug-24 8:22
professionalSteve Raw21-Aug-24 8:22 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Jeremy Falcon21-Aug-24 9:48
professionalJeremy Falcon21-Aug-24 9:48 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Steve Raw21-Aug-24 17:24
professionalSteve Raw21-Aug-24 17:24 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Jeremy Falcon21-Aug-24 17:40
professionalJeremy Falcon21-Aug-24 17:40 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Steve Raw21-Aug-24 17:56
professionalSteve Raw21-Aug-24 17:56 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Jeremy Falcon22-Aug-24 2:02
professionalJeremy Falcon22-Aug-24 2:02 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Jeremy Falcon22-Aug-24 2:30
professionalJeremy Falcon22-Aug-24 2:30 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Steve Raw22-Aug-24 4:21
professionalSteve Raw22-Aug-24 4:21 
GeneralRe: Mapping Touchscreen Events to Mouse Events Pin
Jeremy Falcon22-Aug-24 6:44
professionalJeremy Falcon22-Aug-24 6:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.