0.14.0 • Published 3 months ago

@mux/mux-audio v0.14.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 months ago

Introduction

<mux-audio></mux-audio> is a Mux-flavored HTML5 audio element.

If you are familiar with using <audio /> + Hls.js in your application, then you'll feel right at home with this web component.

Installation

If you're using npm or yarn, install that way:

Package manager

yarn add @mux/mux-audio

or

npm i @mux/mux-audio

Then, import the library into your application with either import or require:

import '@mux/mux-audio';

or

require('@mux/mux-audio');

CDN option

Alternatively, use the CDN hosted version of this package:

<script src="https://cdn.jsdelivr.net/npm/@mux/mux-audio@0"></script>

If you are using ecmascript modules, you can also load the mux-audio.mjs file with type=module:

<script type="module" src="https://cdn.jsdelivr.net/npm/@mux/mux-audio@0/dist/mux-audio.mjs"></script>

Usage

<mux-audio> has all the same features, benefits and options as <mux-video>. View the documentation for <mux-video> for details.

Advanced: Use with React+TypeScript

Even though we don't (yet!) have our own React version of <mux-audio>, you can still use it in your React app. However, if you're also using TypeScript, make sure you add the following TypeScript definitions, since custom elements (like as <mux-audio>) will not be recognized as Intrinsic Elements:

interface MuxAudioHTMLAttributes<T> extends React.AudioHTMLAttributes<T> {
  debug?: boolean;
  autoplay?: boolean;
}

declare global {
  namespace JSX {
    interface IntrinsicElements {
      'mux-audio': React.DetailedHTMLProps<MuxAudioHTMLAttributes<HTMLAudioElement>, HTMLAudioElement>;
    }
  }
}
0.14.0

3 months ago

0.13.4

4 months ago

0.13.0

8 months ago

0.13.1

6 months ago

0.13.2

6 months ago

0.13.3

5 months ago

0.12.1

9 months ago

0.12.0

9 months ago

0.11.5

10 months ago

0.11.4

10 months ago

0.11.3

11 months ago

0.11.2

1 year ago

0.11.1

1 year ago

0.10.9

1 year ago

0.10.4

2 years ago

0.10.5

2 years ago

0.10.6

1 year ago

0.10.7

1 year ago

0.10.8

1 year ago

0.11.0

1 year ago

0.10.10

1 year ago

0.10.11

1 year ago

0.10.1

2 years ago

0.10.2

2 years ago

0.10.3

2 years ago

0.9.6

2 years ago

0.10.0

2 years ago

0.9.4

2 years ago

0.9.3

2 years ago

0.9.5

2 years ago

0.9.2

2 years ago

0.9.0

2 years ago

0.9.1

2 years ago

0.8.1

2 years ago

0.7.0

2 years ago

0.8.0

2 years ago

0.6.3

2 years ago

0.6.4

2 years ago

0.6.2

2 years ago

0.6.1

2 years ago

0.6.0

3 years ago