Socket
Book a DemoInstallSign in
Socket

@teamhive/content-viewers

Package Overview
Dependencies
Maintainers
11
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teamhive/content-viewers

Hive Content Viewers

latest
Source
npmnpm
Version
3.1.1
Version published
Maintainers
11
Created
Source

Built With Stencil

Hive Content Viewers

Various content viewer web components for displaying different types of content.

Supported Content Types

Content TypeComponent
Imageshive-image-viewer
Videoshive-video-viewer
Audiohive-audio-viewer
Microsoft Documentshive-document-viewer
HTML Interactiveshive-iframe-viewer
HTML Courseshive-iframe-viewer

Usage

Installation

npm i @teamhive/content-viewers

Somewhere in your app (e.g. main.ts for Angular):

import { defineCustomElements } from '@teamhive/content-viewers/dist/loader';

defineCustomElements(window);

Or if you already have another stencil component library, define them separately:

import { defineCustomElements as defineHiveContentViewers } from '@teamhive/content-viewers/dist/loader';

defineHiveContentViewers(window);

Image Viewer

To leverage viewerjs built in styling, you will need to import the global stylesheet into your application (instead of us bundling it with each image-viewer instance).

@import '~viewerjs/dist/viewer.min.css';

Attributes

AttributeDescription
srcThe location of the content.

Viewers

Viewer ComponentDescription
hive-image-viewerThe image sized to the maximum width and height without cropping or stretching.
hive-video-viewerThe video sized to the maximum width and height without cropping or stretching in the browser default player. Controls are enabled.
hive-audio-viewerThe audio loaded in the browser default player.
hive-document-viewerMicrosoft documents are loaded in an iframe using the Office Web Viewer.
hive-iframe-viewerInteractives or Courses are loaded in an iframe.

FAQs

Package last updated on 14 Feb 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts