-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathvast.js
51 lines (43 loc) · 1.11 KB
/
vast.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import createAction from '../util/createAction'
export const VAST_WARNING = 'VAST_WARNING'
export const LOAD_VAST = 'LOAD_VAST'
export const VAST_LOADED = 'VAST_LOADED'
export const VAST_LOAD_FAILED = 'VAST_LOAD_FAILED'
export const UNSUPPORTED_MEDIA_FILES = 'UNSUPPORTED_MEDIA_FILES'
export const SET_MEDIA_FILE = 'SET_MEDIA_FILE'
export const VAST_EVENT = 'VAST_EVENT'
export const vastWarning = (message, url) =>
createAction(VAST_WARNING, {
message,
url
})
export const loadVast = () => createAction(LOAD_VAST)
export const vastLoaded = (
chain,
inLine,
linear,
trackingEvents,
verifications
) =>
createAction(VAST_LOADED, {
chain,
inLine,
linear,
trackingEvents,
verifications
})
export const vastLoadFailed = error =>
createAction(VAST_LOAD_FAILED, {
error
})
export const unsupportedMediaFiles = () => createAction(UNSUPPORTED_MEDIA_FILES)
export const setMediaFile = (url, apiFramework, adParameters) =>
createAction(SET_MEDIA_FILE, {
url,
apiFramework,
adParameters
})
export const vastEvent = type =>
createAction(VAST_EVENT, {
type
})