Example:HTML5video

Aus FB-Wiki
Wechseln zu: Navigation, Suche

Usage

Typical usage is:

<source lang="php">

 

</source>


In this case, 640 is the video width in pixels, 480 is the video height in pixels, autoplay is set for immediate start, and the name of video file is "Blue_Whale" (with no extension). It is important that 1) you do not add the file extension (e.g. .mp4, .ogv or .webm) because the program automatically selects the correct file extension, and 2) there cannot be any spaces on either side of the file name. The allowable arguments are:

Argument Value Default Value Notes
height pixels 240
width pixels 320
autoplay true or false false
type HTML5 or youtube HTML5
loop true of false false Only works on HTML5 video (not YouTube video)


If you are using HTML5 video (rather than the YouTube option), note that width can be set as a percentage, in which case the height argument is ignored so that the aspect ratio of the video is maintained. For example, the following code (which can be seen at Where to See Whales ) will play the video clip at 100% width of the available screen:

<source lang="php">

  

</source>


Finally, you can also play YouTube video by setting the type argument to 'youtube' as shown in the following example, where "O2FInaOCqoo" is the YouTube ID of the video:

<source lang="php">

    

</source>