embed audio of youtube playlist - audio

I use the following code to embed youtube video's and just show the controls so it only plays the audio:
<object height="25" width="610"><param name="movie" value="http://www.youtube.com/v/-YhQ7BetDdM&hl=en_US&color1=0xf4f4f4&color2=0xffffff&hd=0&fs=0">
</param>
<param name="allowFullScreen" value="true">
</param>
<param name="allowscriptaccess" value="always">
</param>
<embed src="http://www.youtube.com/v/-YhQ7BetDdM&hl=en_US&color1=0xf4f4f4&color2=0xffffff&hd=0&fs=0" height="25" width="610" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always"> </embed>
</object>
I am wondering how to do the same thing but with a playlist of videos? I only want the controls to show.

I think this could be what you wanted link ->
The website
what you need is:
`<div style="position:relative;width:267px;height:25px;overflow:hidden;">
<div style="position:absolute;top:-276px;left:-5px">
<iframe width="300" height="300"
src="https://www.youtube.com/embed/youtubeID?rel=0">
</iframe>
</div>
</div>
`

Related

play swf file with parts online

i have some old flash games.
They contains:
a .swf file
a folder with files with type 'File'
when i use following code it runs locally but when i upload it on my server online then it doesn't work.
<object type="application/x-shockwave-flash" data="race.swf" id="histo2" style="width:100%; height:100%;float: none; vertical-align:middle">
<param name="movie" value="race.swf" />
<param name="allowfullscreen" value="true" />
<param name="allowScriptAccess" value="always" /><!-- sameDomain -->
<param name="wmode" value="opaque" />
<param name="quality" value="high" />
<param name="menu" value="false" />
<div class="outer">
<div class="middle">
<div class="inner">
<h3>Click below button to enable flash player or to install it.</h3>
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" />
</a>
</div>
</div>
</div>
</object>

Hot to apply a loading text before the video-streaming begins

I am working in a project for the front-side.
We have a flash player showing a live video game from external. We have the access by api provided from a third part.
Everything works fine but the big issue now is how to display a simple text "loading" before the stream video starts, this is very necessary because the video delays a bit at the beginning.
I am newbie on it and have made a big search to find something helpful.
I have found a good documentation here and in this page explaining well to how to get external content into my SWF file. But my question is how can i edit my The FlashVars parameter of the HTML when the data is provided by an api?
<div id="flashContent">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="550" height="400" id="FlashVars_AS2" align="middle">
<param name="movie" value="FlashVars_AS3.swf">
<param name="quality" value="high">
<param name="bgcolor" value="#ffff66">
<param name="play" value="true">
<param name="loop" value="true">
<param name="wmode" value="window">
<param name="scale" value="showall">
<param name="menu" value="true">
<param name="devicefont" value="false">
<param name="salign" value="">
<param name="allowScriptAccess" value="sameDomain">
<param name="FlashVars" value="myVariable=Hello%20World&mySecondVariable=Goodbye">
<!--[if !IE]>-->
<object type="application/x-shockwave-flash" data="FlashVars_AS3.swf" width="550" height="400">
<param name="movie" value="FlashVars_AS2.swf">
<param name="quality" value="high">
<param name="bgcolor" value="#ffff66">
<param name="play" value="true">
<param name="loop" value="true">
<param name="wmode" value="window">
<param name="scale" value="showall">
<param name="menu" value="true">
<param name="devicefont" value="false">
<param name="salign" value="">
<param name="allowScriptAccess" value="sameDomain">
<param name="FlashVars" value="myVariable=Hello%20World&mySecondVariable=Goodbye">
<!--<![endif]-->
<a href="http://www.adobe.com/go/getflash">
<img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player">
</a>
<!--[if !IE]>-->
</object>
<!--<![endif]-->
</object>
</div>
Thus is the code used by example in the Adobe documentation but i can work on it if my data is provided from a third part and it's not a swf?
Hope my explanation is clear and sorry if it's not because i am not expert on it.
Good examples and different solutions are very welcome too
thanks
you should handle NetStatusEvent of your NetStream in video-player
someFunctionShowingLoadingMessage();
stream.addEventListener(NetStatusEvent.NET_STATUS, streamStatusHandler);
private function streamStatusHandler(event:NetStatusEvent):void {
switch (event.info.code) {
case "NetConnection.Connect.Success":
break;
case "NetStream.Play.Start":
break;
case "NetStream.Buffer.Full":
// buffer is full and we may show video
// and hide our simple text "loading..."
break;
case "NetStream.Play.Stop":
break;
case "NetStream.Play.StreamNotFound":
break;
}
}

