0.6.1 • Published 6 months ago

media-hub-video-player v0.6.1

Weekly downloads
-
License
-
Repository
-
Last release
6 months ago

Media Hub Video Player

Installation

npm install media-hub-video-player --save

Import the styles import 'media-hub-video-player/dist/style.css'

Create a target element

<div class="smh-player"></div>

Initialize the player

Use one of the following approaches

Asset ID

const player = new MediaHubPlayer(document.querySelector('smh-player') as HTMLElement, 
{ 
   poster: 'https://picsum.photos/800/600', 
   asset: { eid: '094569b6f59ad0de' } 
})

This will fetch asset streaming links and meta data from the Media Hub API.

Note: Verify CSP before using this approach

If communication is blocked by CSP, please provide sufficcent parameters for playing and tracking the usage:

const player = new MediaHubPlayer(document.getElementById('third') as HTMLElement, {
   poster: 'https://picsum.photos/800/600',
   asset: {
     mpd_url: 'https://video.skfmediahub.skf.com/.../input-0901d19680c9f6da.ism/manifest(format=mpd-time-csf)',
     m3u8_url: 'https://video.skfmediahub.skf.com/.../input-0901d19680c9f6da.ism/manifest(format=m3u8-aapl)',
     assetType: 'Training module',
     eid: '0901d19680c9f6da',
     languages: ['en-US'],
     publishingUnit: 'EMEA sales',
     title: 'SKF WCL Instruction Video'
   }
})

YouTube ID

const player = new MediaHubPlayer(document.querySelector('smh-player') as HTMLElement, 
{ 
   poster: 'https://picsum.photos/800/600', 
   youtubeId: 'yCRY2Ny2jU'
})
0.6.1

6 months ago

0.6.0

7 months ago

0.5.0

8 months ago

0.5.1

8 months ago

0.4.1

11 months ago

0.4.0

11 months ago

0.3.1

11 months ago

0.3.0

11 months ago

0.2.0

11 months ago

0.1.3

12 months ago

0.1.2

12 months ago

0.1.1

12 months ago

0.1.0

12 months ago