angularjs - Why does Vimeo iframe flicker when clicking anywhere on the page? -
I have created a simple filter that loads Vimeo iframe
. It's inside a ng-repeat code
everything works fine, except when IFrame flickers whenever I click anywhere on the webpage, every time I get a textarea
Or pressing a key ("keypad") in the Input
area, it's a bit weird because there's nothing else on the page - only iframe
I have a code here:
& lt; Div ng-app = "myApp" & gt; & Lt; Div ng-controller = "myAppCtrl" & gt; & Lt; Div ng-repeat = "item in item" & gt; & Lt; Div id = "{{item.video.code}}" & gt; {{Item.video.code | Vimeo}} & lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; Var myApp = angular.module ('myApp', []); MyApp.filter ('vimeo', function () {return function (vimeoID) {var data = '& lt; iframe src = "http://player.vimeo.com/video/' + vimeoID + '" width = " 360 "height =" 270 "frameborder =" 0 "webkitalloffscreen mozillaoflasklin permitting_screen & gt; & lt; / iframe & gt; $$ ('#' + vimeoID) .html (data);};}); MyApp.controller ("myAppCtrl", function ($ scope) {// sample data var item = [[text: 'hello world', video: {source: 'vimeo', code: '101468694'}}, {text: 'Hello people', video: {source: 'vimeo', code: '35375393'}}] $ scope.items = items;}); Any thoughts on why this is happening?
Comments
Post a Comment