Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export const SET_COMPOSITE_AUDIO_CODEC='SET_COMPOSITE_AUDIO_CODEC';
export const SET_COMPOSITE_AUDIO_TRACK='SET_COMPOSITE_AUDIO_TRACK';
export const SET_COMPOSITE_AUDIO_TRACK_DEVICEID='SET_COMPOSITE_AUDIO_TRACK_DEVICEID';
export const SET_COMPOSITE_VIDEO_BITRATE='SET_COMPOSITE_VIDEO_BITRATE';
export const SET_COMPOSITE_VIDEO_CODEC='SET_COMPOSITE_VIDEO_CODEC';
export const SET_COMPOSITE_VIDEO_FRAME_SIZE_AND_RATE='SET_COMPOSITE_VIDEO_FRAME_SIZE_AND_RATE';
export const SET_COMPOSITE_VIDEO_TRACK='SET_COMPOSITE_VIDEO_TRACK';
export const SET_COMPOSITE_VIDEO_TRACK1_DEVICEID='SET_COMPOSITE_VIDEO_TRACK1_DEVICEID';
Expand Down
4 changes: 0 additions & 4 deletions v2/src/react-example/src/actions/publishSettingsActions.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,8 @@ export const SET_PUBLISH_TURN_PASSWORD = 'SET_PUBLISH_TURN_PASSWORD';
export const SET_PUBLISH_APPLICATION_NAME='SET_PUBLISH_APPLICATION_NAME';
export const SET_PUBLISH_STREAM_NAME='SET_PUBLISH_STREAM_NAME';
export const SET_PUBLISH_STREAM_INFO='SET_PUBLISH_STREAM_INFO';
export const SET_PUBLISH_AUDIO_BITRATE='SET_PUBLISH_AUDIO_BITRATE';
export const SET_PUBLISH_AUDIO_CODEC='SET_PUBLISH_AUDIO_CODEC';
export const SET_PUBLISH_AUDIO_TRACK='SET_PUBLISH_AUDIO_TRACK';
export const SET_PUBLISH_AUDIO_TRACK_DEVICEID='SET_PUBLISH_AUDIO_TRACK_DEVICEID';
export const SET_PUBLISH_VIDEO_BITRATE='SET_PUBLISH_VIDEO_BITRATE';
export const SET_PUBLISH_VIDEO_CODEC='SET_PUBLISH_VIDEO_CODEC';
export const SET_PUBLISH_VIDEO_FRAME_SIZE_AND_RATE='SET_PUBLISH_VIDEO_FRAME_SIZE_AND_RATE';
export const SET_PUBLISH_VIDEO_TRACK='SET_PUBLISH_VIDEO_TRACK';
export const SET_PUBLISH_VIDEO_TRACK1_DEVICEID='SET_PUBLISH_VIDEO_TRACK1_DEVICEID';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { useSelector, useDispatch } from 'react-redux';
import QueryString from 'query-string';

