@gumlet/insights-js-core 1.1.1 → 1.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/bitbucket-pipelines.yml
CHANGED
|
@@ -31,5 +31,5 @@ pipelines:
|
|
|
31
31
|
- pip
|
|
32
32
|
script:
|
|
33
33
|
- pip install awscli
|
|
34
|
-
- aws s3 cp ./build/release/ s3://gumlet-cdn/insights/1.1.
|
|
35
|
-
- curl -X PURGE -H Fastly-Key:$FASTLY_API_TOKEN https://cdn.gumlytics.com/insights/1.1.
|
|
34
|
+
- aws s3 cp ./build/release/ s3://gumlet-cdn/insights/1.1.3/ --cache-control "public, s-maxage=31536000, max-age=172800" --region us-east-1 --recursive --acl public-read
|
|
35
|
+
- curl -X PURGE -H Fastly-Key:$FASTLY_API_TOKEN https://cdn.gumlytics.com/insights/1.1.3/gumlet-insights.min.js
|
package/js/core/Analytics.js
CHANGED
|
@@ -1245,10 +1245,13 @@ class Analytics {
|
|
|
1245
1245
|
sampleData[key] = overrideData[key]
|
|
1246
1246
|
})
|
|
1247
1247
|
if (typeof window !== "undefined" && typeof window.parent !== "undefined" && window.navigator){
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1248
|
+
try {
|
|
1249
|
+
window.navigator.getBattery().then(battery => {
|
|
1250
|
+
sampleData.battery_level_percentage = battery.level * 100;
|
|
1251
|
+
sampleData.battery_charging = battery.charging;
|
|
1252
|
+
})
|
|
1253
|
+
} catch (error) {
|
|
1254
|
+
}
|
|
1252
1255
|
}
|
|
1253
1256
|
|
|
1254
1257
|
return sampleData;
|
|
@@ -60,6 +60,8 @@ const analyticsWrapper = (config) => {
|
|
|
60
60
|
|
|
61
61
|
analyticsWrapper.Players = Players;
|
|
62
62
|
analyticsWrapper.CdnProviders = CdnProviders;
|
|
63
|
+
analyticsWrapper.gumletInsightsEvents = EVENTS;
|
|
64
|
+
analyticsWrapper.gumletSupportedPlayers = Players;
|
|
63
65
|
|
|
64
66
|
if (typeof window !== "undefined")
|
|
65
67
|
{
|