Skip to content

Commit

Permalink
Fix(FEC-13864): handle page load in kava (#169)
Browse files Browse the repository at this point in the history
* Fix(FEC-13864): handle page load in kava

* style

* add plugins test page

---------

Co-authored-by: Moshe Maor <[email protected]>
Co-authored-by: JonathanTGold <jonathan.gold@[email protected]>
  • Loading branch information
3 people authored Apr 9, 2024
1 parent 10bbb59 commit 50f6acd
Show file tree
Hide file tree
Showing 4 changed files with 351 additions and 163 deletions.
166 changes: 166 additions & 0 deletions demo/plugins.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta name="description" content="Kaltura Demo Pages - Created by Jonathan Gold" />
<title>Plugins</title>
<link rel="stylesheet" type="text/css" href="./style.css" />
<script src="./plugins-config.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/kaltura-player-js@canary/dist/kaltura-ovp-player.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/ui-managers@canary/dist/playkit-ui-managers.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/playkit-js-playlist@canary/dist/playkit-playlist.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/info@canary/dist/playkit-info.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/related@canary/dist/playkit-related.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/playkit-js-downloads@canary/dist/playkit-downloads.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/moderation@canary/dist/playkit-moderation.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/transcript@canary/dist/playkit-transcript.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/share@canary/dist/playkit-share.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/navigation@canary/dist/playkit-navigation.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/playkit-js-dual-screen@canary/dist/playkit-dual-screen.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/playkit-js-youtube@canary/dist/playkit-youtube.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/call-to-action@canary/dist/playkit-call-to-action.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/skip/dist/playkit-skip.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/playkit-js-timeline@canary/dist/playkit-timeline.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/playkit-js-kaltura-cuepoints@canary/dist/playkit-kaltura-cuepoints.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/playkit-js-ivq@canary/dist/playkit-ivq.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/playkit-js-kaltura-live@canary/dist/playkit-kaltura-live.js" type="text/javascript"></script>
<script src="https://unpkg.com/@playkit-js/hotspots@canary/dist/playkit-hotspots.js" type="text/javascript"></script>
<script src="./playkit-kava.js" type="text/javascript"></script>
</head>
<body>
<div id="player-placeholder"></div>
<script type="text/javascript">
const config = {
log: {
level: 'DEBUG'
},
targetId: 'player-placeholder',
provider: {
env: {
serviceUrl: 'https://api.nvq2.ovp.kaltura.com/api_v3',
cdnUrl: 'https://api.nvq2.ovp.kaltura.com',
statsServiceUrl: 'https://analytics.rcqa3.kaltura.com',
liveStatsServiceUrl: 'https://livestats.nvq2.ovp.kaltura.com',
analyticsServiceUrl: 'https://analytics.nvq2.ovp.kaltura.com',
apiFeatures: {
entryRedirect: '1'
},
kmsHistoryProxyUrl: 'https://async-api.nvq2.ovp.kaltura.com/api_v3/'
},
partnerId: 242
},
ui: {
locale: 'en',
translations: {
en: {
skip: {
skipIntro: 'Skip Intro',
watchNext: 'Watch Next'
}
}
}
},
plugins: {
kava: {},
playlist: {},
uiManagers: {},
navigation: {},
kalturaCuepoints: {},
timeline: {},
share: {},
'playkit-js-transcript': {},
'playkit-js-moderation': {},
'playkit-js-info': {},
download: {},
related: {},
dualscreen: {},
skip: {
timeout: 10,
intro: {
relativeTime: 20
}
},
callToAction: {
messages: [
{
title: 'This is the title 1',
description: 'This is the description 1',
showToast: true,
timing: {
redisplayMessage: true,
duration: 10,
timeFromStart: 5,
showOnStart: false,
showOnEnd: false,
timeFromEnd: -1
},
buttons: [
{
label: 'Go to entry',
link: '0_jmzquob1',
type: 'secondary'
},
{
label: 'Go to site',
link: 'https://www.google.com',
type: 'primary'
}
]
},
{
title: 'New call to action 2',
description: 'description 2',
showToast: true,
buttons: [
{
label: 'Go to site',
link: 'https://www.google.co.il',
type: 'secondary'
},
{
label: 'Go to entry',
link: '0_vry5u8hk',
type: 'primary'
}
],
timing: {
duration: 10,
redisplayMessage: true,
showOnStart: false,
showOnEnd: false,
timeFromStart: -1,
timeFromEnd: 10
}
}
]
}
// "airplay": {},
// "cast": {},
// "receiver": {},
// "seo": {},
// "ima": {}
// "ivq": {},
// "playkit-js-hotspots": {},
// "qna": {},
// "bumper": {},
}
};

const player = KalturaPlayer.setup(config);

// single media - no ivq(quiz);
player.loadMedia({ entryId: '0_i5a40h0h' });

// single media - with ivq(quiz);
// player.loadMedia({ entryId: '0_i5a40h0h' });

// entrylist - playlist
// player.loadPlaylist({ playlistId: '0_7vtkq3at' });

// single media - youtube
// player.loadMedia({ entryId: '0_1c2h8o3o' });
</script>
</body>
</html>
9 changes: 9 additions & 0 deletions demo/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
body {
background-color: #212121;
}

#player-placeholder {
margin: 100px auto;
max-width: 640px;
aspect-ratio: 10 / 5.62;
}
Loading

0 comments on commit 50f6acd

Please sign in to comment.