Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
awrtc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Кубота
awrtc
Commits
490638d6
Commit
490638d6
authored
Sep 28, 2021
by
Иван Кубота
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
720p
parent
736f3b0a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
CallScreen.js
build/view/CallScreen.js
+16
-6
videoinputapp.ts
src/apps/videoinputapp.ts
+2
-0
BrowserMediaStream.ts
src/awrtc/media_browser/BrowserMediaStream.ts
+2
-2
No files found.
build/view/CallScreen.js
View file @
490638d6
...
@@ -14,9 +14,10 @@ Screen.Conference = function() {
...
@@ -14,9 +14,10 @@ Screen.Conference = function() {
const
media
=
new
awrtc
.
Media
();
const
media
=
new
awrtc
.
Media
();
awrtc
.
Media
.
SharedInstance
.
VideoInput
.
AddCanvasDevice
(
canvas
,
devname
,
canvas
.
width
/
2
,
canvas
.
height
/
2
,
30
);
awrtc
.
Media
.
SharedInstance
.
VideoInput
.
AddCanvasDevice
(
canvas
,
devname
,
canvas
.
width
,
canvas
.
height
,
30
);
setInterval
(()
=>
{
setInterval
(()
=>
{
console
.
log
(
222
);
awrtc
.
Media
.
SharedInstance
.
VideoInput
.
UpdateFrame
(
devname
);
awrtc
.
Media
.
SharedInstance
.
VideoInput
.
UpdateFrame
(
devname
);
},
50
);
},
50
);
//apps.VideoInputApp.sVideoDevice = devname;
//apps.VideoInputApp.sVideoDevice = devname;
...
@@ -108,7 +109,7 @@ Screen.Conference = function() {
...
@@ -108,7 +109,7 @@ Screen.Conference = function() {
canvasResizerEl
=
CanvasResizer
(
canvasResizerEl
=
CanvasResizer
(
cameraCanvas
=
D
.
h
(
'canvas'
,
{
cameraCanvas
=
D
.
h
(
'canvas'
,
{
cls
:
"output_canvas"
,
cls
:
"output_canvas"
,
width
:
"
64
0px"
,
width
:
"
72
0px"
,
height
:
"480px"
,
height
:
"480px"
,
style
:
{
style
:
{
/*display: 'none',*/
/*display: 'none',*/
...
@@ -141,11 +142,13 @@ Screen.Conference = function() {
...
@@ -141,11 +142,13 @@ Screen.Conference = function() {
var
video1
=
D
.
h
(
'video'
);
var
video1
=
D
.
h
(
'video'
);
var
cameraCanvasCtx
=
cameraCanvas
.
getContext
(
'2d'
);
var
cameraCanvasCtx
=
cameraCanvas
.
getContext
(
'2d'
);
var
updateVideos
=
function
()
{
/* var updateVideos = function() {
console.log(111);
cameraCanvasCtx.drawImage(video1,0,0);
cameraCanvasCtx.drawImage(video1,0,0);
requestAnimationFrame(updateVideos);
requestAnimationFrame(updateVideos);
};
};
requestAnimationFrame
(
updateVideos
);
requestAnimationFrame(updateVideos);
*/
store
.
sub
([
'inputsSetted'
],
(
is
)
=>
{
store
.
sub
([
'inputsSetted'
],
(
is
)
=>
{
/*store.set('videoinput1', devices.videoinput[devices.videoinput.length - 1].value);
/*store.set('videoinput1', devices.videoinput[devices.videoinput.length - 1].value);
...
@@ -206,7 +209,7 @@ Screen.Conference = function() {
...
@@ -206,7 +209,7 @@ Screen.Conference = function() {
});
});
window
.
instances
||
(
window
.
instances
=
[]);
var
RTCinstance
;
var
RTCinstance
;
store
.
sub
(
'appLoaded'
,
function
(
loaded
)
{
store
.
sub
(
'appLoaded'
,
function
(
loaded
)
{
if
(
!
loaded
)
if
(
!
loaded
)
...
@@ -217,6 +220,7 @@ Screen.Conference = function() {
...
@@ -217,6 +220,7 @@ Screen.Conference = function() {
currentUserID
,
currentUserID
,
currentUserID
?
null
:
remoteVideoEl
currentUserID
?
null
:
remoteVideoEl
);
);
window
.
instances
.
push
(
RTCinstance
);
RTCinstance
.
mUiRemoteVideoParent
=
currentUserID
?
null
:
remoteVideoEl
;
RTCinstance
.
mUiRemoteVideoParent
=
currentUserID
?
null
:
remoteVideoEl
;
var
selfieSegmentation
=
new
SelfieSegmentation
(
{
var
selfieSegmentation
=
new
SelfieSegmentation
(
{
...
@@ -377,9 +381,14 @@ Screen.Conference = function() {
...
@@ -377,9 +381,14 @@ Screen.Conference = function() {
navigator
.
mediaDevices
.
enumerateDevices
().
then
(
gotDevices
).
catch
(
handleError
);
navigator
.
mediaDevices
.
enumerateDevices
().
then
(
gotDevices
).
catch
(
handleError
);
setInterval
(
function
()
{
var
soundDisablerID
=
setInterval
(
function
()
{
D
(
'video'
).
map
(
a
=>
a
.
muted
=
true
)
D
(
'video'
).
map
(
a
=>
a
.
muted
=
true
)
},
2000
);
},
2000
);
window
.
enableSound
=
function
()
{
clearInterval
(
soundDisablerID
);
D
(
'video'
).
map
(
a
=>
a
.
muted
=
false
)
}
})();
})();
return
dom
;
return
dom
;
};
};
\ No newline at end of file
src/apps/videoinputapp.ts
View file @
490638d6
...
@@ -71,6 +71,8 @@ export class VideoInputApp {
...
@@ -71,6 +71,8 @@ export class VideoInputApp {
config
.
Audio
=
audio
;
config
.
Audio
=
audio
;
config
.
Video
=
video
;
config
.
Video
=
video
;
config
.
IdealWidth
=
640
;
config
.
IdealWidth
=
640
;
config
.
MinWidth
=
640
;
config
.
MinHeight
=
480
;
config
.
IdealHeight
=
480
;
config
.
IdealHeight
=
480
;
config
.
IdealFps
=
30
;
config
.
IdealFps
=
30
;
if
(
this
.
sVideoDevice
!==
null
)
{
if
(
this
.
sVideoDevice
!==
null
)
{
...
...
src/awrtc/media_browser/BrowserMediaStream.ts
View file @
490638d6
...
@@ -528,8 +528,8 @@ export class BrowserMediaStream {
...
@@ -528,8 +528,8 @@ export class BrowserMediaStream {
var
videoElement
:
HTMLVideoElement
=
document
.
createElement
(
"video"
);
var
videoElement
:
HTMLVideoElement
=
document
.
createElement
(
"video"
);
//width/doesn't seem to be important
//width/doesn't seem to be important
videoElement
.
width
=
32
0
;
videoElement
.
width
=
64
0
;
videoElement
.
height
=
24
0
;
videoElement
.
height
=
48
0
;
videoElement
.
controls
=
true
;
videoElement
.
controls
=
true
;
videoElement
.
setAttribute
(
"playsinline"
,
""
);
videoElement
.
setAttribute
(
"playsinline"
,
""
);
videoElement
.
id
=
"awrtc_mediastream_video_"
+
this
.
mInstanceId
;
videoElement
.
id
=
"awrtc_mediastream_video_"
+
this
.
mInstanceId
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment