Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fairblue
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hosting
chat
fairblue
Commits
22a4c495
Commit
22a4c495
authored
6 years ago
by
Anton Georgiev
Browse files
Options
Downloads
Patches
Plain Diff
add logs for audio input/output devices to debug iOS
parent
a71dd202
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bigbluebutton-html5/imports/ui/components/audio/device-selector/component.jsx
+10
-6
10 additions, 6 deletions
...imports/ui/components/audio/device-selector/component.jsx
with
10 additions
and
6 deletions
bigbluebutton-html5/imports/ui/components/audio/device-selector/component.jsx
+
10
−
6
View file @
22a4c495
...
...
@@ -2,13 +2,13 @@ import React, { Component } from 'react';
import
_
from
'
lodash
'
;
import
PropTypes
from
'
prop-types
'
;
import
cx
from
'
classnames
'
;
import
logger
from
'
/imports/startup/client/logger
'
;
import
{
styles
}
from
'
../audio-modal/styles
'
;
const
propTypes
=
{
kind
:
PropTypes
.
oneOf
([
'
audioinput
'
,
'
audiooutput
'
,
'
videoinput
'
]),
onChange
:
PropTypes
.
func
.
isRequired
,
value
:
PropTypes
.
string
,
handleDeviceChange
:
PropTypes
.
func
,
className
:
PropTypes
.
string
,
};
...
...
@@ -16,7 +16,6 @@ const defaultProps = {
kind
:
'
audioinput
'
,
value
:
undefined
,
className
:
null
,
handleDeviceChange
:
null
,
};
class
DeviceSelector
extends
Component
{
...
...
@@ -35,7 +34,7 @@ class DeviceSelector extends Component {
componentDidMount
()
{
const
handleEnumerateDevicesSuccess
=
(
deviceInfos
)
=>
{
const
devices
=
deviceInfos
.
filter
(
d
=>
d
.
kind
===
this
.
props
.
kind
);
logger
.
info
(
`Success on enumerateDevices() for
${
this
.
props
.
kind
}
:
${
JSON
.
stringify
(
devices
)}
`
);
this
.
setState
({
devices
,
options
:
devices
.
map
((
d
,
i
)
=>
({
...
...
@@ -48,11 +47,14 @@ class DeviceSelector extends Component {
navigator
.
mediaDevices
.
enumerateDevices
()
.
then
(
handleEnumerateDevicesSuccess
);
.
then
(
handleEnumerateDevicesSuccess
)
.
catch
((
err
)
=>
{
logger
.
error
(
`Error on enumerateDevices():
${
JSON
.
stringify
(
err
)}
`
);
});
}
handleSelectChange
(
event
)
{
const
value
=
event
.
target
.
value
;
const
{
value
}
=
event
.
target
;
const
{
onChange
}
=
this
.
props
;
this
.
setState
({
value
},
()
=>
{
const
selectedDevice
=
this
.
state
.
devices
.
find
(
d
=>
d
.
deviceId
===
value
);
...
...
@@ -61,7 +63,9 @@ class DeviceSelector extends Component {
}
render
()
{
const
{
kind
,
handleDeviceChange
,
className
,
...
props
}
=
this
.
props
;
const
{
kind
,
className
,
...
props
}
=
this
.
props
;
const
{
options
,
value
}
=
this
.
state
;
return
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment