我无法使用Angular播放Azure Media Services视频。我有一个简单的html页面,可以正常工作:
组件代码:
import { Component, ElementRef, OnInit } from '@angular/core'; @Component({ moduleId: module.id, selector: 'my-azure-media-player', templateUrl: 'azure-media-player.component.html' }) export class AzureMediaPlayerComponent implements OnInit { constructor(private elRef: ElementRef) {} ngOnInit(): void { var myPlayer = amp('vid1'); console.log(myPlayer.currentTechName()); myPlayer.autoplay(true); myPlayer.controls(true); myPlayer.src({ type: "application/vnd.ms-sstr+xml", src: "//amssamples.streaming.mediaservices.windows.net/91492735-c523-432b-ba01-faba6c2206a2/AzureMediaServicesPromo.ism/manifest" }); } }
从这里您可以播放设置。