Skip to content

Commit

Permalink
DebugPane に CapabilitiesCodec の枠組みを追加する
Browse files Browse the repository at this point in the history
  • Loading branch information
tnamao committed Oct 31, 2023
1 parent fdc16ec commit d1d6911
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
9 changes: 9 additions & 0 deletions src/components/DebugPane/CapabilitiesCodec.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import React from 'react';

export const CapabilitiesCodec: React.FC = () => {
const videoCapabilities = RTCRtpSender.getCapabilities('video');
console.log(videoCapabilities?.codecs);
const audioCapabilities = RTCRtpSender.getCapabilities('audio');
console.log(audioCapabilities?.codecs);
return <div></div>;
};
7 changes: 6 additions & 1 deletion src/components/DebugPane/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { Tab, Tabs } from 'react-bootstrap';
import { setDebugType } from '@/app/actions';
import { useAppDispatch, useAppSelector } from '@/app/hooks';

import { CapabilitiesCodec } from './CapabilitiesCodec';
import { DataChannelMessagingMessages } from './DataChannelMessagingMessages';
import { DebugFilter } from './Filter';
import { LogMessages } from './LogMessages';
Expand All @@ -29,7 +30,8 @@ export const DebugPane: React.FC = () => {
key === 'stats' ||
key === 'timeline' ||
key === 'signaling' ||
key === 'messaging'
key === 'messaging' ||
key === 'codec'
) {
dispatch(setDebugType(key));
}
Expand Down Expand Up @@ -65,6 +67,9 @@ export const DebugPane: React.FC = () => {
<SendDataChannelMessagingMessage />
<DataChannelMessagingMessages />
</Tab>
<Tab eventKey="codec" title="Codec">
<CapabilitiesCodec />
</Tab>
</Tabs>
</div>
);
Expand Down
1 change: 1 addition & 0 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ export const DEBUG_TYPES = [
'timeline',
'signaling',
'messaging',
'codec',
] as const;

export const AUDIO_CONTENT_HINTS = ['', 'speech', 'speech-recognition', 'music'] as const;
Expand Down

0 comments on commit d1d6911

Please sign in to comment.