HTML-5-Media als Standard und bei Opera und Gecko (Mozilla) (20111216) ====================================================================== Der HTML-5-Standard ist nicht ausgereift, scheint aber Kontinuität zu haben. Unter http://www.whatwg.org/specs/web-apps/current-work/ ist die aktuelle Dokumentation zu finden, die es NICHT als PDF gibt. Angeboten wird ein HTML-Dokument mit allen Angaben (single page), so dass der Leser sich selbst eine PDF erstellen kann. Angeboten wird eine Verkettung von HTML-Dokumenten (multi-pages), so dass der Leser in Teilen eine PDF erstellen kann. Angeboten wird nicht PDF, weder als Ganzheit noch in Teilen. Eine Übersicht in Englisch ist zu finden per http://www.html5rocks.com/en/tutorials/video/basics/ Der Microsoft Internet Explorer ist erst sein der Version 9 voll HTML-5-mediafähig, wenn zusätzlich Codec-Plugins für HTML-5-Media installiert wurden. Opera und Gecko bringen Codecs im Browser mit (WebM, ogg, oga,ogv etc.). Daher haben diese Browser einen implementierten HTML-5-Player und das schon erheblich länger, als Microsoft HTML-5-Media im IE eingebeaut hat. Wer seinen Browser auf Medienwiedergabe testen will, nutze z.B. die Webseite in Deutsch http://www.asdala.de/netz/html/video.html HTML-5-Media wird von den Browser-Herstellern nicht einheitlich implementiert. Die Vorgaben des HTML-5-Standards werden abgeändert und somit inkompatibel zu Konkurrenzbrowsern. Zusätzlich ist die GUI des browsereigenen HTML-5-Mediaplayers nicht kompatibel z.B. zwischen Opera und Gecko (Mozilla). Das schliesst die Javascriptansteuerung ein. siehe z.B. https://developer.mozilla.org/en/Using_HTML5_audio_and_video https://developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements offeriert eine Übersicht "Media formats supported by the audio and video elements" in Englisch - aus Sicht des Gecko. Microsoft hat grundsätzlich eigene Versionen zu HTML, die sich nicht zwingend an den Standard halten müssen, sondern diesen erweitern. VIDEO-Tag-Beschreibung http://msdn.microsoft.com/en-us/library/ff975073(v=VS.85).aspx AUDIO-Tag-Beschreibung http://msdn.microsoft.com/en-us/library/ff975061(v=vs.85).aspx Anstelle dieser Offerten hätten Browserhersteller sich einigen können, per HTML-Elemente wie Pulldown per SELECT oder OPTION einen Player mit CD-Player-Buttons und Playliste einzubauen, so dass genormte Funktionalität im HTML-5-Media-Bereich vorliegt, der HTML-5-Standard ist - zumindest für Desktop-Computer. Dieser Ansatz wurde nicht realisiert. Vielmehr gibt es eine Unmenge von Speziallösungen, die sich ev. am Standard orientieren. Es gibt diverse Anbieter, die HTML-5-Media per Bibliotheken in Javascript anbieten. Diese Anbeiter rennen den Veränderungen des HTML-5-Standards und den Abweichungen der Brwoserhersteller und den Verschiedeneheiten bei Mobil Phones und deren Betriebssysteme bzw. Laufzeitsysteme. Die Offerten sind z.T. umfangreich, wirken überladen und kompliziert. Der Nutzer der Bibliothelen muss Updates ständig überwachen. Bilbiotheken sind auch im Einsatzgebiet spezialisert, z.B. für Joomla oder Wordpress. Es gibt also viele Offerten, die Javascript extensiv und spezifisch nutzen, da es in HTML-5-Standard keine HTML-5-Player gibt, der mit HTML-Standardelementen eine GUI hat, die CD-Player-Controls und Playliste offerieren und deren Funktionalität bereits im HTML-5, also im Browser einebaut ist - zumindest für Desktop-Computer. Die Unübersichtlichkeit bei HTML-5-Media nutzen auch Hersteller wie Adobe und Microsoft, um ihre (Payware-)Produkte zu platzieren z.B. per Adobe-Air und Microsoft-Silverlight, wobei gerade Microsoft HTML-5 gegen das eigene Silverlight ausspielt - je nach Verwertbarkeit. Der Bereich Oracle-Java wird schon länger mit HTML-5-Media abgedeckt (als Java noch zu Sun gehörte). Als gemeinsamer Nenner für den Vergleich mit dem Standard ist NUR der Opera-Browser nutzbar, da dieser HTML-5-Media konsistent fortschreibt. Was im Opera läuft, kann im Firefox eingeschränkt sein oder fehlern. Aber Opera bedient die HTML-5-Standards konsequenter (auch schnell und zunehmend fehlerfrei). Das Thema der Erzeugung von HTML-5-Media Video und Audio wie WebM und OGA wird nachfolgend nicht behandelt. Aber auch da gilt: Es gibt etliche Softwaren-Offerten von Freeware z.B. von FFMpeg bis zu Payware z.B. von Adobe. Nachfolgend Angaben nur für die Attribute der HTML-5-Elemente VIDEO und AUDIO zum Standard, Opera und Gecko. Alle Angaben sind in Englisch. Hinweis: Wer Webseiten im HTML-5-Standard erstellt, nutze und ziwngend CSS-Klassen bzw. Anagben im STYLE-Attribut. z.B. muss in HTML 5 ersetzt werden durch .... CSS-Kodierung ist allerdings z.T. aufwändig und bläht den Quellcode auf, so dass man HTML-Code packen sollte (nach dem alle Kommentare entfern wurden) z.B. mit HTML-SourceTighter. Als CSS-Cecker empfielt sich CSS HTML Validator ab Version 11 http://www.htmlvalidator.com/ . 1. HTML-5-Media-Standard ------------------------------ http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#video http://www.whatwg.org/specs/web-apps/current-work/multipage/the-video-element.html#audio Video - - - src poster preload autoplay loop muted controls width height Audio - - - src nicht poster preload autoplay loop muted nicht width nicht height controls Gecko Mozilla ------------- https://developer.mozilla.org/en/HTML/Element/video https://developer.mozilla.org/en/HTML/Element/audio Video - - - autoplay A Boolean attribute; if specified, the video will automatically begin to play back as soon as it can do so without stopping to finish loading the data. autobuffer Non-standard AND Obsolete A Boolean attribute; if specified, the video will automatically begin buffering even if it's not set to automatically play. This should be used for cases in which it is considered likely that the video will be played (for example, if the user navigated to the page specifically to play the video, not if there happens to be a video embedded along with other content). The video is buffered until the media cache is full. Implementation note: though part of the early drafts of the HTML5 specification, the autobuffer attribute has been removed in later releases. It has been removed from Gecko 2.0 and other browsers, and never implemented in some. The spec defines a new enumerated attribute, preload, to replace the autobuffer attribute, with a different syntax. bug 548523 buffered A Boolean attribute; An attribute you can read to determine which time ranges of the media have been buffered. This attribute contains a TimeRanges object. controls A Boolean attribute; If this attribute is present, Gecko will offer controls to allow the user to control video playback, including volume, seeking, and pause/resume playback. height The height of the video's display area, in CSS pixels. loop A Boolean attribute; if specified, we will, upon reaching the end of the video, automatically seek back to the start. muted A Boolean attribute which indicates the default setting of the audio contained in the video. If set, the audio will be initially silenced. Its default value is false, meaning that the audio will be played when the video is played. preload This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values: none: hints that either the author thinks that the user won't need to consult that video or that the server wants to minimize its traffic; in others terms this hint indicates that the video should not be cached. metadata: hints that though the author thinks that the user won't need to consult that video, fetching the metadata (e.g. length) is reasonable. auto: hints that the user needs have priority; in others terms this hint indicated that, if needed, the whole video could be downloaded, even if the user is not expected to use it. the empty string: which is a synonym of the auto value. If not set, its default value is browser-defined (i.e. each browser can choose its own default value), though the spec advises it to be set to metadata. Usage notes: The autoplay attribute has precedence over this one as if one wants to automatically play a video, the browser will obviously need to download it. Setting both the autoplay and the preload attributes is allowed by the specification. The browser is not forced by the specification to follow the value of this attribute; it is a mere hint. poster A URL indicating a poster frame to show until the user plays or seeks. If this attribute isn't specified, nothing is displayed until the first frame is available; then the first frame is displayed as the poster frame. src The URL of the video to embed. This is optional; you may instead use the element within the video block to specify the video to embed. width The width of the video's display area, in CSS pixels. Time offsets are currently specified as a float value representing the number of seconds to offset. Note: The time offset value definition has not yet been completed in the HTML 5 specification and is subject to change. Audio - - - autoplay A Boolean attribute; if specified (even if the value is "false"!), the audio will automatically begin to play back as soon as it can do so without stopping to finish loading the data. autobuffer Non-standard AND Obsolete A Boolean attribute; if specified, the audio will automatically begin being downloaded, even if not set to automatically play. This continues until the media cache is full, or the entire audio file has been downloaded, whichever comes first. This should only be used when it is expected that the user will choose to play the audio; for example, if the user has navigated to a page using a "Play this audio" link. This attribute was removed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) in favor of the preload attribute. buffered An attribute you can read to determine which time ranges of the media have been buffered. This attribute contains a TimeRanges object. controls If this attribute is present, the browser will offer controls to allow the user to control audio playback, including volume, seeking, and pause/resume playback. loop A Boolean attribute; if specified, we will, upon reaching the end of the audio, automatically seek back to the start. mozCurrentSampleOffset Requires Gecko 2.0 Non-standard The offset, specified as the number of samples since the beginning of the audio stream, at which the audio is currently playing. preload This enumerated attribute is intended to provide a hint to the browser about what the author thinks will lead to the best user experience. It may have one of the following values: none: hints that either the author thinks that the user won't need to consult that video or that the server wants to minimize its traffic; in others terms this hint indicates that the video should not be cached; metadata: hints that though the author thinks that the user won't need to consult that video, fetching the metadata (e.g. length) is reasonable; auto: hints that the user needs have priority; in others terms this hint indicated that, if needed, the whole video could be downloaded, even if the user is not expected to use it; the empty string: which is a synonym of the auto value. If not set, its default value is browser-defined (i.e. each browser can choose its own default value), though the spec advises it to be set to metadata. Usage notes: The autoplay attribute has precedence over this one as if one wants to automatically play a video, the browser will obviously need to download it. Setting both the autoplay and the preload attributes is allowed by the specification. The browser is not forced by the specification to follow the value of this attribute; it is a mere hint. src The URL of the audio to embed. This is subject to HTTP access controls. This is optional; you may instead use the source element within the audio block to specify the audio to embed. Time offsets are specified as float values indicating the number of seconds to offset. Note: The time offset value definition has not yet been completed in the HTML5 specification and is subject to change. Opera ----- http://dev.opera.com/articles/view/introduction-html5-video/