@hartmannindustries/azure-media-player

1.0.4 • Public • Published

React Azure Media Player

This package is a React wrapper for Azure Media Player, providing an easy way to integrate the player into React applications.

Install

npm install --save @hartmannindustries/azure-media-player

Usage

import React from 'react';
import { AzureMP } from '@hartmannindustries/azure-media-player';

const Example = () => (
  <AzureMP
     skin="amp-flush"
     src={[
        {
          src: "http://amssamples.streaming.mediaservices.windows.net/91492735-c523-432b-ba01-faba6c2206a2/AzureMediaServicesPromo.ism/manifest", 
          type: "application/vnd.ms-sstr+xml" 
        }
      ]}
   />
)

Playlist

Playlist support

import React from 'react';
import { AzureMP } from '@hartmannindustries/azure-media-player';

const Example = () => (
  <AzureMP
     skin="amp-flush"
     playlist={{
        clips: [
            {
                isAd: false,
                name: 'Clip Name 2',
                offset: 0,
                parent: {
                    name: 'My Clip 2',
                    source: {
                        src: 'http://samplescdn.origin.mediaservices.windows.net/e0e820ec-f6a2-4ea2-afe3-1eed4e06ab2c/AzureMediaServices_Overview.ism/manifest',
                        type: 'application/vnd.ms-sstr+xml',
                    }
                }
            }, {
                isAd: false,
                name: 'Clip Name',
                offset: 0,
                parent: {
                    name: 'My Clip',
                    source: {
                        src: 'http://amssamples.streaming.mediaservices.windows.net/91492735-c523-432b-ba01-faba6c2206a2/AzureMediaServicesPromo.ism/manifest',
                        type: 'application/vnd.ms-sstr+xml'
                    }
                }
            }
        ],
        name: 'My Playlist'
    }}
   />
)

SSR

Supports server-side rendering

/@hartmannindustries/azure-media-player/

    Package Sidebar

    Install

    npm i @hartmannindustries/azure-media-player

    Weekly Downloads

    8

    Version

    1.0.4

    License

    MIT

    Unpacked Size

    108 kB

    Total Files

    5

    Last publish

    Collaborators

    • bogdanm82
    • jacob.hartmannindustries