Skip to content

Commit

Permalink
fix(FEC-10161): add kava analytics url from server response (#355)
Browse files Browse the repository at this point in the history
Issue: kava reports to production env instead QA
Solution: server response had an analytics URL, by default from the platform it'll be taken from there.
  • Loading branch information
Yuvalke authored Sep 2, 2020
1 parent e192bc6 commit e4ce3f1
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"@playkit-js/playkit-js-ui": "0.58.1",
"hls.js": "^0.14.9",
"js-logger": "^1.6.0",
"playkit-js-providers": "https://github.com/kaltura/playkit-js-providers.git#v2.22.0",
"playkit-js-providers": "https://github.com/kaltura/playkit-js-providers.git#v2.22.1",
"proxy-polyfill": "^0.3.0",
"shaka-player": "^3.0.4"
},
Expand Down
3 changes: 2 additions & 1 deletion src/common/plugins/plugins-config-store.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ const defaultConfig: dataStoreType = {
ks: '{{ks}}',
uiConfId: '{{uiConfId}}',
referrer: '{{referrer}}',
encodedReferrer: '{{encodedReferrer}}'
encodedReferrer: '{{encodedReferrer}}',
serviceUrl: '{{analyticsServiceUrl}}'
},
comscore: {
playerVersion: '{{pVersion}}'
Expand Down
4 changes: 4 additions & 0 deletions src/common/plugins/plugins-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,10 @@ const getModel = (options: KPOptionsObject): Object => {
if (options.provider && options.provider.env) {
dataModel['serviceUrl'] = options.provider.env.serviceUrl;

const analyticsServiceUrl = Utils.Object.getPropertyPath(options, 'provider.env.analyticsServiceUrl');
if (analyticsServiceUrl) {
dataModel['analyticsServiceUrl'] = `${analyticsServiceUrl}/api_v3/index.php`;
}
if (dataModel['serviceUrl']) {
dataModel['embedBaseUrl'] = dataModel['serviceUrl'].replace('api_v3', '');
}
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7440,9 +7440,9 @@ pkginfo@0.x.x:
prompt "^1.0.0"
shelljs "^0.7.8"

"playkit-js-providers@https://github.com/kaltura/playkit-js-providers.git#v2.22.0":
version "2.22.0"
resolved "https://github.com/kaltura/playkit-js-providers.git#bf485afe2f71e8ddf6949ee70d94d2f1045527f5"
"playkit-js-providers@https://github.com/kaltura/playkit-js-providers.git#v2.22.1":
version "2.22.1"
resolved "https://github.com/kaltura/playkit-js-providers.git#d101e60d195056df5c8c54599d4baa458f29a4e9"
dependencies:
js-logger "^1.6.0"

Expand Down

0 comments on commit e4ce3f1

Please sign in to comment.