猿问

angular能够获取视频和音频地址,但是不能播放,怎么解决?

使用angular渲染页面时,能够获取`
页面html

<div class="other">

    <img  ng-bind-template="{{store.sub[index].attachment}}" ng-src="{{store.sub[index].attachment|trustAsResourceUrl}}" class="image"/>

    <video  width='100%' height="auto" class="video" controls="controls" autoplay="autoplay">

        <source  ng-bind-template="{{store.sub[index].attachment}}" ng-src="{{store.sub[index].attachment|trustAsResourceUrl}}">

    </video>

    <audio class="audio" width='100%' height="auto" controls="controls" autoplay="autoplay" >

        <source  ng-bind-template="{{store.sub[index].attachment}}" ng-src="{{store.sub[index].attachment|trustAsResourceUrl}}">

    </audio>`

</div>

能够获取到的url地址

![图片描述][1]


慕工程0101907
浏览 1379回答 1
1回答
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答