2 Replies Latest reply on Mar 7, 2016 7:47 AM by M Web Dev

    Embed mp4 video progressive downloaded using canvas.

    M Web Dev

      I was able to use the following code and load a video from my server:


      var video: Video;
      var connect_nc: NetConnection = new NetConnection();
      var stream_ns: NetStream = new NetStream(connect_nc);
      stream_ns.client = this;


      I was able to explort a Flash (swf) project just fine and load an external video.

      When I tried this in a canvas (html5) project code didn't work. Javascript threw errors.

        • 1. Re: Embed mp4 video progressive downloaded using canvas.
          Nipun Asthana Adobe Employee

          Hi Michael,

          The code you're using is Actionscript and will not work in HTML5 Canvas documents (which is based on HTML5 and Javascript)

          You may want to checkout HTML5 video tag instead.

          • 2. Re: Embed mp4 video progressive downloaded using canvas.
            M Web Dev Level 1

            I am a Full Stack developer who is working on a project for a client who wants to use Animate CC and port her website from Edge Animate (div/css based animation) .


            I have 2 questions then.


            1) How do i know which code works in Animate (canvas export ECMAscript)  and which code is only Actionscript ? 


            2) Can I refer in animate to external libraries or outside the canvas? there are dozens of js libraries like jquery and the DOM i would like to manipulate.


            Last question is that the clients old site was made up a dozens of animations, actions and embedded streamed videos.  Edge animate seems to have come to the end of support.  Animate CC seemed like a great solution to have an animated website but the last part of the puzzle is how to embed videos (youtube,vimeo, custom CDN) . 


            One idea I had is to make an external call from the canvas and a  div outside the canvas and embed the video invite and move it in place with CSS positioning.