小编nan*_*Bai的帖子

Angular4 - 无法绑定到“vgHls”,因为它不是“视频”的已知属性。

我使用的代码是 angular4,我想显示视频流宽度 videogular2 插件,但错误:

Template parse errors:Can't bind to 'vgHls' since it isn't a known property of 'video'.

应用程序组件.html

<vg-player>
  <video #myMedia
     [vgHls]="'http://static.videogular.com/assets/videos/videogular.m3u8'"
     (onGetBitrates)="hlsBitrates = $event"
     id="my-video"
     type="video/mp4"
     controls>
  </video>
</vg-player>
Run Code Online (Sandbox Code Playgroud)

应用程序模块.ts

import { Component } from '@angular/core';
@Component({
  selector: 'app-root',
  templateUrl: './app.component.html',
  styleUrls: ['./app.component.scss']
})
export class AppComponent {
  title = 'app';
}
Run Code Online (Sandbox Code Playgroud)

video-streaming html5-video angular

5
推荐指数
2
解决办法
2660
查看次数

标签 统计

angular ×1

html5-video ×1

video-streaming ×1