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

@bitmovin/player-web-x

v10.1.4

Published

The Bitmovin HTML5 Adaptive Streaming Player for MPEG-DASH and HLS

Downloads

1,425

Readme

player-web-x

The next-gen Bitmovin web player.

Player Web X (PWX for short) is a new video player for the web that we at Bitmovin developed. It is based on an in-house developed library that we call the Phoenix Framework.

The Phoenix Framework is built from the ground up with fundamentals such as structured concurrency, an effect system and a package first architecture in mind that facilitates extensibility. Player Web X is built on a state-driven architecture that is built on top of the framework. Player Web X is developed with focus on making a highly performant player, with different, smaller and purpose built bundles comprised of different packages, as well as a Package API. Package API allows custom behaviours and functionalities to be built externally to the player, enabling our customers to support their own use cases without ever needing our help.

Currently, Player Web X has support for HLS streams that use the fMP4 and TS segment formats and partial support for DASH streams and muxed content. For a more detailed and complete listing of supported features, please refer to the Support Matrix.

To learn more about the framework and the player, checkout our full documentation.

Getting started

The easiest way of getting started with Player Web X is to use our bundles from cdn and a simple HTML page to embed the player on. You can read more about different approaches in our getting started page.

But here we will cover only be covering the use of npm package to bundle the player into your app.

Using the npm package

This example shows how to use the monolithic player from npm. First you will need to install the player to your project

npm install @bitmovin/player-web-x
import { Player } from '@bitmovin/player-web-x/bundles/playerx-hls';

const player = Player({
  key: 'YOUR-PLAYER-KEY',
  defaultContainer: document.getElementById('player-container')
});

const sourceConfig = {
  resources: [{
    url: 'https://cdn.bitmovin.com/content/assets/streams-sample-video/tos/m3u8/index.m3u8',
  }]
}

player.sources.add(sourceConfig);

Or using the packages. In this case, you need to merge the API type yourself.


import { Player } from '@bitmovin/player-web-x/bundles/playerx-core';
import { AdaptationPackage } from '@bitmovin/player-web-x/packages/playerx-adaptation.package';
import { CapabilitiesPackage } from '@bitmovin/player-web-x/packages/playerx-capabilities.package';
import { ContainerMp4Package } from '@bitmovin/player-web-x/packages/playerx-container-mp4.package';
import { DataPackage } from '@bitmovin/player-web-x/packages/playerx-data.package';
import { HlsPackage } from '@bitmovin/player-web-x/packages/playerx-hls.package';
import { HlsParsingPackage } from '@bitmovin/player-web-x/packages/playerx-hls-parsing.package';
import { HlsTranslationPackage } from '@bitmovin/player-web-x/packages/playerx-hls-translation.package';
import { NetworkPackage } from '@bitmovin/player-web-x/packages/playerx-network.package';
import { PresentationPackage } from '@bitmovin/player-web-x/packages/playerx-presentation.package';
import { SegmentProcessingPackage } from '@bitmovin/player-web-x/packages/playerx-segment-processing.package';
import { SourcePackage } from '@bitmovin/player-web-x/packages/playerx-source.package';
import { SourcesApiPackage }  from '@bitmovin/player-web-x/packages/playerx-sources-api.package';
import { ViewModePackage }  from '@bitmovin/player-web-x/packages/playerx-view-mode.package';
import type { ViewModeApi } from '@bitmovin/player-web-x/types/framework/core/view-mode/Types'
import type { SourceApiBase, SourcesApi } from '@bitmovin/player-web-x/types/framework/core/sources-api/Types'
import type { PlayerApi }  from '@bitmovin/player-web-x/types/framework/core/player-api/Types'

type SourceApi = SourceApiBase & ViewModeApi;
type MyApi = PlayerApi & SourcesApi<SourceApi>;

const player = Player({
  key: 'YOUR-PLAYER-KEY',
  defaultContainer: document.getElementById('player-container')
}) as MyApi

player.packages.add(CapabilitiesPackage);
player.packages.add(SegmentProcessingPackage);
player.packages.add(ContainerMp4Package);
player.packages.add(DataPackage);
player.packages.add(NetworkPackage);
player.packages.add(HlsTranslationPackage);
player.packages.add(HlsParsingPackage);
player.packages.add(HlsPackage);
player.packages.add(PresentationPackage);
player.packages.add(SourcePackage);
player.packages.add(AdaptationPackage);
player.packages.add(SourcesApiPackage);
player.packages.add(ViewModePackage);

const sourceConfig = {
  resources: [{
    url: 'https://cdn.bitmovin.com/content/assets/streams-sample-video/tos/m3u8/index.m3u8',
  }]
}

player.sources.add(sourceConfig);

Bitmovin Player V8 compatibility

To avoid disruption, we have also built a compatibility layer to allow you to use this player as a dropin for v8 - read more about it in our documentation

Package template repository

To find out more about packages and how to build them, please check out our package template repository. It includes examples of packages of various types, and also functions as a package build system.