videogular2
Version:
Videogular is a video application framework for desktop and mobile powered by Angular 2.0
59 lines (47 loc) • 1.23 kB
Markdown
Component to stream with DASH an `mpd` file.
You can combine `VgDASH` and `VgHLS` together. If you pass a VOD file (that means, not HLS or DASH) it will fallback to the native video implementation.
In this example you can pass either an `mpd`, `m3u8` or `mp4` file.
```html
<vg-player>
<video #media
[vgMedia]="media"
[]="currentStream"
[]="currentStream"
id="singleVideo"
controls
crossorigin>
</video>
</vg-player>
```
This module is dependant of `dashjs` library and you need to install via `npm install dashjs --save` and include it on your `.angular-cli.json` config file:
```json
{
...
"apps": [
{
...
"scripts": [
"../node_modules/dashjs/dist/dash.all.min.js"
],
...
}
],
...
}
```
| Input | Description |
|--- |--- |
| vgDash | Url to DASH `mpd` file. |
```html
<vg-player>
<video
[]="'http://static.videogular.com/assets/videos/videogular.mpd'"
id="my-video"
type="video/mp4"
controls>
</video>
</vg-player>
```