1.2.25 • Published 19 days ago

@oplayer/dash v1.2.25

Weekly downloads
-
License
MIT
Repository
-
Last release
19 days ago

oplayer-plugin-dash

npm npm bundle size npm dm jsdelivr

MPEG DASH plugin for oplayer

Install

npm i @oplayer/core @oplayer/dash dashjs
<script src="https://cdn.jsdelivr.net/npm/@oplayer/core@latest/dist/index.min.js"></script>
<!--  dash FIRST  -->
<script src="http://cdn.dashjs.org/latest/dash.all.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@oplayer/dash@latest/dist/index.min.js"></script>

<div id="oplayer" />

<script>
  OPlayer.make('#oplayer', {
    source: {
      src: 'https://dash.akamaized.net/envivio/EnvivioDash3/manifest.mpd',
      poster: 'https://cdn.jsdelivr.net/gh/shiyiya/QI-ABSL@master/o/poster.png'
    }
  })
    .use([ODash()])
    .create()
</script>

Usage

export type Matcher = (video: HTMLVideoElement, source: Source) => boolean

// active inactive
export type Active = (
  instance: MediaPlayerClass,
  library: typeof import('dashjs')
) => void | ((instance: MediaPlayerClass, library: typeof import('dashjs')) => void)

export interface DashPluginOptions {
  matcher?: Matcher
  active?: Active
  /**
   * config for dashjs
   *
   * @type {MediaPlayerSettingClass}
   */
  config?: MediaPlayerSettingClass
  /**
   * enable quality control for the stream, does not apply to the native (iPhone) clients.
   * @default: true
   */
  qualityControl?: boolean
  /**
   *  control how the stream quality is switched. default: immediate
   *  @value immediate: Trigger an immediate quality level switch to new quality level. This will abort the current fragment request if any, flush the whole buffer, and fetch fragment matching with current position and requested quality level.
   *  @value smooth: Trigger a quality level switch for next fragment. This could eventually flush already buffered next fragment.
   */
  qualitySwitch?: 'immediate' | 'smooth'
  /**
   * @default: false
   */
  withBitrate?: boolean
  /**
   * @default: true
   */
  audioControl?: boolean
  /**
   * @default: true
   */
  textControl?: boolean
}
1.2.25

19 days ago

1.2.25-beta.1

1 month ago

1.2.25-beta.0

1 month ago

1.2.24

2 months ago

1.2.23

10 months ago

1.2.20

1 year ago

1.2.21

1 year ago

1.2.22

1 year ago

1.2.20-alpha.0

1 year ago

1.2.20-alpha.1

1 year ago

1.2.20-alpha.2

1 year ago

1.2.0

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.2.6

1 year ago

1.2.4-alpha.0

1 year ago

1.1.7

1 year ago

1.2.5

1 year ago

1.1.6

1 year ago

1.2.4

1 year ago

1.2.3

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.0.56-beta.0

1 year ago

1.0.56-beta.1

1 year ago

1.0.55

1 year ago

1.0.54

1 year ago

1.0.57

1 year ago

1.0.49

2 years ago

1.0.46-beta.2

2 years ago

1.0.46-beta.1

2 years ago

1.0.46-beta.0

2 years ago

1.0.51

2 years ago

1.0.50

2 years ago

1.0.53

2 years ago

1.0.52

2 years ago

1.0.48

2 years ago

1.0.47

2 years ago

1.0.45

2 years ago

1.0.44

2 years ago

1.0.43

2 years ago

1.0.42

2 years ago

1.0.41

2 years ago

1.0.40

2 years ago

1.0.39

2 years ago

1.0.38

2 years ago

1.0.37

2 years ago

1.0.36

2 years ago

1.0.35

2 years ago

1.0.34

2 years ago