Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emscripten list devices #7226

Merged
merged 7 commits into from
Dec 2, 2022

Conversation

Jonathhhan
Copy link
Contributor

@Jonathhhan Jonathhhan commented Dec 2, 2022

This lists the audio / video devices with ofxEmscriptenVideoGrabber::listDevices() or ofxEmscriptenSoundStream::getDeviceList().
Right now it only prints in Java Script(in the browser console), because I do not know how to return it to OF(a single string would be easy, but I guess it is kind of a list).

@Jonathhhan
Copy link
Contributor Author

Jonathhhan commented Dec 2, 2022

Thats the content of the whole Java Script array:

Array(8)
0
:
InputDeviceInfo {deviceId: 'default', kind: 'audioinput', label: 'Default', groupId: '8edd40a8df4e3d1ff4331ccb5e3491298975b73e9481876f38c0dd8a1c2bd59a'}
1
:
InputDeviceInfo {deviceId: '2020e024037a4efe6e7f17fc5268e80b3f5d568e4b063a80b4c5f3affcd5a696', kind: 'audioinput', label: 'USB Audio Digital Stereo (IEC958)', groupId: '666f12d3ad70abfae8d3b5c02f1ed7b9aeab3bdd6aca1d37b75ec35b22d6edf2'}
2
:
InputDeviceInfo {deviceId: 'ffc895471e8f56dfe73763bb94276adfaac3753cedbaff52c871762972f369fb', kind: 'audioinput', label: 'Saffire Pro 24 DSP Multichannel', groupId: '3ac92192fa46c48b65987ee9557e73f3798389182278f6b8ed4baa84d708db88'}
3
:
InputDeviceInfo {deviceId: 'b3192e489ec53ec25b578ac741912638a2e97c4c632f8484e31cadf3365bc26b', kind: 'videoinput', label: 'HD USB Camera (05a3:9230)', groupId: '5996aa61fa64ea32e17351ee1a6ed495abea327a3539d5a2673ae57f06d404ec'}
4
:
MediaDeviceInfo {deviceId: 'default', kind: 'audiooutput', label: 'Default', groupId: 'default'}
5
:
MediaDeviceInfo {deviceId: '8469f381ddbe55cb729aebef358be229c51ae271850968569097114fa9452c9b', kind: 'audiooutput', label: 'GA102 High Definition Audio Controller Digital Stereo (HDMI 2)', groupId: 'd5977718c7884e923b3f228418e9d103016a85257a50cbabdef6a219a41ccb18'}
6
:
MediaDeviceInfo {deviceId: '6d5b8b557f2e973944283d294bb38de3823895b81bcbcc2dfca126cfc1cf6817', kind: 'audiooutput', label: 'USB Audio Digital Stereo (IEC958)', groupId: '666f12d3ad70abfae8d3b5c02f1ed7b9aeab3bdd6aca1d37b75ec35b22d6edf2'}
7
:
MediaDeviceInfo {deviceId: '23d10c497f039c3ed921e9b3e73539036cc39f3b6ab01605887c9f889b0cbf7b', kind: 'audiooutput', label: 'Saffire Pro 24 DSP Multichannel', groupId: '3ac92192fa46c48b65987ee9557e73f3798389182278f6b8ed4baa84d708db88'}
length
:
8
[[Prototype]]
:
Array(0)

And this is a filtered message: videoinput: HD USB Camera (05a3:9230) id = b3192e489ec53ec25b578ac741912638a2e97c4c632f8484e31cadf3365bc26b

@ofTheo ofTheo merged commit 75f9d81 into openframeworks:master Dec 2, 2022
@Jonathhhan Jonathhhan deleted the Emscripten-list-devices branch March 4, 2023 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants