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
0853298c
Commit
0853298c
authored
5 years ago
by
Chad Pilkey
Browse files
Options
Downloads
Patches
Plain Diff
fix client crash when client is unsecured
parent
05bd6070
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/video-provider/service.js
+18
-15
18 additions, 15 deletions
...ton-html5/imports/ui/components/video-provider/service.js
with
18 additions
and
15 deletions
bigbluebutton-html5/imports/ui/components/video-provider/service.js
+
18
−
15
View file @
0853298c
...
...
@@ -32,7 +32,7 @@ class VideoService {
this
.
skipVideoPreview
=
getFromUserSettings
(
'
bbb_skip_video_preview
'
,
false
)
||
SKIP_VIDEO_PREVIEW
;
this
.
userParameterProfile
=
getFromUserSettings
(
'
bbb_preferred_camera_profile
'
,
(
CAMERA_PROFILES
.
filter
(
i
=>
i
.
default
)
||
{}).
id
(
CAMERA_PROFILES
.
filter
(
i
=>
i
.
default
)
||
{}).
id
,
);
const
BROWSER_RESULTS
=
browser
();
this
.
isMobile
=
BROWSER_RESULTS
.
mobile
||
BROWSER_RESULTS
.
os
.
includes
(
'
Android
'
);
...
...
@@ -40,12 +40,15 @@ class VideoService {
this
.
numberOfDevices
=
0
;
this
.
updateNumberOfDevices
=
this
.
updateNumberOfDevices
.
bind
(
this
);
// Safari doesn't support ondevicechange
if
(
!
this
.
isSafari
)
{
navigator
.
mediaDevices
.
ondevicechange
=
(
event
)
=>
this
.
updateNumberOfDevices
();
// If the page isn't served over HTTPS there won't be mediaDevices
if
(
navigator
.
mediaDevices
)
{
this
.
updateNumberOfDevices
=
this
.
updateNumberOfDevices
.
bind
(
this
);
// Safari doesn't support ondevicechange
if
(
!
this
.
isSafari
)
{
navigator
.
mediaDevices
.
ondevicechange
=
event
=>
this
.
updateNumberOfDevices
();
}
this
.
updateNumberOfDevices
();
}
this
.
updateNumberOfDevices
();
}
defineProperties
(
obj
)
{
...
...
@@ -70,9 +73,9 @@ class VideoService {
}
updateNumberOfDevices
()
{
navigator
.
mediaDevices
.
enumerateDevices
().
then
(
devices
=>
{
navigator
.
mediaDevices
.
enumerateDevices
().
then
(
(
devices
)
=>
{
const
deviceIds
=
[];
devices
.
forEach
(
d
=>
{
devices
.
forEach
(
(
d
)
=>
{
if
(
d
.
kind
===
'
videoinput
'
&&
!
deviceIds
.
includes
(
d
.
deviceId
))
{
deviceIds
.
push
(
d
.
deviceId
);
}
...
...
@@ -242,8 +245,8 @@ class VideoService {
{
meetingId
:
Auth
.
meetingID
,
userId
:
Auth
.
userID
,
deviceId
:
deviceId
},
{
fields
:
{
stream
:
1
}
}
deviceId
,
},
{
fields
:
{
stream
:
1
}
}
,
);
return
videoStream
?
videoStream
.
stream
:
null
;
}
...
...
@@ -338,11 +341,11 @@ class VideoService {
// Multiple cameras shouldn't be enabled with video preview skipping
// Mobile shouldn't be able to share more than one camera at the same time
// Safari needs to implement devicechange event for safe device control
return
MULTIPLE_CAMERAS
&&
!
this
.
skipVideoPreview
&&
!
this
.
isMobile
&&
!
this
.
isSafari
&&
this
.
numberOfDevices
>
1
;
return
MULTIPLE_CAMERAS
&&
!
this
.
skipVideoPreview
&&
!
this
.
isMobile
&&
!
this
.
isSafari
&&
this
.
numberOfDevices
>
1
;
}
monitor
(
conn
)
{
...
...
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