Hello, I am developing a simple app to show facebook posts from a given user, in overall it is working great, however I am having real troubles trying to embed the posts videos in my app, the worst thing is my current implementation WORKS from time to time without any change or modification.
My current implementation (using the new facebook (v2.3) method to embed videos) is as follows:
<div class="fb-video" data-href="{{ getVideo(item.link) }}" data-width="560" data-allowfullscreen="true"></div>
Where “getVideo” is defined in my controller as:
$scope.getVideo = function(link) {
return $sce.trustAsResourceUrl(link);
};
this is rendered using a list template.
Worth note I have tried using a iframe to embed it, and while it works in a more consistent way, the result is not optimal because the video show only a cropped image of it until the user plays the video…
I appreciate any help about this trouble.
EDIT: I been digging in this issue, and would like to add that in my tests the issue arise when the video is embedded inside a dynamic template (ex: an ng-repeat list), if I post the exact same code outside the collection, it works as expected.