Learn Html

Html Embedding Flash, videos & Music

Html – Video Codes

Videos can be embedded into your html documents (web pages) two different ways. One method is to use the <embed /> tag to display your media file. The embed tag does not require a closing tag. In fact, it works much like the image tag. A src attribute must be defined by the correct URL (local or global) in order for the video file to be displayed correctly. Here is a look at the embed tag with a global URL, feel free to use this URL while you practice.
HTML Code:

<embed src=http://www.example.com/ html/htmlexample.mpeg autostart=”false” />

Mpeg Movie:
You may start and stop your movie files by either pressing the buttons at the bottom of the object or by single clicking (stop) on the object and double clicking your mouse (continue/play).
You may also simply place the URL of your media files into the href attribute of an anchor tag, much like the concept of “thumbnailing” images.
HTML Code:

<a href=”http://www.paktutorial.com/pics/flash/motiontween1easy.swf”> motiontween1easy.swf </a>

Flash Media:
Html – Video Media Types
Flash movies (.swf), AVI’s (.avi), and MOV’s (.mov) file types are supported by the embed tag.
• .swf files – are the file types created by Macromedia’s Flash program.
• .wmv files – are Microsoft’s Window’s Media Video file types.
• .mov files – are Apple’s Quick Time Movie format.
• .mpeg files – set the standard for compression movie files created by the Moving Pictures Expert Group.
The listings above are the most commonly used formats for the internet. “.mpeg” files and Macromedia’s .swf files are the most compact and widely used among the internet. Stick to any of the file types above for use with your web pages.
Html – Embed Attributes
Along with the previously discussed src attribute, there are some unique attributes available to the tag including: volume, autostart, hidden, and loop.
• autostart – controls the media’s ability to start without prompting. Values are true or false.
• hidden – controls whether or not the play/stop/pause embedded object is hidden or not. Values are true or false. (Hide your embeded media if you just want background noise).
• loop – A true value means the media will continuously loop, false means no looping.
• playcount – Setting a playcount means the media will repeat itself x number of times instead of continuously as with the loop attribute above. (playcount=”2″ will repeat the video twice).
• volume – set a numeric value for the loudness of your media. (0-100).

Html – Google Video

Google video has recently gained popularity as a source for sharing movies on the internet. At Google Video it is possible to search for any type of movie. Google allows you to download and display these movies on any of your own html pages.
As you search through videos there Google has provided a text area with an embed tag inside of it. Copy this text area to your own HTML pages to embed Google videos onto your own pages.
HTML Code:

Embedding Youtube Video using Iframe:

Embedding youtube video using Embed Code:

Html Music Codes

Inserting music onto a web page is relatively easy. In the past multiple tags had to be used because browsers did not have a uniform standard for defining embedded media files. However, I am glad to announce that this is a problem of the past and you will have a much easier time then webmasters of the past.

Html Embed

Music is inserted onto a web page with the use of the embed tag. There are other ways to link to music, but embed is now considered the standard for inserting media. Below is an minimalist example of the embed tag using the srcattribute to define the media file’s location.you must have installed window media player plugin to view below video in chrome and mozilla browser.
HTML Code:

<object width=”320″ height=”240″ classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0″><param name=”src” value=”beethoven.mid” /><embed width=”320″ height=”240″ type=”application/x-shockwave-flash” src=”beethoven.mid” /></object>

Above is an embedded media player. To stop the music press stop/pause.

Depending on what kind of media software you or your visitor has installed, the above example will appear slightly different. To make your embedded player display properly change the attributes associated with display.
embed attributes – related to display
To customize the appearance of the embedded media player be sure to set the following attributes.
• width – the width of the media player.
• height – the height of the media player
• hidden – if this value is true then the media player will not be displayed. We recommend using this attribute only if you know that your visitors will not want the option to stop the music that is playing on your web page. (Values are true/false)
HTML Code:

<object width=”360″ height=”165″ classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0″><param name=”src” value=”beethoven.mid” /><embed width=”360″ height=”165″ type=”application/x-shockwave-flash” src=”beethoven.mid” /></object>

Embedded Music:

Usually, you do not want to mess with the width and height of the media player as it can cause the media player to look rather distorted.
embed attributes – related to functionality
To customize the functionality of the embedded media player be sure to set the following attributes.
• autostart – choose if the media file will start automatically
• loop – sets the media file to repeat or not
• volume – set the volume of the media file. The range is 0-100.
HTML Code:

<object width=”320″ height=”240″ classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0″><param name=”src” value=”beethoven.mid” /><param name=”autostart” value=”false” /><param name=”loop” value=”loop” /><param name=”volume” value=”60″ /><embed width=”320″ height=”240″ type=”application/x-shockwave-flash” src=”beethoven.mid” autostart=”false” loop=”loop” volume=”60″ /></object>

Customize Your Code:

Controls Attribute:
The attribute controls sets which controls for the media player will be displayed.
• autostart – choose if the media file will start automatically
• loop – sets the media file to repeat or not
• volume – set the volume of the media file. The range is 0-100.
• Go Back
• Continue
Tips
• Be careful when placing music on your web site. If done poorly, users will be annoyed by the music and will leave your web site
• Only set the hidden attribute if you are certain your visitors will not want to stop the music.
• If you want your music to play over and over again, then be sure to set the loop attribute to true.

DOWNLOAD SOLUTION HERE