Can't display .swf files on a page with httpHandler

Read the last EDIT, please.
I have a page in which I should display some media data.
For this I'm using html tag, like this:
<object type="video/x-ms-wmv" width="320" height="240">
<param name="src" value="some_media_url" />
<param name="AutoSize" value="true">
<param name="ShowDisplay" value="false">
<param name="AutoStart" value="false">
<param name="StretchToFit" value="true">
<param name="bgcolor" value="#ffffff" />
</object>
In my case, I should get media data from SQL server by some MediaHandler.ashx http handler.
When I get an audio(.mp3, .wma) or video(.flv, .mp4) stream this works fine.
But I'm getting some problems with .swf flash files.
For this type of files I change <object> type to be "application/x-shockwave-flash". In this case when I use some remote path, like http://www.tizag.com/pics/example.swf, it works fine:
<object type="application/x-shockwave-flash" width="320" height="240">
<param name="src" value='http://www.tizag.com/pics/example.swf' />
<param name="AutoSize" value="true">
<param name="ShowDisplay" value="false">
<param name="AutoStart" value="false">
<param name="StretchToFit" value="true">
</object>
But, it doesn't work with my handler. It neither works with local paths,like "c:\videos\example.swf"
Any idea?
EDIT: Actually src for media looks like this:
<object type="video/x-ms-wmv" width="320" height="240">
<param name="src" value="http://localhost:11111/MediaHandler.ashx?Id=1111" />
<param name="AutoSize" value="true">
<param name="ShowDisplay" value="false">
<param name="AutoStart" value="false">
<param name="StretchToFit" value="true">
<param name="bgcolor" value="#ffffff" />
</object>
EDIT:
This works fine, if I directly refer to an existing file:
<object type="application/x-shockwave-flash" width="320" height="240">
<param name="src" value="/videos/ETFflash1016.swf" />
<param name="AutoSize" value="true">
<param name="ShowDisplay" value="false">
<param name="AutoStart" value="true">
<param name="StretchToFit" value="true">
</object>
But when I use httpHandler to get file from DB:
<object type="application/x-shockwave-flash" width="320" height="240">
<param name="src" value="http://localhost:57031/MediaHandler.ashx?Id=512429" />
<param name="AutoSize" value="true">
<param name="ShowDisplay" value="false">
<param name="AutoStart" value="true">
<param name="StretchToFit" value="true">
</object>
flash is not displayed.
I've compared the output html for these cases, they're the same in both cases (except src param value). Fiddler shows the same result for both requests for .swf file and the browser shows(e.g. in IE dev tool's Netwok tab) that the file was downloaded to client in both cases.
BUT in the case with the handler, flash is not being displayed.
Fiddler shows the same result for both requests for .swf file
In Fiddler, Response Headers, do both the local file and ASHX handler return the same Content-Type: application/x-shockwave-flash ?
try this:
<object type="application/x-shockwave-flash" data="file.swf" style="width:640px;height:480px;margin:10px 36px;">
<param name="movie" value="file.swf" />
<param name="AutoSize" value="true">
<param name="ShowDisplay" value="false">
<param name="AutoStart" value="false">
<param name="StretchToFit" value="true">
<param name="bgcolor" value="#ffffff" />
</object>
it worked for me
I've solved it!
In the handler, I was setting Response Header's parameters the same values as they were in the case with directly referring to an existing file.
Now, I just removed all this values, and it works!
I still can't understand why, but it works :)

how to make audio autoplay

I'd like an audio file to play automatically when I open the page.
Here's the code:
<object width="290" height="24" data="http://localhost/placement/theme/anomaly/sound/player.swf" type="application/x-shockwave-flash" id="audioplayer1">
<param name="movie" value="/placement/theme/anomaly/sound/player.swf" />
<param name="FlashVars" value="playerID=1&bg=0xCDDFF3&leftbg=0x357DCE&lefticon=0xF2F2F2&rightbg=0xE66511&rightbghover=0xEF9C10&righticon=0xF2F2F2&righticonhover=0xFFFFFF&text=0x357DCE&slider=0x357DCE&track=0xFFFFFF&border=0xFFFFFF&loader=0xAF2910&soundFile=/placement/theme/anomaly/sound/2.mp3" />
<param name="quality" value="high" />
<param name="menu" value="false" />
<param name="wmode" value="transparent" />
I tried to add the following line:
<param value="true" name="autoplay" />
but it doesn't work. Please help me.
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="590" height="475" ID="Captivate1">
<param name="movie" value="untitled_skin.swf">
<param name="quality" value="high">
<param name="loop" value="0">
<param name="play" value="false">
<embed src="untitled_skin.swf" width="590" height="475" loop="0" quality="high" pluginspage="http://www.adobe.com/go/getflashplayer" type="application/x-shockwave-flash" play="false" flashvars="autoplay=false&play=false" menu="false"></embed>
</object>

Windows Media player object z-index

What makes windows media player layer over my drop menu page elements? It doesn't seem to help if I change the z-index for the media player object. I have a z-index of 99 for my drop down menu page elements and of 40 for the object. This problem only happens when the video is running. When it isn't running the drop down menu elements show on top of the object. Here is the HTML.
<div id="player" style="position: relative; top: 20px; left: 35px; width: 64.5%; border: 2px solid grey; z-index: 40;">
<object id="MediaPlayer" width="100%" height="377" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" style="left: 0px; top: 0px; background-repeat: no-repeat; background-position: center center; z-index: 40;" type="application/x-oleobject">
<param name="uiMode" value="full" />
<param name="AutoStart" value="FALSE" />
<param name="AllowChangeDisplaySize" value="TRUE" />
<param name="AutoSize" value="TRUE" />
<param name="Volume" value="100" />
<param name="URL" value=mms://bstreamlivewm.fplive.net/bstreamlive-live/bstream2 />
<embed type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" name="MediaPlayer" src=mms://bstreamlivewm.fplive.net/bstreamlive-live/bstream2 width="100%" height="377" showcontrols="1" showtracker="1" autostart="0" volume="100" />
</object>
</div>
What worked for me was <param name="windowlessVideo" value="true" > in the <object> tag and windowlessVideo="true" in the <embed> tag. I did not have to specify the wmode parameter. Here is the HTML that worked.
<object id="MediaPlayer" width="100%" height="377" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" style="left: 0px; top: 0px;
background-repeat: no-repeat; background-position: center center;" type="application/x-oleobject">
<param name="uiMode" value="full" />
<param name="AutoStart" value="FALSE" />
<param name="AllowChangeDisplaySize" value="TRUE" />
<param name="AutoSize" value="TRUE" />
<param name="Volume" value="100" />
<param name="URL" value=mms://bstreamlivewm.fplive.net/bstreamlive-live/bstream2 />
<!-- Be careful with opaque. The adobe documentation isn't clear about what it does for layering -->
<!-- Documentation about OBJECT and EMBED at http://kb2.adobe.com/cps/127/tn_12701.html -->
<!-- param name="wmode" value="opaque" / -->
<param name="windowlessVideo" value="true" />
<embed windowlessVideo="true" type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/"
name="MediaPlayer" src=mms://bstreamlivewm.fplive.net/bstreamlive-live/bstream2 width="100%" height="377" showcontrols="1"
showtracker="1" autostart="0" volume="100" />
</object>
None of these work for Google Chrome. ASP menus always go to the background when a windows media player is involved.
Try looking into the wmode param,http://slightlymore.co.uk/flash-and-the-z-index-problem-solved/

Resources