= (props) => {
const { timestamp, logType, dataChannelId, dataChannelLabel, type, data } = props
const title = `${type}`
let labelComponent
if (logType === 'websocket') {
labelComponent =
} else if (logType === 'datachannel') {
labelComponent =
} else if (logType === 'peerconnection') {
labelComponent =
} else if (logType === 'sora') {
labelComponent =
} else if (logType === 'sora-devtools') {
labelComponent =
}
return
}
const Log = React.memo((props: TimelineMessage) => {
return
})
export const TimelineMessages: React.FC = () => {
const timelineMessages = useAppSelector((state) => state.timelineMessages)
const debugFilterText = useAppSelector((state) => state.debugFilterText)
const filteredMessages = timelineMessages.filter((message) => {
return debugFilterText.split(' ').every((filterText) => {
if (filterText === '') {
return true
}
return 0 <= JSON.stringify(message).indexOf(filterText)
})
})
return (
{filteredMessages.map((message) => {
let key = `${message.timestamp}-${message.type}`
// datachannel onopen が同時刻に発火することがあるため key に datachannel label を追加する
if (message.dataChannelLabel) {
key += `-${message.dataChannelLabel}`
}
return
})}
)
}