videostream

WebJar for videostream

Лицензия

Лицензия

MIT
Категории

Категории

IDE Инструменты разработки
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

videostream
Последняя версия

Последняя версия

2.6.0
Дата

Дата

Тип

Тип

jar
Описание

Описание

videostream
WebJar for videostream
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/jhiesey/videostream

Скачать videostream

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/videostream/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>videostream</artifactId>
    <version>2.6.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/videostream/
implementation 'org.webjars.npm:videostream:2.6.0'
// https://jarcasting.com/artifacts/org.webjars.npm/videostream/
implementation ("org.webjars.npm:videostream:2.6.0")
'org.webjars.npm:videostream:jar:2.6.0'
<dependency org="org.webjars.npm" name="videostream" rev="2.6.0">
  <artifact name="videostream" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='videostream', version='2.6.0')
)
libraryDependencies += "org.webjars.npm" % "videostream" % "2.6.0"
[org.webjars.npm/videostream "2.6.0"]

Зависимости

compile (8)

Идентификатор библиотеки Тип Версия
org.webjars.npm : mediasource jar [2.2.2,3)
org.webjars.npm : mp4-stream jar [2.0.0,3)
org.webjars.npm : pump jar [3.0.0,4)
org.webjars.npm : multistream jar [2.0.2,3)
org.webjars.npm : inherits jar [2.0.1,3)
org.webjars.npm : mp4-box-encoding jar [1.3.0,2)
org.webjars.npm : range-slice-stream jar [2.0.0,3)
org.webjars.npm : binary-search jar [1.3.4,2)

Модули Проекта

Данный проект не имеет модулей.

Videostream

Streams data from a file-like seekable object into a <video> or <audio> node (a HTMLMediaElement). Seeking the media element will request a different byte range from the incoming file-like object.

For now only mp4 files are supported. The goal is to support most files that conform to ISO/IEC 14496-12.

Version 2 is completely rewritten and substantially more robust than the previous version that relied on mp4box.js. The only major regression compared to the previous architecture is that fragmented mp4 files aren't supported. If this is a problem I may add support again at some point.

Support for most other formats will take significant work.

Usage

Videostream just exports a function. Use it like this:

const VideoStream = require('videostream')

const exampleFile = {
  createReadStream (opts) {
    const { start, end } = opts
    // Return a readable stream that provides the bytes
    // between offsets "start" and "end" inclusive
  }
}

const video = document.createElement('video')
const videostream = new VideoStream(exampleFile, video)

video.addEventListener('error', () => {
  // listen for errors on the video/audio element directly
  const errorCode = elem.error
  const detailedError = videostream.detailedError
  // videostream.detailedError will often have a more detailed error message
})

Errors

Handle errors by listening to the 'error' event on the <video> or <audio> tag.

Some (but not all) errors will also cause videostream.detailedError to be set to an error value that has a more informative error message.

License

MIT. Copyright (c) John Hiesey.

Версии библиотеки

Версия
2.6.0