Commit 60d60fe1 authored by Muhammadali's avatar Muhammadali

update-

parent 4069bf88
...@@ -164,53 +164,14 @@ const ModalPhoneNumpad = ({ ...@@ -164,53 +164,14 @@ const ModalPhoneNumpad = ({
}, },
[gameState.toggleCP], [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 () => { useEffect(() => {
// document.removeEventListener('keydown', handleKeyUp); document.addEventListener('keyup', handleKeyUp);
// };
// }, [handleKeyUp]);
// document.addEventListener('keydown', (e) => { return () => {
// console.log('key down all (' + e.repeat + ')'); document.removeEventListener('keyup', handleKeyUp);
// }); };
// useEffect(()=>) }, [handleKeyUp]);
// `${Data.getHours()}:${Data.getMinutes()} ${Data.getDate()}.${Data.getMonth()+1}.${Data.getFullYear()}` // `${Data.getHours()}:${Data.getMinutes()} ${Data.getDate()}.${Data.getMonth()+1}.${Data.getFullYear()}`
const callButton = () => { const callButton = () => {
// inset if ---------- // inset if ----------
...@@ -280,8 +241,7 @@ const ModalPhoneNumpad = ({ ...@@ -280,8 +241,7 @@ const ModalPhoneNumpad = ({
onMouseUp={() => boxDialer.stop()} onMouseUp={() => boxDialer.stop()}
onMouseOut={() => boxDialer.stop()} onMouseOut={() => boxDialer.stop()}
className='nocopy' className='nocopy'
id={`numpad_${mapItem.id}`} key={mapItem.id}
key={`numpad_${mapItem.id}`}
onClick={() => { onClick={() => {
mapItem.type === 'number' && mapItem.type === 'number' &&
inputController({ inputController({
...@@ -317,9 +277,8 @@ const ModalPhoneNumpad = ({ ...@@ -317,9 +277,8 @@ const ModalPhoneNumpad = ({
</NumberButton.CallButton> </NumberButton.CallButton>
<NumberButton.CallButtonModal visiblevalue={exNum}> <NumberButton.CallButtonModal visiblevalue={exNum}>
<NumberButton.CallButtonModalInset> <NumberButton.CallButtonModalInset>
{extnums?.map((item, index) => ( {extnums?.map((item) => (
<p <p
key={index}
className='num_item' className='num_item'
onClick={() => { onClick={() => {
boxDialer.extnum = item; boxDialer.extnum = item;
......
...@@ -407,16 +407,16 @@ export class BoxDialer { ...@@ -407,16 +407,16 @@ export class BoxDialer {
'this_callSession_connection: ', 'this_callSession_connection: ',
this.callSession.connection, this.callSession.connection,
); );
// this.callSession.connection.addEventListener('addstream', (e) => { this.callSession.connection.addEventListener('addstream', (e) => {
// console.log('--== UA Conn Added STREAM: ', e); console.log('--== UA Conn Added STREAM: ', e);
// let strmTrack = e.stream.getAudioTracks(); let strmTrack = e.stream.getAudioTracks();
// if (strmTrack[0]) { if (strmTrack[0]) {
// let rmMediaStream = new MediaStream([strmTrack[0]]); let rmMediaStream = new MediaStream([strmTrack[0]]);
// this.remoteAudio.srcObject = rmMediaStream; this.remoteAudio.srcObject = rmMediaStream;
// this.remoteAudio.play(); this.remoteAudio.play();
// } }
// }); });
let func = (e) => { let func = (e) => {
let strmTrack = e.stream.getAudioTracks(); 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