Play a video in iframe

5:25 PM


Write the following code :

<iframe width="100%" height="auto" ng-if="video_url" onerror="this.style.display = 'none'" src="{{video_url | VideoUrl}}"></iframe> 
.filter('VideoUrl', ['$sce', function($sce) {
    return function(val) {
        return $sce.trustAsResourceUrl(val);
    };
}])

You Might Also Like

0 comments