我试图用angularjs显示视频 这是我的代码:
<span class="video-inner" ng-repeat="item in items">
<video id="video-{{item.id}}"
class="video-js vjs-default-skin"
controls
preload="auto"
width="600"
height="200"
data-setup='{
"techOrder": ["vimeo"],
"sources": [
{ "type": "video/vimeo", "src": {{item.video}} }
]
}'>
</video>
</span>
数据:
$scope.items = [
{id: 1, video: "https://vimeo.com/63186969"},
{id: 2, video: "https://vimeo.com/63186969"}
];
这是我使用的示例: https://static.bini.io/cus-videos/ 但它不起作用 我错过了什么?
答案 0 :(得分:0)
我不认为,您需要使用{{}}
:
<video id="video-item.id"
class="video-js vjs-default-skin"
controls
preload="auto"
width="600"
height="200"
data-setup='{
"techOrder": ["vimeo"],
"sources": [{ "type": "video/vimeo",
"src": item.video}]
}'>
</video>