Commit 60d60fe1 authored by Muhammadali's avatar Muhammadali

update-

parent 4069bf88
......@@ -164,53 +164,14 @@ const ModalPhoneNumpad = ({
},
[gameState.toggleCP],
);
let a = {
1: [697.0, 1209.0],
2: [697.0, 1336.0],
3: [697.0, 1477.0],
4: [770.0, 1209.0],
5: [770.0, 1336.0],
6: [770.0, 1477.0],
7: [852.0, 1209.0],
8: [852.0, 1336.0],
9: [852.0, 1477.0],
0: [941.0, 1336.0],
'*': [941.0, 1209.0],
'#': [941.0, 1477.0],
};
// useEffect(() => {
// document.addEventListener('keydown', (e) => {
// if (a[e?.key][0] && a[e?.key][1]) {
// if (e.repeat) {
// return;
// } else {
// handleKeyUp(e);
// if (a[e.key] && a[e.key][0] ? a[e.key][0] : false) {
// if (a[e.key][0] && a[e.key][1]) {
// document.addEventListener('keyup', (e) => {
// // if (e.repeat) return;
// boxDialer.stop();
// console.log('key up');
// });
// boxDialer.dialTone(a[e.key][0], a[e.key][1]);
// console.log('key down');
// }
// }
// }
// }
// });
// return () => {
// document.removeEventListener('keydown', handleKeyUp);
// };
// }, [handleKeyUp]);
useEffect(() => {
document.addEventListener('keyup', handleKeyUp);
// document.addEventListener('keydown', (e) => {
// console.log('key down all (' + e.repeat + ')');
// });
// useEffect(()=>)
return () => {
document.removeEventListener('keyup', handleKeyUp);
};
}, [handleKeyUp]);
// `${Data.getHours()}:${Data.getMinutes()} ${Data.getDate()}.${Data.getMonth()+1}.${Data.getFullYear()}`
const callButton = () => {
// inset if ----------
......@@ -280,8 +241,7 @@ const ModalPhoneNumpad = ({
onMouseUp={() => boxDialer.stop()}
onMouseOut={() => boxDialer.stop()}
className='nocopy'
id={`numpad_${mapItem.id}`}
key={`numpad_${mapItem.id}`}
key={mapItem.id}
onClick={() => {
mapItem.type === 'number' &&
inputController({
......@@ -317,9 +277,8 @@ const ModalPhoneNumpad = ({
</NumberButton.CallButton>
<NumberButton.CallButtonModal visiblevalue={exNum}>
<NumberButton.CallButtonModalInset>
{extnums?.map((item, index) => (
{extnums?.map((item) => (
<p
key={index}
className='num_item'
onClick={() => {
boxDialer.extnum = item;
......
......@@ -407,16 +407,16 @@ export class BoxDialer {
'this_callSession_connection: ',
this.callSession.connection,
);
// this.callSession.connection.addEventListener('addstream', (e) => {
// console.log('--== UA Conn Added STREAM: ', e);
// let strmTrack = e.stream.getAudioTracks();
// if (strmTrack[0]) {
// let rmMediaStream = new MediaStream([strmTrack[0]]);
// this.remoteAudio.srcObject = rmMediaStream;
// this.remoteAudio.play();
// }
// });
this.callSession.connection.addEventListener('addstream', (e) => {
console.log('--== UA Conn Added STREAM: ', e);
let strmTrack = e.stream.getAudioTracks();
if (strmTrack[0]) {
let rmMediaStream = new MediaStream([strmTrack[0]]);
this.remoteAudio.srcObject = rmMediaStream;
this.remoteAudio.play();
}
});
let func = (e) => {
let strmTrack = e.stream.getAudioTracks();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment