Änderungen

Example:HTML5video

1.779 Bytes hinzugefügt, 14:02, 2. Nov. 2015
Die Seite wurde neu angelegt: „==Usage== Typical usage is: <source lang="php"> <HTML5video width="640" height="480" autoplay="true">Blue_Whale</HTML5video> </source> In this case, 640 i…“
==Usage==
Typical usage is:

<source lang="php">
<HTML5video width="640" height="480" autoplay="true">Blue_Whale</HTML5video>
</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:

{| class="wikitable"
|-
! 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 [http://wheretosee.org/wildlife/Whales Where to See Whales] ) will play the video clip at 100% width of the available screen:

<source lang="php">
<HTML5video width="520" height="320" autoplay="true" loop="true">Blue_Whale</HTML5video>
</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">
<HTML5video type="youtube" width="400" height="300" autoplay="false">O2FInaOCqoo</HTML5video>
</source>



<HTML5video width="520" height="320" autoplay="false">bunny</HTML5video>
Bürokrat, fachreferenten, leitung, Administrator
1.428
Bearbeitungen