Вопрос

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?

Это было полезно?

Решение 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...

Другие советы

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

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top