TP-89230 | append tags singleton (#14)

* TP-89230 | append tags singleton

* TP-88230 | fix: added console log

* Publish

 - @universal-call-sdk/adapter-ameyo@1.0.62
 - @universal-call-sdk/common@1.0.17
 - @universal-call-sdk/core@1.0.22

* TP-89230 | make append tag syncronous

* Publish

 - @universal-call-sdk/adapter-ameyo@1.0.63
 - @universal-call-sdk/common@1.0.18
 - @universal-call-sdk/core@1.0.23

* TP-89230 | make append tag syncronous

* Publish

 - @universal-call-sdk/adapter-ameyo@1.0.64
 - @universal-call-sdk/common@1.0.19
 - @universal-call-sdk/core@1.0.24

* TP-89230 | make append tag syncronous

* Publish

 - @universal-call-sdk/adapter-ameyo@1.0.65
 - @universal-call-sdk/common@1.0.20
 - @universal-call-sdk/core@1.0.25

* TP-89230 | on sip ready custom event

* Publish

 - @universal-call-sdk/adapter-ameyo@1.0.66
 - @universal-call-sdk/common@1.0.21
 - @universal-call-sdk/core@1.0.26

* TP-89230 | on sip ready custom event

* Publish

 - @universal-call-sdk/adapter-ameyo@1.0.67
 - @universal-call-sdk/common@1.0.22
 - @universal-call-sdk/core@1.0.27

* TP-89230 | on sip ready custom event

* Publish

 - @universal-call-sdk/adapter-ameyo@1.0.68
 - @universal-call-sdk/common@1.0.23
 - @universal-call-sdk/core@1.0.28

---------

Co-authored-by: varnit goyal <github.cicd@navi.com>
This commit is contained in:
Varnit Goyal
2024-11-28 15:35:58 +05:30
committed by GitHub
parent e546ce0fae
commit 480f7c4f61
9 changed files with 213 additions and 15 deletions

View File

@@ -8,6 +8,10 @@
npm install -g verdaccio
verdaccio
```
### update npmrc
```angular2html
npm set registry http://localhost:4873/ --location project
```
```cmd
yarn

View File

@@ -3,6 +3,62 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## 1.0.68 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/adapter-ameyo
## 1.0.67 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/adapter-ameyo
## 1.0.66 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/adapter-ameyo
## 1.0.65 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/adapter-ameyo
## 1.0.64 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/adapter-ameyo
## 1.0.63 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/adapter-ameyo
## 1.0.62 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/adapter-ameyo
## 1.0.61 (2024-11-27)
**Note:** Version bump only for package @universal-call-sdk/adapter-ameyo

View File

@@ -49,8 +49,9 @@ window.divVideo = { style: {}, setAttribute: noop };
window.divCallOptions = { style: {} };
window.uiVideoDisplayShowHid = {};
window.o_elt_video = { style: {} };
window.onload = function () {
window.addEventListener("onSipSetupReady", function () {
window.console && window.console.info && window.console.info('location=' + window.location);
// audioRemote = document.getElementById('audio_remote');
audioRemote = document.getElementById('audio_remote');
document.onkeyup = onKeyUp;
@@ -59,10 +60,12 @@ window.onload = function () {
//
// // set debug level
SIPml.setDebugLevel('info');
// Initialize call button
//uiBtnCallSetText('Call');
const getPVal = function (PName) {
const query = window.location.search.substring(1);
const vars = query.split('&');
for (let i = 0; i < vars.length; i++) {
@@ -75,6 +78,7 @@ window.onload = function () {
};
function preInit() {
// set default webrtc type (before initialization)
const s_webrtc_type = getPVal('wt');
const s_fps = getPVal('fps');
@@ -119,7 +123,7 @@ window.onload = function () {
}
}
}*/
};
});
function postInit() {
// check for WebRTC support
@@ -542,6 +546,9 @@ function closeKeyPad() {
}
function fullScreen(b_fs) {
if(typeof tsk_utils_have_webrtc4native !== 'function') {
return;
}
bFullScreen = b_fs;
if (tsk_utils_have_webrtc4native() && bFullScreen && videoRemote.webkitSupportsFullscreen) {
if (bFullScreen) {

View File

@@ -45,11 +45,13 @@ class AmeyoAdapter implements IAdapter {
constructor(options: AmeyoInitializationOptions) {
console.log('AmeyoAdapter constructor');
const script = document.createElement('script');
script.src = 'https://public-assets.np.navi-gi.in/jarvis/sip5ml.js'; // Assuming it's placed in the public folder
this._appendTags();
script.async = true;
document.body.appendChild(script);
if(document.readyState === 'loading') {
document.addEventListener('DOMContentLoaded', this._appendTags);
} else {
this._appendTags();
}
this.baseUrl = options.baseUrl;
this.eventListenerUrl = options.eventListenerUrl;
this.currentCallState = CALL_STATES.IDLE;
@@ -87,10 +89,10 @@ class AmeyoAdapter implements IAdapter {
}
_initializeSipStack = ({accountName, userName, domain, password}: SipAccountInfo) => {
_initializeSipStack = ({accountName, userName, domain="", password}: SipAccountInfo) => {
console.log('initializing sip stack');
const domainOnly = domain.split(':')[0];
const port = domain.split(':')[1];
const domainOnly = domain?.split?.(':')?.[0];
const port = domain?.split?.(':')?.[1];
//initialize sip stack
loadCredentials({accountName, userName, domain, password});
loadCallOptions();
@@ -260,7 +262,15 @@ class AmeyoAdapter implements IAdapter {
}
private _appendTags: () => void = () => {
const script = document.createElement('script');
script.src = 'https://public-assets.np.navi-gi.in/jarvis/sip5ml.js'; // Assuming it's placed in the public folder
script.async=true;
document.head.appendChild(script);
const is_already_appended = document.querySelector('#audio_remote') && document.querySelector('#video_local') && document.querySelector('#video_remote') && document.querySelector('#ringtone') && document.querySelector('#ringbacktone') && document.querySelector('#dtmfTone');
if (is_already_appended) {
console.log('tags already appended skipping')
return;
}
type ElementAttributes = {
id?: string;
className?: string;
@@ -347,6 +357,15 @@ class AmeyoAdapter implements IAdapter {
id: 'dtmfTone',
src: 'https://public-assets.np.navi-gi.in/jarvis/dtmf.wav',
});
const onSipSetupReadyEvent = new CustomEvent('onSipSetupReady', {
detail: { message: 'Custom page loaded event triggered' }
});
script.onload = ()=>{
window.dispatchEvent(onSipSetupReadyEvent)
}
};

View File

@@ -1,6 +1,6 @@
{
"name": "@universal-call-sdk/adapter-ameyo",
"version": "1.0.61",
"version": "1.0.68",
"type": "module",
"scripts": {
"dev": "vite",
@@ -9,7 +9,7 @@
"preview": "vite preview"
},
"dependencies": {
"@universal-call-sdk/common": "^1.0.16"
"@universal-call-sdk/common": "^1.0.23"
},
"devDependencies": {
"@eslint/js": "^9.11.1",

View File

@@ -3,6 +3,62 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## 1.0.23 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/common
## 1.0.22 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/common
## 1.0.21 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/common
## 1.0.20 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/common
## 1.0.19 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/common
## 1.0.18 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/common
## 1.0.17 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/common
## 1.0.16 (2024-11-27)
**Note:** Version bump only for package @universal-call-sdk/common

View File

@@ -1,6 +1,6 @@
{
"name": "@universal-call-sdk/common",
"version": "1.0.16",
"version": "1.0.23",
"type": "module",
"scripts": {
"dev": "vite",

View File

@@ -3,6 +3,62 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
## 1.0.28 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/core
## 1.0.27 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/core
## 1.0.26 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/core
## 1.0.25 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/core
## 1.0.24 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/core
## 1.0.23 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/core
## 1.0.22 (2024-11-28)
**Note:** Version bump only for package @universal-call-sdk/core
## 1.0.21 (2024-11-27)
**Note:** Version bump only for package @universal-call-sdk/core

View File

@@ -1,6 +1,6 @@
{
"name": "@universal-call-sdk/core",
"version": "1.0.21",
"version": "1.0.28",
"type": "module",
"scripts": {
"dev": "vite",