npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@inlasningstjanst/video-player

v2.1.6

Published

Video player package.

Downloads

443

Readme

@inlasningstjanst/video-player

Manabua video player

Manabua video player is a module for showing videos from Inlasningstjanst.se

Installation

Use the package manager npm to install Manabua video player.

npm install @inlasningstjanst/video-player

Usage

Javascript

import { ILTVideoContainer } from '@inlasningstjanst/video-player'
import '@inlasningstjanst/video-player/dist/style.css'

var authToken  =  'token' // Token for access to AP
var elementID  =  'film_container'
var domain     =  'https://intro-films.inlasningstjanst.se'
var videoID    =  'wWpacPJfK8xJh2bV0u92H' // Required: film uid
var videoContainer = new ILTVideoContainer(authToken, videoID, domain, elementID);

window.addEventListener('load', () => {
    videoContainer.init();
});

// Video can also be initialized with an optional parameter "options"

// Example
var options = {
    'enabledButtons': ['theatre', 'subtitleSize'],
    'theatreContainerID': 'theatre_container', 
    'disabledLanguageTooltip': 'Example text',
}
// 'theatreContainerID' must be defined if 'enabledButtons' contains 'theatre'
var videoContainer = new ILTVideoContainer(authToken,  videoID,  domain,  elementID, options)

Available options

| Value | Type | Example | Description | |-----------------------------|------------|-----------------------------------------------------------|-------------------------------------------------------| | statisticsEndpoint | String | https://intro-films.inlasningstjanst.se/public/v1/views | URL to statistics endpoint | | hls | String | `` | Film hls | | trackName | String | Track name | Film title | | poster | String | /path/to/poster | Film image preview url | | languages | Array | [] | Available languages | | playbackRates | Array | [0.5, 0.8, 1, 1.2, 1.5, 2] | List of available playback rates | | audioTracks | Array | [] | List of audio files data | | subtitleTracks | Array | [] | List of subtitle files data | | primaryLanguageCode | String | swe | Code of default language | | activeAudioTrack | String | swe | Language code of default language for audio | | activeSubtitleTrack | String | swe | Language code of default language for subtitle | | enabledButtons | Array | ['theatre','subtitleSize','share','fullscreen'] | Extra buttons | | disabledLanguageTooltip | Boolean | true | Option for disabling language tooltip | | theatreContainerID | String | theatre_container | ID for theatre container, fill if you need to have it | | audioCaption | String | Audio | Text for audio caption | | subtitleCaption | String | Subtitle | Text for subtitle caption | | offCaption | String | Off | Text for off caption | | route | String | /path/to/video | Current route (for Vue.js purposes) | | onActiveVideoLanguageChange | Function | ({type: 'audio' \| 'subtitles', lang: string}) => {} | Callback for audio or subtitle language change | | onSubtitleLanguageChange | Function | (lang: string) => {} | Callback for subtitle language change | | onAudioLanguageChange | Function | (lang: string) => {} | Callback for audio language change | | siteLanguage | String | swe | Language code of default language |

HTML

<!DOCTYPE  html>
<html>
	<script  type="text/javascript"  src="path/to/js"></script>
	<link  rel="stylesheet"  type="text/css"  href="path/to/css">
	<body>
		<div  id="film_container"></div>
	</body>
</html>

HTML (with theatreContainerID)

<!DOCTYPE  html>
<html>
	<script  type="text/javascript"  src="path/to/js"></script>
	<link  rel="stylesheet"  type="text/css"  href="path/to/css">
	<body>
		<div id="theatre_container">
			<div id="film_container"></div>
			<div id="optional_additional_container">For example a list of films</div>
		</div>
	</body>
</html>