0

I have an angularjs generated html page, and want to embedd a flash video in it.

Problem: the video url is dynamically provided by a backend, so I tried binding it as follows:

<div ng-bind-html="{{my.video.html}}"></div>

Result that gets rendered:

<div ng-bind-html="<object classid="..." codebase="..." flashvideo...><embed type="application/x-shockwave-flash"...>"></div>

But I don't see anything on the page.

If I'd just pase the <object.. html code statically into the webpage, it would work.

So what am I missing when using angularjs?

membersound
  • 81,582
  • 193
  • 585
  • 1,120
  • Refer http://stackoverflow.com/questions/15282859/angular-directive-to-display-flash-via-object-tag-causes-flash-to-attempt-to-l – SANN3 Sep 23 '15 at 11:33
  • @SANN could you give an example how I could include my dynamic flash html content into the directive presented in the referred question? I mean, the solution there presented uses a static `` html template where only the `src` tag is dynamically filled. But for me, the whole html content is dynamic! – membersound Sep 23 '15 at 11:40

1 Answers1

0

This is one way to do.

HTML

<div id="videoDiv"></div>

JS

angular.element(document).ready(function () {
      document.getElementById("videoDiv").innerHTML ='<embed width="100%" height="100%" src="name.swf" type="application/x-shockwave-flash">';
 });
SANN3
  • 9,459
  • 6
  • 61
  • 97