Media Library - Detail View
Adding the Media Library Detail View Widget
Adding this will fetch the media against the portal you have bound and show the Media in Detail view.
Get Started
Step 1: Add the following HTML in the body section of your web application code to add the Media Library Detail View widget.
<vdz-mashup-detailview data-widget="true"> </vdz-mashup-detailview>
Step 2: Add the following Script tag into the body section of your web application code to bind the events and see those events in the console.
<script>
document.getElementById("detail-view").addEventListener("on-mashups-loading", (event) => {
console.log(event);
console.log("onMashupLoading");
});
document.getElementById("detail-view").addEventListener("on-mashups-loaded", (event) => {
console.log(event);
console.log("onMashupLoaded")
});
document.getElementById("detail-view").addEventListener("on-mashups-loading-failed", (event) => {
console.log(event);
console.log("onMashupLoadingFailed")
});
</script>
Input properties for Media Library Detail Widget
Methods for Media Library Detail Widget
Output Events for Media Library Gallery Widget
Sample Code - VIDIZMO Media Library Detail Widget
<html>
<head>
<meta charset="UTF-8" />
<!-- VIDIZMO Imports -->
<script type="text/javascript" src="https://betalpha.beta.vidizmo.com/static/js/vidizmo-player/player.js"></script>
<link rel="stylesheet" href="https://betalpha.beta.vidizmo.com/static/compiled/widget/widgets.css" />
<script type="text/javascript" src="https://betalpha.beta.vidizmo.com/static/compiled/widget/widgets.js"> </script>
</head>
<body style="margin: 20px;">
<vdz-mashup-detailview id="detailview" data-widget="true"
search-criteria='{"sortType":"ASC","pageSize":36,"isGlobal":true,"showOnChannelLibrary":true,"isFeatured":true}'>
</vdz-mashup-detailview>
<script>
document.getElementById("detail-view").addEventListener("on-mashups-loading", (event) => {
console.log(event);
console.log("onMashupLoading");
});
document.getElementById("detail-view").addEventListener("on-mashups-loaded", (event) => {
console.log(event);
console.log("onMashupLoaded")
});
document.getElementById("detail-view").addEventListener("on-mashups-loading-failed", (event) => {
console.log(event);
console.log("onMashupLoadingFailed")
});
</script>
</body>
</html>
Additional Widget(s) Integration
You can also add the following widgets with the Media Gallery View Widget.
1. Adding the Category Filter Widget
This widget integrated with Media Detail View Widget allows you to filter out the media based on the content's category.
Get Started
Step 1: Add the following HTML into the body of your website code to add the category filter widget.
<vdz-library-filter id="widgetLibraryFilter" data-widget="true"> </vdz-library-filter>
The screenshot below shows the Category Filter Widget.
Input Properties for Category Filter Widget
Method(s) for Category Filter Widget
Output Events for Category Filter Widget:
Sample Code for Media Library Detail View with Category Filter Widget
<html>
<head>
<meta charset="UTF-8" />
<!-- VIDIZMO Imports -->
<script type="text/javascript" src="{portal-address}/static/js/vidizmo-player/player.js"></script>
<link rel="stylesheet" href="https://{portal-address}/static/compiled/widget/widgets.css" />
<script type="text/javascript" src="https://{portal-address}/static/compiled/widget/widgets.js"></script>
</head>
<body style="margin: 20px;">
<vdz-category-filter id="widgetCategoryFilter" data-widget="true"></vdz-category-filter>
<vdz-mashup-detailview id="detailview" data-widget="true"
search-criteria='{"sortType":"ASC","pageSize":36,"isGlobal":true,"showOnChannelLibrary":true,"isFeatured":true}'>
</vdz-mashup-detailview>
<script>
document.getElementById("widgetCategoryFilter").addEventListener("on-filter", (event) => {
console.log(event);
});
document.getElementById("detail-view").addEventListener("on-mashups-loading", (event) => {
console.log(event);
console.log("onMashupLoading");
});
document.getElementById("detail-view").addEventListener("on-mashups-loaded", (event) => {
console.log(event);
console.log("onMashupLoaded")
});
document.getElementById("detail-view").addEventListener("on-mashups-loading-failed", (event) => {
console.log(event);
console.log("onMashupLoadingFailed")
});
</script>
</body>
</html>
2. Adding the Library Filter Widget
This widget integrated with Media Detail View Widget allows you to filter out the media based on processed state, format, Author, Custom Attributes, and Tags.
Get Started
Step 1: Add the following HTML in the body of your website code to add the library filter widget.
<vdz-library-filter data-widget="true" id="widgetLibraryFilter"> </vdz-library-filter>
The screenshot below shows the Library Filter Widget.
Input Properties for Library Filter Widget:
Output Events for Library Filter Widget:
data: MashupFormat
MashupFormat possible values: Audio, Collection, Document, Image, Playlist, Presentation,Video, Course, Quiz, Survey, Live, SCORM
Sample Code for Media Library Detail View with Library Filter Widget:
<html>
<head>
<meta charset="UTF-8" />
<!-- VIDIZMO Imports -->
<script type="text/javascript" src="{portal-address}/static/js/vidizmo-player/player.js"></script>
<link rel="stylesheet" href="{portal-address}/static/compiled/widget/widgets.css" />
<script type="text/javascript" src="{portal-address}/static/compiled/widget/widgets.js"></script>
</head>
<body style="margin: 20px;">
<vdz-library-filter id="widgetLibraryFilter" data-widget="true"></vdz-library-filter>
<vdz-mashup-detailview id="detailview" data-widget="true"
search-criteria='{"sortType":"ASC","pageSize":36,"isGlobal":true,"showOnChannelLibrary":true,"isFeatured":true}'>
</vdz-mashup-detailview>
<script>
document.getElementById("widgetLibraryFilter").addEventListener("on-filter", (event) => {
console.log(event);
});
document.getElementById("detail-view").addEventListener("on-mashups-loading", (event) => {
console.log(event);
console.log("onMashupLoading");
});
document.getElementById("detail-view").addEventListener("on-mashups-loaded", (event) => {
console.log(event);
console.log("onMashupLoaded")
});
document.getElementById("detail-view").addEventListener("on-mashups-loading-failed", (event) => {
console.log(event);
console.log("onMashupLoadingFailed")
});
</script>
</body>
</html>
3. Media Search Widget
This widget integrated with Media Detail View Widget allows you to search the media based on the keywords.
Get Started
Step 1: Add the following tag in the body of your web application code to add the Media Search widget.
<vdz-mashup-filter show-search-box="true" show-forced-refresh-icon="true" data-widget="true"> </vdz-mashup-filter>
The screenshot below shows the Library Filter Widget.
Input Properties for Media Search Widget
Sample Code for Media Library Detail View with Media Search Widget
<html>
<head>
<meta charset="UTF-8" />
<!-- VIDIZMO Imports -->
<script type="text/javascript" src="{portal-address}/static/js/vidizmo-player/player.js"></script>
<link rel="stylesheet" href="{portal-address}/static/compiled/widget/widgets.css" />
<script type="text/javascript" src="{portal-address}/static/compiled/widget/widgets.js"></script>
</head>
<body style="margin: 20px;">
<vdz-mashup-filter show-search-box="true" show-forced-refresh-icon="true" data-widget="true"></vdz-mashup-filter>
<vdz-mashup-detailview id="detail-view" data-widget='true' page-size-md="4"
search-criteria={"sortType":"ASC","pageSize":36,"isGlobal":true,"showOnChannelLibrary":true,"isFeatured":true}>
</vdz-mashup-detailview>
<script>
document.getElementById("detail-view").addEventListener("on-mashups-loading", (event) => {
console.log(event);
console.log("onMashupLoading");
});
document.getElementById("detail-view").addEventListener("on-mashups-loaded", (event) => {
console.log(event);
console.log("onMashupLoaded")
});
document.getElementById("detail-view").addEventListener("on-mashups-loading-failed", (event) => {
console.log(event);
console.log("onMashupLoadingFailed")
});
</script>
</body>
</html>
Integration of Media Library Detail View Widget with Category Filter, Library Filter, and Media Search Widget
<html>
<head>
<meta charset="UTF-8" />
<!-- VIDIZMO Imports -->
<script type="text/javascript" src="{portal-address}/static/js/vidizmo-player/player.js"></script>
<link rel="stylesheet" href="{portal-address}/static/compiled/widget/widgets.css" />
<script type="text/javascript" src="{portal-address}/static/compiled/widget/widgets.js"></script>
</head>
<body style="margin: 20px;">
<vdz-category-filter id="widgetCategoryFilter" data-widget="true"></vdz-category-filter>
<vdz-library-filter id="widgetLibraryFilter" data-widget="true"></vdz-library-filter>
<vdz-mashup-filter show-search-box="true" show-forced-refresh-icon="true" data-widget="true"></vdz-mashup-filter>
<vdz-mashup-detailview id="detailview" data-widget="true"
search-criteria='{"sortType":"ASC","pageSize":36,"isGlobal":true,"showOnChannelLibrary":true,"isFeatured":true}'>
</vdz-mashup-detailview>
<script>
document.getElementById("widgetCategoryFilter").addEventListener("on-filter", (event) => {
console.log(event);
});
document.getElementById("widgetLibraryFilter").addEventListener("on-filter", (event) => {
console.log(event);
});
document.getElementById("detail-view").addEventListener("on-mashups-loading", (event) => {
console.log(event);
console.log("onMashupLoading");
});
document.getElementById("detail-view").addEventListener("on-mashups-loaded", (event) => {
console.log(event);
console.log("onMashupLoaded")
});
document.getElementById("detail-view").addEventListener("on-mashups-loading-failed", (event) => {
console.log(event);
console.log("onMashupLoadingFailed")
});
</script>
</body>
</html>
Next Steps
You can playback the content by simply clicking on the content within the Media Library Gallery Widget. Upon clicking the content, an event "onPlay()" would be raised and listened to.
You can learn more about this in the following articles: