eb-player 2.0.10 → 2.0.12

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.
@@ -1,63 +0,0 @@
1
- <!doctype html><html><head><title>Easybroadcast Player</title><style>body {
2
- margin: 0;
3
- background-color: black;
4
- height: 100vh;
5
- }</style><script defer="defer" src="equipe.js"></script></head><body><div id="equipe_eb_player"></div><script>let count = 0;
6
- /**
7
- * This function is called to provide extra parameters for token fetching.
8
- * @returns {object} An object containing accessToken and providerEntitlement.
9
- */
10
- async function getExtraParams() {
11
- return {
12
- accessToken: `${count++}`,
13
- providerEntitlement: 'ligue1-1'
14
- };
15
- }
16
-
17
- /*
18
- * This function is called when there is an error fetching the token from the CDN.
19
- * @param {object} payload - The error payload from the CDN.
20
- * @param {string} payload.status - The HTTP status code.
21
- * @param {string} payload.code - The error code.
22
- * @param {string} payload.errorType - The type of error.
23
- */
24
- function tokenCDNErrorCallback({ status, code, errorType } = {}) {
25
- console.error('tokenCDNErrorCallback >>>>>:', { status, code, errorType });
26
- }
27
-
28
- document.addEventListener('eb:stats', (event) => {
29
- console.log('eb:stats event received:', event.statName, event.videoSrc, event.timestamp);
30
- });
31
-
32
- document.addEventListener('DOMContentLoaded', () => {
33
- // if start() is not working, check that the config has start: false
34
- window?.EBPlayer?.start({
35
- // src: 'https://cdn.lequipe.easybroadcast.io/abr_drm_corp/ligue1-1/playlist.m3u8', // live prod
36
- // src: 'https://cdn.lequipe.easybroadcast.io/pp_abr_drm_corp/ligue1-1/playlist.m3u8', // live preprod
37
- // src: 'https://cdn.lequipe.easybroadcast.io/pp_drm_vod/ligue1-20223053/fp/playlist.m3u8', // vod preprod with DRM
38
- src: 'https://encoder.cdn.easybroadcast.fr/vod/EBCORP_DEV/5074/playlist.m3u8', // vod preprod without DRM
39
- isLive: false, // VOD ui
40
- liveButton: false, // VOD ui
41
- seekbar: true, // VOD ui
42
- // isLive: true, // Live ui
43
- // liveButton: true, // Live ui
44
- // seekbar: true, // Live ui
45
- engineSettings: {
46
- emeEnabled: true,
47
- drmSystems: {
48
- 'com.apple.fps': {
49
- // licenseUrl: 'https://fps.ezdrm.com/api/licenses/4284be24-5a56-4dc2-bb0b-76619a2d2cf5',
50
- // serverCertificateUrl: 'https://sdwh.lequipe.fr/iPhoneDatas/certs/lequipe_fps_v4.cer'
51
- licenseUrl: 'https://fps.ezdrm.com/api/licenses/EB4A39C3-892B-F0EB-414E-7EBD6742C452',
52
- serverCertificateUrl: 'https://gcp-preprod-sdwh.lequipe.fr/iPhoneDatas/certs/lequipe_fps_v4.cer'
53
- },
54
- 'com.widevine.alpha': {
55
- // licenseUrl: 'https://widevine-dash.ezdrm.com/proxy?pX=78F763'
56
- licenseUrl: 'https://widevine-dash.ezdrm.com/proxy?pX=10E96F'
57
- }
58
- },
59
- onCDNTokenError: ({ status, errorCode, errorType }) => tokenCDNErrorCallback({ status, errorCode, errorType }),
60
- extraParamsCallback: async () => getExtraParams()
61
- }
62
- });
63
- });</script></body></html>