File tree 1 file changed +4
-2
lines changed
packages/RNWebRTCARExample/js/utils
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,8 @@ import {
12
12
import config from '../config'
13
13
import { createSignalClient } from './signal'
14
14
15
+ const fps = 30
16
+
15
17
async function getLocalStream ( isFront , ar ) {
16
18
const sourceInfos = await mediaDevices . enumerateDevices ( )
17
19
let videoSourceId
@@ -29,7 +31,7 @@ async function getLocalStream(isFront, ar) {
29
31
mandatory : {
30
32
// minWidth: 500,
31
33
// minHeight: 300,
32
- minFrameRate : 30 ,
34
+ minFrameRate : fps ,
33
35
} ,
34
36
facingMode : isFront ? 'user' : 'environment' ,
35
37
optional : videoSourceId ? [ { sourceId : videoSourceId } ] : [ ] ,
@@ -157,7 +159,7 @@ export const createWebRTCClient = ({
157
159
localStream = stream
158
160
onLocalStream ( stream )
159
161
if ( ar ) {
160
- startCapturingARView ( ) . then ( result =>
162
+ startCapturingARView ( { frameRate : fps } ) . then ( result =>
161
163
onLog ( 'Start WebRTC AR session' , result ) ,
162
164
)
163
165
}
You can’t perform that action at this time.
0 commit comments