Question

I like to add youtube video in videodisplay spark component. i tried this but cant work,

 <s:VideoDisplay id="myVid" autoPlay="true"
                 source="http://www.youtube.com/watch?v=LqNQV3tsX1"
                 height="300" width="400"                        
                     />

Is there any mistake in my code?

Was it helpful?

Solution 2

ok I Got the Answer, I use SWFLoader Instead of VideoDisplay.Here the Code. Here I use Same Youtube URL.

private var url:String = "http://www.youtube.com/v/LqNQV3tsX1Y";

<mx:SWFLoader id="swfLoader"
                  minHeight="390"
                  minWidth="640"
                  source="{url}"
                  bottom="1"
                  left="1"
                  right="1"
                  top="1"
                  autoLoad="true"
                  maintainAspectRatio="true"
                  scaleContent="false"/>

Thanks...

OTHER TIPS

you're pointing source to youtube website, not the video itself. You have to extract real video url first.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top