placeholder:'Press refresh to update available encoders',
label:'Display',
placeholder:'Press refresh to update available displays',
labelExtra:(
<IconButton
iconProps={{iconName:Icons.ArrowClockwise}}
disabled={!GlobalState.device}
text="Refresh"
onClick={this.updateEncoders}
onClick={this.updateDisplays}
/>
),
options:this.encoders.map(item=>({
options:this.displays.map(item=>({
key:item,
text:item,
})),
});
if (this.decoders.length>1){
result.push({
key:'decoder',
type:'dropdown',
label:'Decoder',
options:this.decoders.map(item=>({
key:item.key,
text:item.name,
data:item,
text:item.toString(),
})),
});
}
result.push({
key:'ignoreDecoderCodecArgs',
type:'toggle',
label:`Ignore decoder's codec arguments`,
description:`Some decoders don't support all H.264 profile/levels, so they request the device to encode at their highest-supported codec. However, some super old devices may not support that codec so their encoders will fail to start. Use this option to let device choose the codec to be used.`,
key:'crop',
type:'text',
label:'Crop',
placeholder:'W:H:X:Y',
});
result.push({
@@ -536,13 +555,6 @@ class ScrcpyPageState {
step:100,
});
result.push({
key:'tunnelForward',
type:'toggle',
label:'Use forward connection',
description:'Android before version 9 has a bug that prevents reverse tunneling when using ADB over WiFi.'
});
result.push({
key:'lockVideoOrientation',
type:'dropdown',
@@ -576,29 +588,49 @@ class ScrcpyPageState {
});
result.push({
key:'displayId',
key:'encoderName',
type:'dropdown',
label:'Display',
placeholder:'Press refresh to update available displays',
label:'Encoder',
placeholder:'Press refresh to update available encoders',
labelExtra:(
<IconButton
iconProps={{iconName:Icons.ArrowClockwise}}
disabled={!GlobalState.device}
text="Refresh"
onClick={this.updateDisplays}
onClick={this.updateEncoders}
/>
),
options:this.displays.map(item=>({
options:this.encoders.map(item=>({
key:item,
text:item.toString(),
text:item,
})),
});
if (this.decoders.length>1){
result.push({
key:'crop',
type:'text',
label:'Crop',
placeholder:'W:H:X:Y',
key:'decoder',
type:'dropdown',
label:'Decoder',
options:this.decoders.map(item=>({
key:item.key,
text:item.name,
data:item,
})),
});
}
result.push({
key:'ignoreDecoderCodecArgs',
type:'toggle',
label:`Ignore decoder's codec arguments`,
description:`Some decoders don't support all H.264 profile/levels, so they request the device to encode at their highest-supported codec. However, some super old devices may not support that codec so their encoders will fail to start. Use this option to let device choose the codec to be used.`,
});
result.push({
key:'tunnelForward',
type:'toggle',
label:'Use forward connection',
description:'Android before version 9 has a bug that prevents reverse tunneling when using ADB over WiFi.'