I'm trying to display video with angularjs here is my code:
<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>
And data:
$scope.items = [
{id: 1, video: "https://vimeo.com/63186969"},
{id: 2, video: "https://vimeo.com/63186969"}
];
here is example I used: https://static.bini.io/cus-videos/ but it doesn't working what I missed?
I don't think, you need to interpolate it with {{}}
:
<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>
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.