@gumlet/insights-js-core 1.1.4 → 1.1.6
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/build/release/gumlet-insights.min.js +2 -0
- package/build/release/gumlet-insights.min.js.LICENSE.txt +10 -0
- package/build/release/package.json +1 -0
- package/package.json +3 -2
- package/.github/workflows/main.yml +0 -87
- package/.gitlab-ci.yml +0 -54
- package/bitbucket-pipelines.yml +0 -35
- package/docs/payload-documentation.md +0 -72
- package/html/bitmovin.html +0 -82
- package/html/dashjs.html +0 -55
- package/html/hlsjs.html +0 -72
- package/html/html5.html +0 -59
- package/html/shaka.html +0 -102
- package/html/videojs.html +0 -67
- package/index.html +0 -73
- package/jest.config.js +0 -187
- package/js/adapters/Bitmovin7Adapter.js +0 -352
- package/js/adapters/BitmovinAdapter.js +0 -198
- package/js/adapters/DashjsAdapter.js +0 -140
- package/js/adapters/HTML5Adapter.js +0 -774
- package/js/adapters/HlsjsAdapter.js +0 -152
- package/js/adapters/ShakaAdapter.js +0 -81
- package/js/adapters/VideoJsAdapter.js +0 -455
- package/js/analyticsStateMachines/Bitmovin7AnalyticsStateMachine.js +0 -471
- package/js/analyticsStateMachines/BitmovinAnalyticsStateMachine.js +0 -299
- package/js/analyticsStateMachines/HTML5AnalyticsStateMachine.js +0 -443
- package/js/analyticsStateMachines/VideoJsAnalyticsStateMachine.js +0 -503
- package/js/cast/CastClient.js +0 -50
- package/js/cast/CastReceiver.js +0 -37
- package/js/core/AdapterFactory.js +0 -41
- package/js/core/Analytics.js +0 -1367
- package/js/core/AnalyticsStateMachineFactory.js +0 -36
- package/js/core/GumletInsightsExport.js +0 -81
- package/js/enums/CDNProviders.js +0 -11
- package/js/enums/Events.js +0 -32
- package/js/enums/GumletEnum.js +0 -19
- package/js/enums/MIMETypes.js +0 -30
- package/js/enums/Players.js +0 -11
- package/js/enums/StreamTypes.js +0 -15
- package/js/utils/EventsCall.js +0 -22
- package/js/utils/HttpCall.js +0 -57
- package/js/utils/LicenseCall.js +0 -18
- package/js/utils/Logger.js +0 -40
- package/js/utils/PlayerDetector.js +0 -75
- package/js/utils/PlayerInitCall.js +0 -22
- package/js/utils/SessionCreationCall.js +0 -22
- package/js/utils/Settings.js +0 -3
- package/js/utils/Utils.js +0 -195
- package/precommit.bash +0 -8
- package/tests/stage1.test.js +0 -50
- package/webpack.config.debug.js +0 -34
- package/webpack.config.js +0 -40
- package/webpack.config.release.js +0 -62
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
# Analytics Payload Documentation
|
|
2
|
-
|
|
3
|
-
Bitmovin Analytics collects information about playback behavior in samples. Each sample has a `timestamp` as well as a `duration` and thus represents a chunk of time that passed on the client in which the player was in a distinct state.
|
|
4
|
-
|
|
5
|
-
To illustrate here is the beginning of a typical session while the player is going through the different states. Each line represents one JSON payload that gets sent back to the client.
|
|
6
|
-
|
|
7
|
-
```
|
|
8
|
-
player startup: +----+
|
|
9
|
-
video startup: +-+
|
|
10
|
-
video playback @500kbps: +--------+
|
|
11
|
-
video playback @1mbps: +---------+
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
If we look at the first sample the json payload would contain the following information:
|
|
15
|
-
|
|
16
|
-
```
|
|
17
|
-
time: <client timestamp>
|
|
18
|
-
state: 'startup'
|
|
19
|
-
duration: 300ms
|
|
20
|
-
playerStartupTime: 300ms
|
|
21
|
-
videoStartupTime: 0ms
|
|
22
|
-
videoBitrate: 0
|
|
23
|
-
```
|
|
24
|
-
|
|
25
|
-
The second sample that represents the video startup would therefore look like this:
|
|
26
|
-
|
|
27
|
-
```
|
|
28
|
-
time: <client timestamp>
|
|
29
|
-
state: 'video startup'
|
|
30
|
-
duration: 60ms
|
|
31
|
-
playerStartupTime: 0
|
|
32
|
-
videoStartupTime: 60ms
|
|
33
|
-
videoBitrate: 0
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
and the third that represents the initial playout at 500 kbps over 1 second:
|
|
37
|
-
|
|
38
|
-
```
|
|
39
|
-
time: <client timestamp>
|
|
40
|
-
state: 'playing'
|
|
41
|
-
duration: 1000ms
|
|
42
|
-
playerStartupTime: 0
|
|
43
|
-
videoStartupTime: 0
|
|
44
|
-
videoBitrate: 500000
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
as well as the last sample that gets sent after the quality switch up:
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
time: <client timestamp>
|
|
51
|
-
state: 'playing'
|
|
52
|
-
duration: 1000ms
|
|
53
|
-
playerStartupTime: 0
|
|
54
|
-
videoStartupTime: 0
|
|
55
|
-
videoBitrate: 1000000
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
As you can see a lot of fields with `0` are being sent subsequently. The JSON payload always has the same fields, but depending on the state the player is in they are either set or not. There are some fields that are always set, notably the custom data fields like `videoId`, `cdnProvider`, `customData1-5` as well as fields that don't represent a distinct state change but rather information about the state of the player during the current sample, regardless of it's state like `streamFormat` (which stream technology was used, DASH/HLS or Progressive) or the `playerTech` (either native, html5 or flash).
|
|
59
|
-
|
|
60
|
-
A full list of the JSON payload fields and their description can be found here:
|
|
61
|
-
|
|
62
|
-
[Payload Field Documentation](https://docs.google.com/spreadsheets/d/1sSFGtKfOS-efQFDB6FFbNPYFXUnauHBqhyP5AFt4ZJA/edit?usp=sharing)
|
|
63
|
-
|
|
64
|
-
All these fields need to be supplied with the right datatype for the ingest to accept them.
|
|
65
|
-
|
|
66
|
-
## Custom Integrations
|
|
67
|
-
|
|
68
|
-
When developing a custom integration we strongly recommend you follow roughly the same model as the web collector. The code is open source and can be viewed on GitHub: [bitmovin-analytics-collector](https://github.com/bitmovin/bitmovin-analytics-collector)
|
|
69
|
-
|
|
70
|
-
The web collector follows the following approach:
|
|
71
|
-
|
|
72
|
-
A core class that maintains the current analytics sample that will be sent to the server once an event happens. This sample contains all the background non-event based information about the state we discussed earlier (streamFormat, videoId etc..). A state machine keeps is hooked up to the player events and whenever the state machine transitions to a new state the current analytics sample is being sent off to the server along with the relevant information from the state transition.
|
package/html/bitmovin.html
DELETED
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
|
|
6
|
-
<link rel="icon" href="https://ox4zindgwb3p1qdp2lznn7zb-wpengine.netdna-ssl.com/wp-content/uploads/2016/02/cropped-icon-32x32.png" sizes="32x32" />
|
|
7
|
-
<link rel="icon" href="https://ox4zindgwb3p1qdp2lznn7zb-wpengine.netdna-ssl.com/wp-content/uploads/2016/02/cropped-icon-192x192.png" sizes="192x192" />
|
|
8
|
-
<link rel="apple-touch-icon-precomposed" href="https://ox4zindgwb3p1qdp2lznn7zb-wpengine.netdna-ssl.com/wp-content/uploads/2016/02/cropped-icon-180x180.png" />
|
|
9
|
-
<meta name="msapplication-TileImage" content="https://bitmovin.com/wp-content/uploads/2016/02/cropped-icon-270x270.png" />
|
|
10
|
-
|
|
11
|
-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous" />
|
|
12
|
-
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous">
|
|
13
|
-
</script>
|
|
14
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous">
|
|
15
|
-
</script>
|
|
16
|
-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous">
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<title>Bitdash Analytics</title>
|
|
20
|
-
|
|
21
|
-
<!-- <script type="text/javascript" src="//bitmovin-a.akamaihd.net/bitmovin-player/stable/7.5/bitmovinplayer.js"></script> -->
|
|
22
|
-
<script type="text/javascript" src="//bitmovin-a.akamaihd.net/bitmovin-player/stable/8/bitmovinplayer.js"></script>
|
|
23
|
-
<script type="text/javascript" src="/build/debug/gumlet-insights.min.js"></script>
|
|
24
|
-
</head>
|
|
25
|
-
<body>
|
|
26
|
-
<div id="player" style="width: 400px"></div>
|
|
27
|
-
<a href="bitmovin.html">Click</a>
|
|
28
|
-
<a href="#" id="click">Click</a>
|
|
29
|
-
<script type="text/javascript">
|
|
30
|
-
|
|
31
|
-
/* global bitmovin */
|
|
32
|
-
|
|
33
|
-
var config = {
|
|
34
|
-
// Your bitmovin analytics key
|
|
35
|
-
// TODO: remove the key after testing
|
|
36
|
-
key: 'e73a3577-d91c-4214-9e6d-938fb936818a',
|
|
37
|
-
property_id: '6Xlq31eG',
|
|
38
|
-
// Your player key (bitmovin, jw, ..) (optional)
|
|
39
|
-
playerKey: 'a6e31908-550a-4f75-b4bc-a9d89880a733',
|
|
40
|
-
player: gumlet.insights.Players.BITMOVIN,
|
|
41
|
-
cdnProvider: gumlet.insights.CdnProviders.AKAMAI,
|
|
42
|
-
debug: true,
|
|
43
|
-
customData1: 'customData1',
|
|
44
|
-
customData2: 'customData2',
|
|
45
|
-
experimentName: 'bitmovinanalytics-local',
|
|
46
|
-
videoId: 'Sintel',
|
|
47
|
-
userId: 'customer#1'
|
|
48
|
-
};
|
|
49
|
-
var analytics = gumlet.insights(config);
|
|
50
|
-
|
|
51
|
-
var conf = {
|
|
52
|
-
key: 'a6e31908-550a-4f75-b4bc-a9d89880a733',
|
|
53
|
-
playback: {
|
|
54
|
-
autoplay: true
|
|
55
|
-
},
|
|
56
|
-
source: {
|
|
57
|
-
dash: 'http://bitdash-a.akamaihd.net/content/sintel/sintel.mpd',
|
|
58
|
-
hls: 'https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8',
|
|
59
|
-
progressive: [{
|
|
60
|
-
url: 'https://bitdash-a.akamaihd.net/content/MI201109210084_1/MI201109210084_mpeg-4_hd_high_1080p25_10mbits.mp4',
|
|
61
|
-
type: 'video/mp4'
|
|
62
|
-
}]
|
|
63
|
-
}
|
|
64
|
-
};
|
|
65
|
-
var player = bitmovin.player('player');
|
|
66
|
-
player.setup(conf);
|
|
67
|
-
|
|
68
|
-
analytics.register(player);
|
|
69
|
-
|
|
70
|
-
document.getElementById('click').onclick = function () {
|
|
71
|
-
analytics.setCustomDataOnce({ customData1: 'after-click' });
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
// window.setTimeout(function () {
|
|
75
|
-
// player.load({
|
|
76
|
-
// hls: "https://bitdash-a.akamaihd.net/content/sintel/hls/playlist.m3u8",
|
|
77
|
-
// });
|
|
78
|
-
// }, 5000)
|
|
79
|
-
|
|
80
|
-
</script>
|
|
81
|
-
</body>
|
|
82
|
-
</html>
|
package/html/dashjs.html
DELETED
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
|
|
6
|
-
<link rel="icon" href="https://assets.gumlet.io/assets/round-logo.png?w=32" sizes="32x32" />
|
|
7
|
-
<link rel="icon" href="https://assets.gumlet.io/assets/round-logo.png?w=192" sizes="192x192" />
|
|
8
|
-
<link rel="apple-touch-icon-precomposed" href="https://assets.gumlet.io/assets/round-logo.png?w=180" />
|
|
9
|
-
<meta name="msapplication-TileImage" content="https://assets.gumlet.io/assets/round-logo.png?w=270" />
|
|
10
|
-
|
|
11
|
-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous" />
|
|
12
|
-
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous">
|
|
13
|
-
</script>
|
|
14
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous">
|
|
15
|
-
</script>
|
|
16
|
-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous">
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<title>DashJS Player Insights</title>
|
|
20
|
-
|
|
21
|
-
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/dashjs/2.6.6/dash.all.debug.js"></script> -->
|
|
22
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/dashjs/4.1.0/dash.all.debug.min.js"></script>
|
|
23
|
-
|
|
24
|
-
<script type="text/javascript" src="/build/debug/gumlet-insights.min.js"></script>
|
|
25
|
-
|
|
26
|
-
</head>
|
|
27
|
-
<body>
|
|
28
|
-
<div id="player" style="width: 400px"></div>
|
|
29
|
-
|
|
30
|
-
<video id="my-video" preload="none" width="640" height="264" controls></video>
|
|
31
|
-
|
|
32
|
-
<p><a href="/html/dashjs.html">Click</a></p>
|
|
33
|
-
|
|
34
|
-
<script type="text/javascript">
|
|
35
|
-
|
|
36
|
-
var config = {
|
|
37
|
-
property_id: 'BNVzRZKD',
|
|
38
|
-
customData1: 'some custom data',
|
|
39
|
-
customData2: 'customData2',
|
|
40
|
-
videoId: 'Sintel',
|
|
41
|
-
userId: 'customer#1'
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
var analytics = gumlet.insights(config);
|
|
45
|
-
var url = "https://video.gumlet.io/5f462c1561cf8a766464ffc4/61dd877c6ec832ab2aaa1837/7.mpd";
|
|
46
|
-
var player = dashjs.MediaPlayer().create();
|
|
47
|
-
|
|
48
|
-
analytics.registerDashJSPlayer(player);
|
|
49
|
-
|
|
50
|
-
player.initialize(document.querySelector("#my-video"), url, true);
|
|
51
|
-
|
|
52
|
-
</script>
|
|
53
|
-
|
|
54
|
-
</body>
|
|
55
|
-
</html>
|
package/html/hlsjs.html
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
|
|
6
|
-
<link rel="icon" href="https://assets.gumlet.io/assets/round-logo.png?w=32" sizes="32x32" />
|
|
7
|
-
<link rel="icon" href="https://assets.gumlet.io/assets/round-logo.png?w=192" sizes="192x192" />
|
|
8
|
-
<link rel="apple-touch-icon-precomposed" href="https://assets.gumlet.io/assets/round-logo.png?w=180" />
|
|
9
|
-
<meta name="msapplication-TileImage" content="https://assets.gumlet.io/assets/round-logo.png?w=270" />
|
|
10
|
-
|
|
11
|
-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous" />
|
|
12
|
-
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous">
|
|
13
|
-
</script>
|
|
14
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous">
|
|
15
|
-
</script>
|
|
16
|
-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous">
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<title>HlsJS Player Insights</title>
|
|
20
|
-
|
|
21
|
-
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/hls.js/0.7.11/hls.min.js"></script> -->
|
|
22
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/hls.js/1.1.1/hls.min.js"></script>
|
|
23
|
-
<script type="text/javascript" src="/build/debug/gumlet-insights.min.js"></script>
|
|
24
|
-
|
|
25
|
-
</head>
|
|
26
|
-
<body>
|
|
27
|
-
<div id="player" style="width: 400px"></div>
|
|
28
|
-
|
|
29
|
-
<video id="my-video" preload="true" autoplay width="640" height="264" controls></video>
|
|
30
|
-
|
|
31
|
-
<p><a href="/html/hlsjs.html">Click</a></p>
|
|
32
|
-
|
|
33
|
-
<script type="text/javascript">
|
|
34
|
-
|
|
35
|
-
var config = {
|
|
36
|
-
property_id: 'BNVzRZKD',
|
|
37
|
-
debug: true,
|
|
38
|
-
customData1: 'customData1',
|
|
39
|
-
customData2: 'customData2',
|
|
40
|
-
videoId: 'Sintel',
|
|
41
|
-
userId: 'customer#1'
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
var analytics = gumlet.insights(config);
|
|
45
|
-
|
|
46
|
-
if(Hls.isSupported()) {
|
|
47
|
-
|
|
48
|
-
var video = document.getElementById('my-video');
|
|
49
|
-
var time = new Date().getTime();
|
|
50
|
-
var hls = new Hls({
|
|
51
|
-
// disable preload
|
|
52
|
-
autoStartLoad: true
|
|
53
|
-
});
|
|
54
|
-
|
|
55
|
-
analytics.registerHLSJSPlayer(hls, {starttime: time});
|
|
56
|
-
|
|
57
|
-
hls.attachMedia(video);
|
|
58
|
-
hls.loadSource('https://video.gumlet.io/5f462c1561cf8a766464ffc4/61b8ac77b7e0439691e7c2af/1.m3u8');
|
|
59
|
-
|
|
60
|
-
video.addEventListener('play', function() {
|
|
61
|
-
// needed for when preload disabled
|
|
62
|
-
hls.startLoad();
|
|
63
|
-
});
|
|
64
|
-
|
|
65
|
-
} else {
|
|
66
|
-
window.alert('Hls.js can not run in this browser');
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
</script>
|
|
70
|
-
|
|
71
|
-
</body>
|
|
72
|
-
</html>
|
package/html/html5.html
DELETED
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
|
|
6
|
-
<link rel="icon" href="https://assets.gumlet.io/assets/round-logo.png?w=32" sizes="32x32" />
|
|
7
|
-
<link rel="icon" href="https://assets.gumlet.io/assets/round-logo.png?w=192" sizes="192x192" />
|
|
8
|
-
<link rel="apple-touch-icon-precomposed" href="https://assets.gumlet.io/assets/round-logo.png?w=180" />
|
|
9
|
-
<meta name="msapplication-TileImage" content="https://assets.gumlet.io/assets/round-logo.png?w=270" />
|
|
10
|
-
|
|
11
|
-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous" />
|
|
12
|
-
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous">
|
|
13
|
-
</script>
|
|
14
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous">
|
|
15
|
-
</script>
|
|
16
|
-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous">
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<title>HTML5 Player Insights</title>
|
|
20
|
-
|
|
21
|
-
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/dashjs/2.6.6/dash.all.debug.js"></script> -->
|
|
22
|
-
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/dashjs/4.1.0/dash.all.debug.min.js"></script> -->
|
|
23
|
-
|
|
24
|
-
<script type="text/javascript" src="/build/debug/gumlet-insights.min.js"></script>
|
|
25
|
-
|
|
26
|
-
</head>
|
|
27
|
-
<body>
|
|
28
|
-
<div id="player" style="width: 400px">
|
|
29
|
-
|
|
30
|
-
<video id="my-video" preload="none" autoplay controls style="width:100%;">
|
|
31
|
-
<source src="https://gumlet.sgp1.digitaloceanspaces.com/video/sample_1.mp4" type="video/mp4">
|
|
32
|
-
</video>
|
|
33
|
-
</div>
|
|
34
|
-
|
|
35
|
-
<p><a href="dashjs.html">Click</a></p>
|
|
36
|
-
|
|
37
|
-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.15.0/videojs-contrib-hls.min.js"></script>
|
|
38
|
-
|
|
39
|
-
<script type="text/javascript">
|
|
40
|
-
|
|
41
|
-
var config = {
|
|
42
|
-
property_id: 'BNVzRZKD',
|
|
43
|
-
customData1: 'some custom data',
|
|
44
|
-
customData2: 'customData2',
|
|
45
|
-
experimentName: 'bitmovinanalytics-local',
|
|
46
|
-
videoId: 'Sintel',
|
|
47
|
-
userId: 'customer#1'
|
|
48
|
-
};
|
|
49
|
-
|
|
50
|
-
var analytics = gumlet.insights(config);
|
|
51
|
-
|
|
52
|
-
var video = document.getElementById('my-video');
|
|
53
|
-
|
|
54
|
-
analytics.registerHTML5Player(video);
|
|
55
|
-
|
|
56
|
-
</script>
|
|
57
|
-
|
|
58
|
-
</body>
|
|
59
|
-
</html>
|
package/html/shaka.html
DELETED
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
|
|
6
|
-
<link rel="icon" href="https://assets.gumlet.io/assets/round-logo.png?w=32" sizes="32x32" />
|
|
7
|
-
<link rel="icon" href="https://assets.gumlet.io/assets/round-logo.png?w=192" sizes="192x192" />
|
|
8
|
-
<link rel="apple-touch-icon-precomposed" href="https://assets.gumlet.io/assets/round-logo.png?w=180" />
|
|
9
|
-
<meta name="msapplication-TileImage" content="https://assets.gumlet.io/assets/round-logo.png?w=270" />
|
|
10
|
-
|
|
11
|
-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous" />
|
|
12
|
-
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous">
|
|
13
|
-
</script>
|
|
14
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous">
|
|
15
|
-
</script>
|
|
16
|
-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous">
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<title>Shaka Player Insights</title>
|
|
20
|
-
|
|
21
|
-
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/shaka-player/2.3.0/shaka-player.compiled.js"></script> -->
|
|
22
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/shaka-player/3.3.1/shaka-player.compiled.js"></script>
|
|
23
|
-
<script type="text/javascript" src="/build/debug/gumlet-insights.min.js"></script>
|
|
24
|
-
|
|
25
|
-
</head>
|
|
26
|
-
<body>
|
|
27
|
-
<div id="player" style="width: 400px">
|
|
28
|
-
|
|
29
|
-
<video id="my-video" preload="none" width="640" height="264" controls muted></video>
|
|
30
|
-
|
|
31
|
-
<p><a href="shaka.html">Click</a></p>
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
<script type="text/javascript">
|
|
35
|
-
|
|
36
|
-
var config = {
|
|
37
|
-
property_id: 'BNVzRZKD',
|
|
38
|
-
customData1: "",
|
|
39
|
-
customData2: 'customData2',
|
|
40
|
-
videoId: 'ShakaTestAngelOne',
|
|
41
|
-
userId: 'customer#1'
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
var analytics = gumlet.insights(config);
|
|
45
|
-
|
|
46
|
-
let manifestUri = 'https://video.gumlet.io/5f462c1561cf8a766464ffc4/61dd877c6ec832ab2aaa1837/7.mpd'
|
|
47
|
-
|
|
48
|
-
function initApp() {
|
|
49
|
-
// Install built-in polyfills to patch browser incompatibilities.
|
|
50
|
-
shaka.polyfill.installAll();
|
|
51
|
-
|
|
52
|
-
// Check to see if the browser supports the basic APIs Shaka needs.
|
|
53
|
-
if (shaka.Player.isBrowserSupported()) {
|
|
54
|
-
// Everything looks good!
|
|
55
|
-
initPlayer();
|
|
56
|
-
} else {
|
|
57
|
-
// This browser does not have the minimum set of APIs we need.
|
|
58
|
-
console.error('Browser not supported!');
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
function initPlayer() {
|
|
63
|
-
|
|
64
|
-
var startTime = new Date().getTime();
|
|
65
|
-
|
|
66
|
-
// Create a Player instance.
|
|
67
|
-
var video = document.getElementById('my-video');
|
|
68
|
-
var player = new shaka.Player(video);
|
|
69
|
-
|
|
70
|
-
analytics.registerShakaPlayer(player, {starttime: startTime, mediaElement: video});
|
|
71
|
-
|
|
72
|
-
// Attach player to the window to make it easy to access in the JS console.
|
|
73
|
-
window.player = player;
|
|
74
|
-
|
|
75
|
-
// Listen for error events.
|
|
76
|
-
player.addEventListener('error', onErrorEvent);
|
|
77
|
-
|
|
78
|
-
// Try to load a manifest.
|
|
79
|
-
// This is an asynchronous process.
|
|
80
|
-
player.load(manifestUri).then(function() {
|
|
81
|
-
// This runs if the asynchronous load is successful.
|
|
82
|
-
console.log('The video has now been loaded!');
|
|
83
|
-
// onError is executed if the asynchronous load fails.
|
|
84
|
-
}).catch(onError);
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
function onErrorEvent(event) {
|
|
88
|
-
// Extract the shaka.util.Error object from the event.
|
|
89
|
-
onError(event.detail);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
function onError(error) {
|
|
93
|
-
// Log the error.
|
|
94
|
-
console.error('Error code', error.code, 'object', error);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
document.addEventListener('DOMContentLoaded', initApp);
|
|
98
|
-
|
|
99
|
-
</script>
|
|
100
|
-
|
|
101
|
-
</body>
|
|
102
|
-
</html>
|
package/html/videojs.html
DELETED
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
|
|
6
|
-
<link rel="icon" href="https://assets.gumlet.io/assets/round-logo.png?w=32" sizes="32x32" />
|
|
7
|
-
<link rel="icon" href="https://assets.gumlet.io/assets/round-logo.png?w=192" sizes="192x192" />
|
|
8
|
-
<link rel="apple-touch-icon-precomposed" href="https://assets.gumlet.io/assets/round-logo.png?w=180" />
|
|
9
|
-
<meta name="msapplication-TileImage" content="https://assets.gumlet.io/assets/round-logo.png?w=270" />
|
|
10
|
-
|
|
11
|
-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous" />
|
|
12
|
-
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous">
|
|
13
|
-
</script>
|
|
14
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous">
|
|
15
|
-
</script>
|
|
16
|
-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous">
|
|
17
|
-
</script>
|
|
18
|
-
|
|
19
|
-
<title>VideoJS Player Insights</title>
|
|
20
|
-
|
|
21
|
-
<link href="http://vjs.zencdn.net/5.15.1/video-js.css" rel="stylesheet" />
|
|
22
|
-
|
|
23
|
-
<script type="text/javascript" src="/build/debug/gumlet-insights.min.js"></script>
|
|
24
|
-
</head>
|
|
25
|
-
<body>
|
|
26
|
-
<div id="player" style="width: 400px"></div>
|
|
27
|
-
<script src="http://vjs.zencdn.net/5.15.1/video.js"></script>
|
|
28
|
-
<!-- <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.7.0/videojs-contrib-hls.min.js"></script> -->
|
|
29
|
-
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/videojs-contrib-hls/5.15.0/videojs-contrib-hls.min.js"></script>
|
|
30
|
-
|
|
31
|
-
<video id="my-video" class="video-js" controls preload="false" autoplay width="640" height="264">
|
|
32
|
-
<source src="https://video.gumlet.io/5f462c1561cf8a766464ffc4/61b8ac77b7e0439691e7c2af/1.m3u8" type="application/x-mpegURL" />
|
|
33
|
-
<p class="vjs-no-js">
|
|
34
|
-
To view this video please enable JavaScript, and consider upgrading to a web browser that
|
|
35
|
-
<a href="http://videojs.com/html5-video-support/" target="_blank">supports HTML5 video</a>
|
|
36
|
-
</p>
|
|
37
|
-
</video>
|
|
38
|
-
<script type="text/javascript">
|
|
39
|
-
|
|
40
|
-
/* global bitmovin videojs */
|
|
41
|
-
|
|
42
|
-
var config = {
|
|
43
|
-
// Your bitmovin analytics key
|
|
44
|
-
// TODO: remove the key after testing
|
|
45
|
-
key: 'e73a3577-d91c-4214-9e6d-938fb936818a',
|
|
46
|
-
property_id: 'BNVzRZKD',
|
|
47
|
-
player: gumlet.insights.Players.VIDEOJS,
|
|
48
|
-
cdnProvider: gumlet.insights.CdnProviders.AKAMAI,
|
|
49
|
-
experimentName: 'bitmovinanalytics-local',
|
|
50
|
-
videoId: 'Sintel',
|
|
51
|
-
userId: 'customer#1',
|
|
52
|
-
debug: true
|
|
53
|
-
};
|
|
54
|
-
var analytics = gumlet.insights(config);
|
|
55
|
-
|
|
56
|
-
var options = {
|
|
57
|
-
preload: false
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
var player = videojs('my-video', options);
|
|
61
|
-
analytics.registerVideoJSPlayer(player);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
</script>
|
|
65
|
-
<a href="videojs.html">Click</a>
|
|
66
|
-
</body>
|
|
67
|
-
</html>
|
package/index.html
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8" />
|
|
5
|
-
<link rel="icon" href="https://assets.gumlet.io/assets/round-logo.png?w=32" sizes="32x32" />
|
|
6
|
-
<link rel="icon" href="https://assets.gumlet.io/assets/round-logo.png?w=192" sizes="192x192" />
|
|
7
|
-
<link rel="apple-touch-icon-precomposed" href="https://assets.gumlet.io/assets/round-logo.png?w=180" />
|
|
8
|
-
<meta name="msapplication-TileImage" content="https://assets.gumlet.io/assets/round-logo.png?w=270" />
|
|
9
|
-
|
|
10
|
-
<title>
|
|
11
|
-
Gumlet Insights SDK
|
|
12
|
-
</title>
|
|
13
|
-
|
|
14
|
-
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous" />
|
|
15
|
-
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous">
|
|
16
|
-
</script>
|
|
17
|
-
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous">
|
|
18
|
-
</script>
|
|
19
|
-
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous">
|
|
20
|
-
</script>
|
|
21
|
-
</head>
|
|
22
|
-
<body>
|
|
23
|
-
<div style="width: 600px; margin: 0 auto;">
|
|
24
|
-
<p></p>
|
|
25
|
-
<h1>
|
|
26
|
-
<a href="https://gumlet.com/">
|
|
27
|
-
<img src="https://assets.gumlet.io/assets/logo.svg?w=200&dpr=2.0" style="width:200px;">
|
|
28
|
-
</a>
|
|
29
|
-
Insights SDK
|
|
30
|
-
</h1>
|
|
31
|
-
<p>
|
|
32
|
-
|
|
33
|
-
<a href="https://github.com/gumlet/insights-js-core">
|
|
34
|
-
https://github.com/gumlet/insights-js-core
|
|
35
|
-
</a>
|
|
36
|
-
</p>
|
|
37
|
-
<p>
|
|
38
|
-
<h2>
|
|
39
|
-
Integration demos:
|
|
40
|
-
</h2>
|
|
41
|
-
</p>
|
|
42
|
-
<p>
|
|
43
|
-
<ul>
|
|
44
|
-
<li>
|
|
45
|
-
<a href="html/hlsjs.html">
|
|
46
|
-
Hls.js
|
|
47
|
-
</a>
|
|
48
|
-
</li>
|
|
49
|
-
<li>
|
|
50
|
-
<a href="html/videojs.html">
|
|
51
|
-
Videojs
|
|
52
|
-
</a>
|
|
53
|
-
</li>
|
|
54
|
-
<li>
|
|
55
|
-
<a href="html/shaka.html">
|
|
56
|
-
Shaka
|
|
57
|
-
</a>
|
|
58
|
-
</li>
|
|
59
|
-
<li>
|
|
60
|
-
<a href="html/dashjs.html">
|
|
61
|
-
Dash.js
|
|
62
|
-
</a>
|
|
63
|
-
</li>
|
|
64
|
-
<li>
|
|
65
|
-
<a href="html/html5.html">
|
|
66
|
-
HLML5
|
|
67
|
-
</a>
|
|
68
|
-
</li>
|
|
69
|
-
</ul>
|
|
70
|
-
</p>
|
|
71
|
-
</div>
|
|
72
|
-
</body>
|
|
73
|
-
</html>
|