mparticle-roku-sdk 2.1.16
Sign up to get free protection for your applications and to get access to all the features.
- package/.github/workflows/build.yml +26 -0
- package/.gitmodules +3 -0
- package/LICENSE +191 -0
- package/README.md +24 -0
- package/example-legacy-sdk/images/MainMenu_Icon_Center_HD.png +0 -0
- package/example-legacy-sdk/images/MainMenu_Icon_Center_SD43.png +0 -0
- package/example-legacy-sdk/images/MainMenu_Icon_Side_HD.png +0 -0
- package/example-legacy-sdk/images/MainMenu_Icon_Side_SD43.png +0 -0
- package/example-legacy-sdk/images/splash_fhd.jpg +0 -0
- package/example-legacy-sdk/images/splash_hd.jpg +0 -0
- package/example-legacy-sdk/images/splash_sd.jpg +0 -0
- package/example-legacy-sdk/manifest +26 -0
- package/example-legacy-sdk/source/main.brs +45 -0
- package/example-scenegraph-sdk/LICENSE +1 -0
- package/example-scenegraph-sdk/README.md +2 -0
- package/example-scenegraph-sdk/source/Makefile +6 -0
- package/example-scenegraph-sdk/source/app.mk +675 -0
- package/example-scenegraph-sdk/source/components/helloworld.brs +300 -0
- package/example-scenegraph-sdk/source/components/helloworld.xml +66 -0
- package/example-scenegraph-sdk/source/images/channel-poster_fhd.png +0 -0
- package/example-scenegraph-sdk/source/images/channel-poster_hd.png +0 -0
- package/example-scenegraph-sdk/source/images/channel-poster_sd.png +0 -0
- package/example-scenegraph-sdk/source/images/splash-screen_fhd.jpg +0 -0
- package/example-scenegraph-sdk/source/images/splash-screen_hd.jpg +0 -0
- package/example-scenegraph-sdk/source/images/splash-screen_sd.jpg +0 -0
- package/example-scenegraph-sdk/source/manifest +12 -0
- package/example-scenegraph-sdk/source/source/Main.brs +46 -0
- package/example-scenegraph-sdk/source/testFramework/UnitTestFramework.brs +2867 -0
- package/example-scenegraph-sdk/source/tests/TestBasics.brs +266 -0
- package/mParticleBundle.crt +68 -0
- package/mParticleCore.brs +2301 -0
- package/mParticleTask.brs +78 -0
- package/mParticleTask.xml +12 -0
- package/package.json +5 -0
- package/testing/tests/Test__mParticle.brs +88 -0
@@ -0,0 +1,266 @@
|
|
1
|
+
' @BeforeAll
|
2
|
+
sub MainTestSuite__SetUp()
|
3
|
+
' Target testing object. To avoid the object creation in each test
|
4
|
+
' we create instance of target object here and use it in tests as m.targetTestObject.
|
5
|
+
m.mParticleTask = createObject("roSGNode", "mParticleTask")
|
6
|
+
m.mp = mParticleSGBridge(m.mParticleTask)
|
7
|
+
end sub
|
8
|
+
|
9
|
+
' @Test
|
10
|
+
function TestCase__ProductAction() as string
|
11
|
+
sampleProduct = {}
|
12
|
+
sampleProduct.id = "foo-product-sku"
|
13
|
+
sampleProduct.nm = "foo-product-name"
|
14
|
+
sampleProduct.pr = 123.45
|
15
|
+
sampleProductAction = {
|
16
|
+
an: actionApi.ACTION_TYPE.PURCHASE,
|
17
|
+
tr: 123.45,
|
18
|
+
pl: [sampleProduct]
|
19
|
+
}
|
20
|
+
|
21
|
+
mpConstants = mparticleConstants()
|
22
|
+
product = mpConstants.Product.build("foo-product-sku", "foo-product-name", 123.45)
|
23
|
+
productAction = mpConstants.ProductAction.build(actionApi.ACTION_TYPE.PURCHASE, 123.45, [product])
|
24
|
+
return m.AssertEqual(productAction, sampleProductAction)
|
25
|
+
end function
|
26
|
+
|
27
|
+
' @Test
|
28
|
+
function Test_SimpleCustom() as string
|
29
|
+
m.mp.logEvent("example")
|
30
|
+
return true
|
31
|
+
end function
|
32
|
+
|
33
|
+
' @Test
|
34
|
+
function Test_CustomNavigation() as string
|
35
|
+
customAttributes = { "example custom attribute": "example custom attribute value" }
|
36
|
+
m.mp.logEvent("hello world!", mparticleConstants().CUSTOM_EVENT_TYPE.NAVIGATION, customAttributes)
|
37
|
+
return true
|
38
|
+
end function
|
39
|
+
|
40
|
+
' @Test
|
41
|
+
function Test_CustomLocation() as string
|
42
|
+
customAttributes = { "example custom attribute": "example custom attribute value" }
|
43
|
+
m.mp.logEvent("hello world!", mparticleConstants().CUSTOM_EVENT_TYPE.LOCATION, customAttributes)
|
44
|
+
return true
|
45
|
+
end function
|
46
|
+
|
47
|
+
' @Test
|
48
|
+
function Test_CustomSearch() as string
|
49
|
+
customAttributes = { "example custom attribute": "example custom attribute value" }
|
50
|
+
m.mp.logEvent("hello world!", mparticleConstants().CUSTOM_EVENT_TYPE.SEARCH, customAttributes)
|
51
|
+
return true
|
52
|
+
end function
|
53
|
+
|
54
|
+
' @Test
|
55
|
+
function Test_CustomTransaction() as string
|
56
|
+
customAttributes = { "example custom attribute": "example custom attribute value" }
|
57
|
+
m.mp.logEvent("hello world!", mparticleConstants().CUSTOM_EVENT_TYPE.TRANSACTION, customAttributes)
|
58
|
+
return true
|
59
|
+
end function
|
60
|
+
|
61
|
+
' @Test
|
62
|
+
function Test_UserContent() as string
|
63
|
+
customAttributes = { "example custom attribute": "example custom attribute value" }
|
64
|
+
m.mp.logEvent("hello world!", mparticleConstants().CUSTOM_EVENT_TYPE.USER_CONTENT, customAttributes)
|
65
|
+
return true
|
66
|
+
end function
|
67
|
+
|
68
|
+
' @Test
|
69
|
+
function Test_CustomUserPreference() as string
|
70
|
+
customAttributes = { "example custom attribute": "example custom attribute value" }
|
71
|
+
m.mp.logEvent("hello world!", mparticleConstants().CUSTOM_EVENT_TYPE.USER_PREFERENCE, customAttributes)
|
72
|
+
return true
|
73
|
+
end function
|
74
|
+
|
75
|
+
' @Test
|
76
|
+
function Test_CustomSocial() as string
|
77
|
+
customAttributes = { "example custom attribute": "example custom attribute value" }
|
78
|
+
m.mp.logEvent("hello world!", mparticleConstants().CUSTOM_EVENT_TYPE.SOCIAL, customAttributes)
|
79
|
+
return true
|
80
|
+
end function
|
81
|
+
|
82
|
+
' @Test
|
83
|
+
function Test_CustomOther() as string
|
84
|
+
customAttributes = { "example custom attribute": "example custom attribute value" }
|
85
|
+
m.mp.logEvent("hello world!", mparticleConstants().CUSTOM_EVENT_TYPE.OTHER, customAttributes)
|
86
|
+
return true
|
87
|
+
end function
|
88
|
+
|
89
|
+
' @Test
|
90
|
+
function Test_CustomMedia() as string
|
91
|
+
customAttributes = { "example custom attribute": "example custom attribute value" }
|
92
|
+
m.mp.logEvent("hello world!", mparticleConstants().CUSTOM_EVENT_TYPE.MEDIA, customAttributes)
|
93
|
+
return true
|
94
|
+
end function
|
95
|
+
|
96
|
+
' @Test
|
97
|
+
function Test_Consent() as string
|
98
|
+
time = CreateObject("roDateTime")
|
99
|
+
|
100
|
+
gdprConsentState = {}
|
101
|
+
gdprConsentState.c = False
|
102
|
+
gdprConsentState.ts = time.asSeconds()
|
103
|
+
gdprConsentState.d = "document_agreement.v2"
|
104
|
+
gdprConsentState.l = "dtmgbank.com/signup"
|
105
|
+
gdprConsentState.h = "IDFA:a5d934n0-232f-4afc-2e9a-3832d95zc702"
|
106
|
+
|
107
|
+
consentStateAPI = mpConstants.ConsentState
|
108
|
+
consentState = consentStateAPI.build()
|
109
|
+
|
110
|
+
' GDPR
|
111
|
+
gdprConsentStateApi = mpConstants.GDPRConsentState
|
112
|
+
gdprConsentState = gdprConsentStateApi.build(False, time.asSeconds())
|
113
|
+
|
114
|
+
gdprConsentStateApi.setDocument(gdprConsentState, "document_agreement.v2")
|
115
|
+
gdprConsentStateApi.setLocation(gdprConsentState, "dtmgbank.com/signup")
|
116
|
+
gdprConsentStateApi.setHardwareId(gdprConsentState, "IDFA:a5d934n0-232f-4afc-2e9a-3832d95zc702")
|
117
|
+
|
118
|
+
consentStateAPI.addGDPRConsentState(consentState, "functional", gdprConsentState)
|
119
|
+
|
120
|
+
return m.AssertEqual(consentStateAPI.gdpr, gdprConsentState)
|
121
|
+
end function
|
122
|
+
|
123
|
+
' @Test
|
124
|
+
function Test_Media() as string
|
125
|
+
customAttributes = { "example custom attribute": "example custom attribute value" }
|
126
|
+
mediaSession = mpConstants.MediaSession.build("ABC123", "Space Pilot 3000", mparticleConstants().MEDIA_CONTENT_TYPE.VIDEO, mparticleConstants().MEDIA_STREAM_TYPE.LIVE_STREAM, 1800000)
|
127
|
+
m.mp.media.logMediaSessionStart(mediaSession, customAttributes)
|
128
|
+
|
129
|
+
test1 = m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.contenttype, "Video") and m.AssertEqual(mediaSession.currentplayheadposition, 0) and m.AssertEqual(mediaSession.title, "Space Pilot 3000")
|
130
|
+
|
131
|
+
print ("Logging session after " + formatjson(test1) + " start: " + formatjson(mediaSession))
|
132
|
+
|
133
|
+
segment = mpConstants.Segment.build("Chapter 1", 0, 183400)
|
134
|
+
mediaSession.segment = segment
|
135
|
+
m.mp.media.logSegmentStart(mediaSession, customAttributes)
|
136
|
+
|
137
|
+
test2 = m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment.title, "Chapter 1") and m.AssertEqual(mediaSession.segment.index, 0) and m.AssertEqual(mediaSession.segment.duration, 183400)
|
138
|
+
print ("Logging session after " + formatjson(test2) + " segment start: " + formatjson(mediaSession))
|
139
|
+
|
140
|
+
customAttributes = { "Source": "Auto Playback" }
|
141
|
+
m.mp.media.logPlay(mediaSession, customAttributes)
|
142
|
+
|
143
|
+
test3 = m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment.title, "Chapter 1") and m.AssertEqual(mediaSession.segment.index, 0) and m.AssertEqual(mediaSession.segment.duration, 183400)
|
144
|
+
print ("Logging session after " + formatjson(test3) + " play: " + formatjson(mediaSession))
|
145
|
+
|
146
|
+
mediaSession.currentPlayheadPosition = 1000
|
147
|
+
m.mp.media.logPlayheadPosition(mediaSession)
|
148
|
+
|
149
|
+
test4 = m.AssertEqual(mediaSession.currentplayheadposition, 1000) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment.title, "Chapter 1") and m.AssertEqual(mediaSession.segment.index, 0) and m.AssertEqual(mediaSession.segment.duration, 183400)
|
150
|
+
print ("Logging session after " + formatjson(test4) + " playhead: " + formatjson(mediaSession))
|
151
|
+
|
152
|
+
mediaSession.currentPlayheadPosition = 1900
|
153
|
+
customAttributes = { "Source": "Player Controls" }
|
154
|
+
m.mp.media.logPause(mediaSession, customAttributes)
|
155
|
+
|
156
|
+
test5 = m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment.title, "Chapter 1") and m.AssertEqual(mediaSession.segment.index, 0) and m.AssertEqual(mediaSession.segment.duration, 183400)
|
157
|
+
print ("Logging session after " + formatjson(test5) + " pause: " + formatjson(mediaSession))
|
158
|
+
|
159
|
+
adBreak = mpConstants.adBreak.build("XYZ123", "Gamer Ad Collection")
|
160
|
+
adBreak.duration = 32000
|
161
|
+
mediaSession.adBreak = adBreak
|
162
|
+
m.mp.media.logAdBreakStart(mediaSession, {})
|
163
|
+
|
164
|
+
test6 = m.AssertEqual(mediaSession.adBreak.id, "XYZ123") and m.AssertEqual(mediaSession.adBreak.title, "Gamer Ad Collection") and m.AssertEqual(mediaSession.adBreak.duration, 32000) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment.title, "Chapter 1") and m.AssertEqual(mediaSession.segment.index, 0) and m.AssertEqual(mediaSession.segment.duration, 183400)
|
165
|
+
print ("Logging session after " + formatjson(test6) + " adBreak start: " + formatjson(mediaSession))
|
166
|
+
|
167
|
+
adContent = mpConstants.adContent.build("ABC890", "CP 2077 - Be Cool, Be Anything")
|
168
|
+
adContent.duration = 16000
|
169
|
+
adContent.position = 0
|
170
|
+
adContent.campaign = "CP 2077 Preorder Push"
|
171
|
+
mediaSession.adContent = adContent
|
172
|
+
m.mp.media.logAdStart(mediaSession, {})
|
173
|
+
|
174
|
+
test7 = m.AssertEqual(mediaSession.adContent.id, "ABC890") and m.AssertEqual(mediaSession.adContent.title, "CP 2077 - Be Cool, Be Anything") and m.AssertEqual(mediaSession.adContent.duration, 16000) and m.AssertEqual(mediaSession.adBreak.id, "XYZ123") and m.AssertEqual(mediaSession.adBreak.title, "Gamer Ad Collection") and m.AssertEqual(mediaSession.adBreak.duration, 32000) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment.title, "Chapter 1") and m.AssertEqual(mediaSession.segment.index, 0) and m.AssertEqual(mediaSession.segment.duration, 183400)
|
175
|
+
print ("Logging session after " + formatjson(test7) + " ad start: " + formatjson(mediaSession))
|
176
|
+
|
177
|
+
customAttributes = { "click_timestamp_ms": 1593007533602 }
|
178
|
+
m.mp.media.logAdClick(mediaSession, customAttributes)
|
179
|
+
|
180
|
+
test8 = m.AssertEqual(mediaSession.adContent.id, "ABC890") and m.AssertEqual(mediaSession.adContent.title, "CP 2077 - Be Cool, Be Anything") and m.AssertEqual(mediaSession.adContent.duration, 16000) and m.AssertEqual(mediaSession.adBreak.id, "XYZ123") and m.AssertEqual(mediaSession.adBreak.title, "Gamer Ad Collection") and m.AssertEqual(mediaSession.adBreak.duration, 32000) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment.title, "Chapter 1") and m.AssertEqual(mediaSession.segment.index, 0) and m.AssertEqual(mediaSession.segment.duration, 183400)
|
181
|
+
print ("Logging session after " + formatjson(test8) + " ad click: " + formatjson(mediaSession))
|
182
|
+
|
183
|
+
m.mp.media.logAdEnd(mediaSession, {})
|
184
|
+
mediaSession.adContent = invalid
|
185
|
+
|
186
|
+
test9 = m.AssertEqual(mediaSession.adContent, invalid) and m.AssertEqual(mediaSession.adBreak.id, "XYZ123") and m.AssertEqual(mediaSession.adBreak.title, "Gamer Ad Collection") and m.AssertEqual(mediaSession.adBreak.duration, 32000) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment.title, "Chapter 1") and m.AssertEqual(mediaSession.segment.index, 0) and m.AssertEqual(mediaSession.segment.duration, 183400)
|
187
|
+
print ("Logging session after " + formatjson(test9) + " ad end: " + formatjson(mediaSession))
|
188
|
+
|
189
|
+
adContent2 = mpConstants.adContent.build("ABC543", "VtM: B2 - Own the night")
|
190
|
+
adContent2.duration = 16000
|
191
|
+
adContent2.position = 0
|
192
|
+
adContent2.campaign = "VtM: Revival"
|
193
|
+
mediaSession.adContent = adContent2
|
194
|
+
m.mp.media.logAdStart(mediaSession, {})
|
195
|
+
|
196
|
+
test10 = m.AssertEqual(mediaSession.adContent.id, "ABC543") and m.AssertEqual(mediaSession.adContent.title, "VtM: B2 - Own the night") and m.AssertEqual(mediaSession.adContent.duration, 16000) and m.AssertEqual(mediaSession.adBreak.id, "XYZ123") and m.AssertEqual(mediaSession.adBreak.title, "Gamer Ad Collection") and m.AssertEqual(mediaSession.adBreak.duration, 32000) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment.title, "Chapter 1") and m.AssertEqual(mediaSession.segment.index, 0) and m.AssertEqual(mediaSession.segment.duration, 183400)
|
197
|
+
print ("Logging session after " + formatjson(test10) + " ad start 2: " + formatjson(mediaSession))
|
198
|
+
|
199
|
+
m.mp.media.logAdSkip(mediaSession, {})
|
200
|
+
mediaSession.adContent = invalid
|
201
|
+
|
202
|
+
test11 = m.AssertEqual(mediaSession.adContent, invalid) and m.AssertEqual(mediaSession.adBreak.id, "XYZ123") and m.AssertEqual(mediaSession.adBreak.title, "Gamer Ad Collection") and m.AssertEqual(mediaSession.adBreak.duration, 32000) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment.title, "Chapter 1") and m.AssertEqual(mediaSession.segment.index, 0) and m.AssertEqual(mediaSession.segment.duration, 183400)
|
203
|
+
print ("Logging session after " + formatjson(test11) + " ad skip: " + formatjson(mediaSession))
|
204
|
+
|
205
|
+
m.mp.media.logAdBreakEnd(mediaSession, {})
|
206
|
+
mediaSession.adBreak = invalid
|
207
|
+
|
208
|
+
test12 = m.AssertEqual(mediaSession.adContent, invalid) and m.AssertEqual(mediaSession.adBreak, invalid) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment.title, "Chapter 1") and m.AssertEqual(mediaSession.segment.index, 0) and m.AssertEqual(mediaSession.segment.duration, 183400)
|
209
|
+
print ("Logging session after " + formatjson(test12) + " adBreak end: " + formatjson(mediaSession))
|
210
|
+
|
211
|
+
m.mp.media.logQoS(mediaSession, 120, 3, 1232133, 46, {})
|
212
|
+
|
213
|
+
test13 = m.AssertEqual(mediaSession.adContent, invalid) and m.AssertEqual(mediaSession.adBreak, invalid) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment.title, "Chapter 1") and m.AssertEqual(mediaSession.segment.index, 0) and m.AssertEqual(mediaSession.segment.duration, 183400)
|
214
|
+
print ("Logging session after " + formatjson(test13) + " QOS: " + formatjson(mediaSession))
|
215
|
+
|
216
|
+
m.mp.media.logSegmentEnd(mediaSession, customAttributes)
|
217
|
+
mediaSession.segment = invalid
|
218
|
+
|
219
|
+
test14 = m.AssertEqual(mediaSession.adContent, invalid) and m.AssertEqual(mediaSession.adBreak, invalid) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment, invalid)
|
220
|
+
print ("Logging session after " + formatjson(test14) + " segment end: " + formatjson(mediaSession))
|
221
|
+
|
222
|
+
segment2 = mpConstants.Segment.build("Chapter 2", 1, 17500)
|
223
|
+
mediaSession.segment = segment2
|
224
|
+
m.mp.media.logSegmentStart(mediaSession, customAttributes)
|
225
|
+
|
226
|
+
test15 = m.AssertEqual(mediaSession.adContent, invalid) and m.AssertEqual(mediaSession.adBreak, invalid) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment.title, "Chapter 2") and m.AssertEqual(mediaSession.segment.index, 1) and m.AssertEqual(mediaSession.segment.duration, 17500)
|
227
|
+
print ("Logging session after " + formatjson(test15) + " segment start 2: " + formatjson(mediaSession))
|
228
|
+
|
229
|
+
m.mp.media.logSeekStart(mediaSession, 1900, customAttributes)
|
230
|
+
|
231
|
+
test16 = m.AssertEqual(mediaSession.adContent, invalid) and m.AssertEqual(mediaSession.adBreak, invalid) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment.title, "Chapter 2") and m.AssertEqual(mediaSession.segment.index, 1) and m.AssertEqual(mediaSession.segment.duration, 17500)
|
232
|
+
print ("Logging session after " + formatjson(test16) + " seek start: " + formatjson(mediaSession))
|
233
|
+
|
234
|
+
m.mp.media.logSeekEnd(mediaSession, 45600, {})
|
235
|
+
|
236
|
+
test17 = m.AssertEqual(mediaSession.adContent, invalid) and m.AssertEqual(mediaSession.adBreak, invalid) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment.title, "Chapter 2") and m.AssertEqual(mediaSession.segment.index, 1) and m.AssertEqual(mediaSession.segment.duration, 17500)
|
237
|
+
print ("Logging session after " + formatjson(test17) + " seek end: " + formatjson(mediaSession))
|
238
|
+
|
239
|
+
m.mp.media.logSegmentSkip(mediaSession, customAttributes)
|
240
|
+
mediaSession.segment = invalid
|
241
|
+
|
242
|
+
test18 = m.AssertEqual(mediaSession.adContent, invalid) and m.AssertEqual(mediaSession.adBreak, invalid) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment, invalid)
|
243
|
+
print ("Logging session after " + formatjson(test18) + " segment skip: " + formatjson(mediaSession))
|
244
|
+
|
245
|
+
m.mp.media.logBufferStart(mediaSession, 1200, 0.12, 45600, customAttributes)
|
246
|
+
|
247
|
+
test19 = m.AssertEqual(mediaSession.adContent, invalid) and m.AssertEqual(mediaSession.adBreak, invalid) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment, invalid)
|
248
|
+
print ("Logging session after " + formatjson(test19) + " buffer start: " + formatjson(mediaSession))
|
249
|
+
|
250
|
+
m.mp.media.logBufferEnd(mediaSession, 563300, 1.0, 45600, {})
|
251
|
+
|
252
|
+
test20 = m.AssertEqual(mediaSession.adContent, invalid) and m.AssertEqual(mediaSession.adBreak, invalid) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment, invalid)
|
253
|
+
print ("Logging session after " + formatjson(test20) + " buffer end: " + formatjson(mediaSession))
|
254
|
+
|
255
|
+
m.mp.media.logMediaContentEnd(mediaSession, customAttributes)
|
256
|
+
|
257
|
+
test21 = m.AssertEqual(mediaSession.adContent, invalid) and m.AssertEqual(mediaSession.adBreak, invalid) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment, invalid)
|
258
|
+
print ("Logging session after " + formatjson(test21) + " media content End: " + formatjson(mediaSession))
|
259
|
+
|
260
|
+
m.mp.media.logMediaSessionEnd(mediaSession, customAttributes)
|
261
|
+
|
262
|
+
test22 = m.AssertEqual(mediaSession.adContent, invalid) and m.AssertEqual(mediaSession.adBreak, invalid) and m.AssertEqual(mediaSession.currentplayheadposition, 1900) and m.AssertEqual(mediaSession.contentid, "ABC123") and m.AssertEqual(mediaSession.title, "Space Pilot 3000") and m.AssertEqual(mediaSession.segment, invalid)
|
263
|
+
print ("Logging session after " + formatjson(test22) + " End: " + formatjson(mediaSession))
|
264
|
+
|
265
|
+
return test1 and test2 and test3 and test4 and test5 and test6 and test7 and test8 and test9 and test10 and test11 and test12 and test13 and test14 and test15 and test16 and test71 and test18 and test19 and test20 and test21 and test22
|
266
|
+
end function
|
@@ -0,0 +1,68 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIE0DCCA7igAwIBAgIBBzANBgkqhkiG9w0BAQsFADCBgzELMAkGA1UEBhMCVVMx
|
3
|
+
EDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAYBgNVBAoT
|
4
|
+
EUdvRGFkZHkuY29tLCBJbmMuMTEwLwYDVQQDEyhHbyBEYWRkeSBSb290IENlcnRp
|
5
|
+
ZmljYXRlIEF1dGhvcml0eSAtIEcyMB4XDTExMDUwMzA3MDAwMFoXDTMxMDUwMzA3
|
6
|
+
MDAwMFowgbQxCzAJBgNVBAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRMwEQYDVQQH
|
7
|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