-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
145 lines (145 loc) · 4.9 KB
/
index.html
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>title</title>
<link rel="stylesheet" type="text/css" href="vendor.css">
<link rel="stylesheet" type="text/css" href="index.css">
</head>
<body>
<div id="player"></div>
<script src="wikiajwplayer.js"></script>
<script>
// this function is called to inject jwplayer into element with id `player`, second argument is an options object
wikiaJWPlayer('player', {
// adding this object enables tracking
tracking: {
// GA category
category: 'featured-video',
// pass track function, data argument structure in tracking.js in track function
track: function (data) {
console.log('track', data);
},
// pass custom dimension function, probably just window.guaSetCustomDimension
setCustomDimension: function () {
console.log('setCustomDimension', arguments);
},
// set to true if you want to enable comscore tracking
comscore: false
},
// set to true if you want video to autostart
autoplay: false,
// set to true if you want to have video initially muted
mute: true,
// set language for captions, must map captions' label, defaults to user browser language
// set to 'false' to turn them off completely
selectedCaptionsLanguage: 'English',
showSmallPlayerControls: false,
settings: {
// set to true when you want to give user option to enable/disable autoplay
// autoplay toggle appears in settings menu which sends event `autoplayToggle` on click
showAutoplayToggle: true,
// set to true when you want to give user option to change quality of the video
// show quality option doesn't appear in Safari and mobile browsers even if the option is set to true
// these browsers have native HLS support
showQuality: true,
// set to true when you want to show captions list button
// captions button appears in settings menu, sends event `captionsSelected` on click
showCaptions: true
},
sharing: true,
related: {
// countdown time to autoplay next video
time: 3,
// playlistId configured in dashboard
playlistId: 'Y2RWCKuS',
// enable/disable autoplay for related videos
autoplay: true
},
// enables/disables watermark plugin (enabled by default)
watermark: true,
videoDetails: {
// description of the video
description: 'description',
// title of the video
title: 'title',
// pass playlist returned by jwplayer API
playlist: [{
"labels": "\/Fandom,\/Fandom\/Movies,\/Fandom\/Specialized,\/Fandom\/wiki,",
"mediaid": "LnqN4iBt",
"description": "From Accio to Wingardium Leviosa, magical spells are a vital part of the Wizarding World of Harry Potter. Join us as we take a look at the five best spells from the Harry Potter Universe.",
"pubdate": 1486075388,
"tags": "Wiki,Movies,Fandom,Harry Potter,Specialized",
"image": "https:\/\/cdn.jwplayer.com\/thumbs\/LnqN4iBt-720.jpg",
"title": "5 Best Spells in the Harry Potter Universe",
"sources": [{
"type": "application\/vnd.apple.mpegurl",
"file": "https:\/\/cdn.jwplayer.com\/manifests\/LnqN4iBt.m3u8"
}, {
"width": 320,
"height": 180,
"type": "video\/mp4",
"file": "https:\/\/cdn.jwplayer.com\/videos\/LnqN4iBt-TI0yeHZW.mp4",
"label": "180p"
}, {
"width": 480,
"height": 270,
"type": "video\/mp4",
"file": "https:\/\/cdn.jwplayer.com\/videos\/LnqN4iBt-DnzUC89Y.mp4",
"label": "270p"
}, {
"width": 720,
"height": 406,
"type": "video\/mp4",
"file": "https:\/\/cdn.jwplayer.com\/videos\/LnqN4iBt-xhZUqUI6.mp4",
"label": "406p"
}, {
"width": 1280,
"height": 720,
"type": "video\/mp4",
"file": "https:\/\/cdn.jwplayer.com\/videos\/LnqN4iBt-1lt3rSsE.mp4",
"label": "720p"
}, {
"type": "audio\/mp4",
"file": "https:\/\/cdn.jwplayer.com\/videos\/LnqN4iBt-LiJWxqIn.m4a",
"label": "AAC Audio"
}, {
"width": 1920,
"height": 1080,
"type": "video\/mp4",
"file": "https:\/\/cdn.jwplayer.com\/videos\/LnqN4iBt-cSpmBcaY.mp4",
"label": "1080p"
}],
"tracks": [
{
"kind": "captions",
"file": "https://cdn.jwplayer.com/tracks/AVeWXFZo.vtt",
"label": "Subtítulos (ES)"
},
{
"kind": "captions",
"file": "https://cdn.jwplayer.com/tracks/CYq99zqA.vtt",
"label": "English"
},
{
"kind": "thumbnails",
"file": "https://cdn.jwplayer.com/strips/JT3QvNBv-120.vtt"
}
],
"link": "https:\/\/cdn.jwplayer.com\/previews\/LnqN4iBt",
"duration": 159,
"originalName": "020217_Harry Potter_FINAL_no watermark.mp4",
"pixel": "http://test.pixel/pixel.gif"
}]
},
// logging level, default is error, available values: 'info', 'warn', 'error', 'off'
logLevel: 'info',
// language code, default 'en'
lang: 'pl'
}, function (playerInstance) {
// callback with jwplayer instance as an argument
});
</script>
</body>
</html>