import * as compositeSettingsActions from '../../actions/compositeSettingsActions';
import * as PublishOptions from '../../constants/PublishOptions';
import { compositePublishUrlParameters, compositePublishUrlParametersPrefix } from '../../constants/CompositeOptions';
import { getCookieValues, setCookieValues } from '../../utils/CookieUtils';
import CookieName from '../../constants/CookieName';
Expand Down Expand Up @@ -43,9 +42,6 @@ const CompositePublishSettingsForm = () => {
case (compositePublishUrlParametersPrefix+'videoBitrate'):
dispatch({type:compositeSettingsActions.SET_COMPOSITE_VIDEO_BITRATE,videoBitrate:savedValues[param]});
break;
case (compositePublishUrlParametersPrefix+'videoCodec'):
dispatch({type:compositeSettingsActions.SET_COMPOSITE_VIDEO_CODEC,videoCodec:savedValues[param]});
break;
default:
}
}
Expand Down Expand Up @@ -163,23 +159,6 @@ const CompositePublishSettingsForm = () => {
</div>
</div>
</div>
<div className="col-lg-6 col-sm-12">
<div className="form-group">
<label htmlFor="videoCodec">Video Codec</label>
<div className="input-group">
<select className="form-control"
id="videoCodec"
name="videoCodec"
value={compositeSettings.videoCodec}
onChange={(e)=>dispatch({type:compositeSettingsActions.SET_COMPOSITE_VIDEO_CODEC,videoCodec:e.target.value})}
>
{ PublishOptions.videoCodecs.map((codec,key) => {
return <option key={key} value={codec.value}>{codec.name}</option>
})}
</select>
</div>
</div>
</div>
</div>
</form>
);
Expand Down
75 changes: 0 additions & 75 deletions v2/src/react-example/src/components/publish/PublishSettingsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -350,81 +350,6 @@ const PublishSettingsForm = () => {
</div>
</div>

<div className="row">
<div className="col-lg-6 col-sm-12">
<div className="form-group">
<label htmlFor="audioBitrate">Audio Bitrate</label>
<div className="input-group">
<input type="number"
className="form-control"
id="audioBitrate"
name="audioBitrate"
value={publishSettings.audioBitrate}
disabled={webrtcPublish.connected}
onChange={(e)=>dispatch({type:PublishSettingsActions.SET_PUBLISH_AUDIO_BITRATE,audioBitrate:e.target.value})}
/>
<div className="input-group-append">
<span className="input-group-text">Kbps</span>
</div>
</div>
</div>
</div>
<div className="col-lg-6 col-sm-12">
<div className="form-group">
<label htmlFor="audioCodec">Audio Codec</label>
<div className="input-group">
<select
className="form-select"
id="audioCodec"
name="audioCodec"
value="opus"
disabled={webrtcPublish.connected}
readOnly
>
<option value="opus">Opus</option>
</select>
</div>
</div>
</div>
</div>
<div className="row">
<div className="col-lg-6 col-sm-12">
<div className="form-group">
<label htmlFor="videoBitrate">Video Bitrate</label>
<div className="input-group">
<input type="number"
className="form-control"
id="videoBitrate"
name="videoBitrate"
value={publishSettings.videoBitrate}
disabled={webrtcPublish.connected}
onChange={(e)=>dispatch({type:PublishSettingsActions.SET_PUBLISH_VIDEO_BITRATE,videoBitrate:e.target.value})}
/>
<div className="input-group-append">
<span className="input-group-text">Kbps</span>
</div>
</div>
</div>
</div>
<div className="col-lg-6 col-sm-12">
<div className="form-group">
<label htmlFor="videoCodec">Video Codec</label>
<div className="input-group">
<select className="form-select"
id="videoCodec"
name="videoCodec"
value={publishSettings.videoCodec}
disabled={webrtcPublish.connected}
onChange={(e)=>dispatch({type:PublishSettingsActions.SET_PUBLISH_VIDEO_CODEC,videoCodec:e.target.value})}
>
{ PublishOptions.videoCodecs.map((codec,key) => {
return <option key={key} value={codec.value}>{codec.name}</option>
})}
</select>
</div>
</div>
</div>
</div>
<div className="row">
<div className="col-lg-6 col-sm-12">
<div className="form-group">
Expand Down
1 change: 0 additions & 1 deletion v2/src/react-example/src/constants/CompositeOptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,4 @@ export const compositePublishUrlParameters = [
"audioBitrate",
"audioCodec",
"videoBitrate",
"videoCodec"
]
10 changes: 0 additions & 10 deletions v2/src/react-example/src/constants/PublishOptions.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
export const videoCodecs = [
{ value:"VP8", name:"VP8" },
{ value:"VP9", name:"VP9" },
{ value:"42e01f", name:"H.264" }
];

export const videoFrameSizes = [
{ value:"default", name:"Default" },
{ value:"1920x1080", name:"1920x1080" },
Expand Down Expand Up @@ -46,10 +40,6 @@ export const publishUrlParameters = [
"signalingURL",
"applicationName",
"streamName",
"audioBitrate",
"audioCodec",
"videoBitrate",
"videoCodec",
"videoFrameRate",
"videoFrameSize"
]
3 changes: 0 additions & 3 deletions v2/src/react-example/src/reducers/compositeSettingsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ const initialState = {
videoTrack: undefined,
videoTrack1DeviceId: '',
videoTrack2DeviceId: '',
videoCodec: 'VP8',
videoFrameRate: '30',
videoFrameSize: 'default',
userData: undefined,
Expand Down Expand Up @@ -46,8 +45,6 @@ const compositeReducer = (state = initialState, action) => {
return { ...state, audioTrackDeviceId:action.audioTrackDeviceId };
case compositeSettingsActions.SET_COMPOSITE_VIDEO_BITRATE:
return { ...state, videoBitrate:action.videoBitrate };
case compositeSettingsActions.SET_COMPOSITE_VIDEO_CODEC:
return { ...state, videoCodec:action.videoCodec };
case compositeSettingsActions.SET_COMPOSITE_VIDEO_FRAME_SIZE_AND_RATE:
let frameState = { ...state };
if (action.videoFrameSize != null) frameState.videoFrameSize = action.videoFrameSize;
Expand Down
12 changes: 0 additions & 12 deletions v2/src/react-example/src/reducers/publishSettingsReducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,11 @@ const initialState = {
applicationName: '',
streamName: '',
streamInfo: undefined,
audioBitrate: '64',
audioCodec: 'opus',
audioTrack: {},
audioTrackDeviceId: '',
videoBitrate: '3500',
videoTrack: {},
videoTrack1DeviceId: '',
videoTrack2DeviceId: '',
videoCodec: 'VP8',
videoFrameRate: '30',
videoFrameSize: 'default',
userData: undefined,
Expand Down Expand Up @@ -46,18 +42,10 @@ const publishSettingsReducer = (state = initialState, action) => {
return { ...state, streamName:action.streamName };
case PublishSettingsActions.SET_PUBLISH_STREAM_INFO:
return { ...state, streamInfo:action.streamInfo };
case PublishSettingsActions.SET_PUBLISH_AUDIO_BITRATE:
return { ...state, audioBitrate:action.audioBitrate };
case PublishSettingsActions.SET_PUBLISH_AUDIO_CODEC:
return { ...state, audioCodec:action.audioCodec };
case PublishSettingsActions.SET_PUBLISH_AUDIO_TRACK:
return { ...state, audioTrack:action.audioTrack };
case PublishSettingsActions.SET_PUBLISH_AUDIO_TRACK_DEVICEID:
return { ...state, audioTrackDeviceId:action.audioTrackDeviceId };
case PublishSettingsActions.SET_PUBLISH_VIDEO_BITRATE:
return { ...state, videoBitrate:action.videoBitrate };
case PublishSettingsActions.SET_PUBLISH_VIDEO_CODEC:
return { ...state, videoCodec:action.videoCodec };
case PublishSettingsActions.SET_PUBLISH_VIDEO_FRAME_SIZE_AND_RATE:
let frameState = { ...state };
if (action.videoFrameSize != null) frameState.videoFrameSize = action.videoFrameSize;
Expand Down