Reputation: 387
i use angular and video js, when i try to load my video:
<div class="col-md-8" ng-repeat='season in show_detail.season_in_show|filter:seasonbyID'>
<div class="player-block" ng-show='hasSubscription(season)'>
<video id="serial-video" class="video-js" controls="controls" preload="auto" height="450" data-setup='' ng-src="{{season.preview_video}}">
<source ng-src="{{season.preview_video}}" controls="controls" type='video/mp4'>
</video>
</div>
</div>
it happens only if i use ng-repeat
Upvotes: 0
Views: 159
Reputation: 172
Try wrapping while div in another div which contains ng-if make the statement true when all video data has loaded. Your issue could be with the face that dom is rendered before the data gets populated via videojs.
Edit: I'm thinking that your 'season' variable gets populated dynamically. After your data population is done, set a variable for example $scope.dataArrived = true. Then, perform:
<div ng-if="dataArrived">
//your dom code
</div>
Upvotes: 1