Media auf Werbserver
====================
Medien werden anhand der Medienbeschreibung per MIME-Typ und des CODECS erkannt.
1. Medieneigenschaften per HTML
------------------------------------
Angaben wie MIME-Type sind in HTML hinterlegbar, wobei nicht jedes HTML-Element, das
Medien anzeigt, auch Attribute für Medieneigenschaften hat.
Beispiel:
This browser is not compatible with HTML 5
Das HTML-Element muss durch ergänzt werden, denn
kennt eben nicht das Attribut type=
2. Browserunterstützung für Medieneigenschaften per HTML-Attribute
-----------------------------------------------------------------------
Die Browser sind z.T. divergent.
Opera reicht eine HTML-Medienbeschreibung aus und kommt sogar
ohne aus (Opera 11.10).
Firefox reicht eine HTML-Medienbeschreibung nicht aus
(Firefox 4x).
3. .htaccess-Datei auf Webserver
-------------------------------------
Reicht dem Browser die HTML-Beschreibung des Mediums nicht aus, dann
zeigt der Browser einfach nichts an.
Man muss also vorher wissen, ob der Browser eine .htaccess-Datei auf dem Webserver benötigt.
Der Firefox 4.x benötigt ZWINGEND diese .htaccess-Datei.
Wer also seine Webseite mit Hilfe des Opera entwickelt hat und ohne .htaccess-Datei
die Video sehen konnte, wird beim Test mit Firefox eine böse Überraschung erleben.
Per .htaccess-Datei liefert der Web Server die Medienbeschreibung mit Dateisuffix.
3.1. Lage der .htaccess auf dem Webserver
- - - - - - - - - - - - - - - - - - - - - - -
Die Datei gehört nur in denjenigen Ordner, der die Medien enthält.
Von der .htaccess werden Unterordner automatisch berücksichtigt.
3.2. Inhalt der .htaccess auf dem Webserver
- - - - - - - - - - - - - - - - - - - - - - -
Die Datei sollte nur Zuordnungen von Mime-Typ und Codecs von denjenigen
Medien haben, die wirklich in dem Ordner (und Unterordner) gemeinsam mit
ihrer .htaccess auf dem Webserver liegen.
Nachfolgend Beispiele für Typen von Daten in einem Container, also nicht als Stream
Synatx typ/container z.B. video/ogg
also Video im Ogg-Container
Zuordnung typ und codec
Die Werte von typ und codecs können zwar in den
Eigenschaften .type
.codecs
des SOURCE-HTML-Elementes hinterlegt sein,
sind aber beim Firefox ohne .htaccess-Datei wirkungslos.
wenn type 'video/ogg' dann ist codecs "theora, vorbis"
betrifft Dateisuffix ogv und umfasst auch das Audio im Video
wenn type 'audio/ogg' dann ist codecs "theora, vorbis"
betrifft Dateisuffixe oga und ogg
wenn type 'video/webm' dann ist codecs "vp8, vorbis"
wenn type 'audio/webm' dann ist codecs "vp8, vorbis"
Webm und Theora nutzen Audio als Vorbis,
nur der Videocodecs unterscheidet sich
Nachfolgend Beispiele für Typen von Daten in Stream, also nicht im Container
Synatx siehe oben
'audio/vorbis' für Audiostream
'video/theora' für Videostram (inklusive Audio)
Die .htaccess enthält als ganz normale ACSCII-Datei pro Zeile genau
1 Zuordung von typ/container zu einem oder mehreren Dateisuffixen.
Wird die Datei per SOURCE-Attribut .src geladen, ermittelt
Firefox aus der .htaccess den typ und codec.
(Der Webserver muss diese Informationen liefern).
Die Zuordung tp/codec zu dateitypen erfolgt allgemein per
AddType typ/codec FILE-EXTENSION [FILE-EXTENSION] ...
z.B.
AddType video/ogg .ogv
AddType audio/ogg .oga .ogg
AddType video/webm .webm
AddType audio/webm .webm
AddType audio/mp4 .mp4 .m4a
AddType video/mp4 .mp4 .m4v
AddType application/x-shockwave-flash .swf
AddType video/x-FLV .flv
AddType audio/mpeg .mp3
AddType audio/wav .wav
AddType audio/midi .mid .midi
AddType application/pdf .pdf
AddType application/zip .zip .7z
Firefox kommt mit streamen per application/octet-stream NICHT klar:
Daten werden nicht vom Server gesendet.
z.B. AddType application/octet-stream .zip .pdf .mp3 .mp4 .ogv .oga .ogg .webm .flv
wobei der Dateisuffix per AddType deklariert worden sein muss.
3.3. Übertragung der .htaccess auf den Webserver
- - - - - - - - - - - - - - - - - - - - - - - - - -
.htaccess muss per FTP ASCII mode übertragen werden (nicht binary).
.htaccess-Dateien sind verzeichnisspezifisch.
Speichern Sie die .htaccess-Datei also nur in demjenigen Verzeichnis ab,
in dem die Mediendateien liegen.
Die .htaccess berücksichtigt immer alle Unterverzeichnisse.
4. Weitere Zuordnungen von typ/codecs zum Dateisuffix
----------------------------------------------------------
AddType text/html .html .htm
AddType text/plain .txt
AddType text/richtext .rtx
AddType text/tab-separated-values .tsv
AddType text/x-setext .etx
AddType text/x-server-parsed-html .shtml .sht
AddType application/macbinhex-40 .hqx
AddType application/netalivelink .nel
AddType application/netalive .net
AddType application/news-message-id
AddType application/news-transmission
AddType application/octet-stream .bin .exe
AddType application/oda .oda
AddType application/pdf .pdf
AddType application/postscript .ai .eps .ps
AddType application/remote-printing
AddType application/rtf .rtf
AddType application/slate
AddType application/zip .zip
AddType application/x-mif .mif
AddType application/wita
AddType application/wordperfect5.1
AddType application/x-csh .csh
AddType application/x-dvi .dvi
AddType application/x-hdf .hdf
AddType application/x-latex .latex
AddType application/x-netcdf .nc .cdf
AddType application/x-sh .sh
AddType application/x-tcl .tcl
AddType application/x-tex .tex
AddType application/x-texinfo .texinfo .texi
AddType application/x-troff .t .tr .roff
AddType application/x-troff-man .man
AddType application/x-troff-me .me
AddType application/x-troff-ms .ms
AddType application/x-wais-source .src
AddType application/x-bcpio .bcpio
AddType application/x-cpio .cpio
AddType application/x-gtar .gtar
AddType application/x-shar .shar
AddType application/x-sv4cpio .sv4cpio
AddType application/x-sv4crc .sv4crc
AddType application/x-tar .tar
AddType application/x-ustar .ustar
AddType application/x-director .dcr
AddType application/x-director .dir
AddType application/x-director .dxr
AddType application/x-onlive .sds
AddType application/x-httpd-cgi .cgi
AddType image/gif .gif .GIF
AddType image/ief .ief
AddType image/jpeg .jpeg .jpg .jpe .JPG
AddType image/tiff .tiff .tif
AddType image/x-cmu-raster .ras
AddType image/x-portable-anymap .pnm
AddType image/x-portable-bitmap .pbm
AddType image/x-portable-graymap .pgm
AddType image/x-portable-pixmap .ppm
AddType image/x-rgb .rgb
AddType image/x-xbitmap .xbm
AddType image/x-xpixmap .xpm
AddType image/x-xwindowdump .xwd
AddType audio/basic .au .snd
AddType audio/x-aiff .aif .aiff .aifc
AddType audio/x-wav .wav
AddType audio/x-pn-realaudio .ram
AddType audio/x-midi .mid
AddType video/mpeg .mpeg .mpg .mpe
AddType video/quicktime .qt .mov
AddType video/x-msvideo .avi
AddType video/x-sgi-movie .movie
AddType message/external-body
AddType message/news
AddType message/partial
AddType message/rfc822
AddType multipart/alternative
AddType multipart/appledouble
AddType multipart/digest
AddType multipart/mixed
AddType multipart/parallel
AddType x-world/x-vrml .wrl
AddType text/css .css
AddType application/x-javascript .js
AddType text/html .html .htm
AddType text/richtext .rtf .rtx
AddType image/svg+xml .svg .svgz
AddType text/plain .txt
AddType text/xsd .xsd
AddType text/xsl .xsl
AddType text/xml .xml
AddType video/asf .asf .asx .wax .wmv .wmx
AddType video/avi .avi
AddType image/bmp .bmp
AddType application/java .class
AddType video/divx .divx
AddType application/msword .doc .docx
AddType application/x-msdownload .exe
AddType image/gif .gif
AddType application/x-gzip .gz .gzip
AddType image/x-icon .ico
AddType image/jpeg .jpg .jpeg .jpe
AddType application/vnd.ms-access .mdb
AddType audio/midi .mid .midi
AddType video/quicktime .mov .qt
AddType audio/mpeg .mp3 .m4a
AddType video/mp4 .mp4 .m4v
AddType video/mpeg .mpeg .mpg .mpe
AddType application/vnd.ms-project .mpp
AddType application/vnd.oasis.opendocument.database .odb
AddType application/vnd.oasis.opendocument.chart .odc
AddType application/vnd.oasis.opendocument.formula .odf
AddType application/vnd.oasis.opendocument.graphics .odg
AddType application/vnd.oasis.opendocument.presentation .odp
AddType application/vnd.oasis.opendocument.spreadsheet .ods
AddType application/vnd.oasis.opendocument.text .odt
AddType audio/ogg .ogg
AddType application/pdf .pdf
AddType image/png .png
AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
AddType audio/x-realaudio .ra .ram
AddType application/x-shockwave-flash .swf
AddType application/x-tar .tar
AddType image/tiff .tif .tiff
AddType audio/wav .wav
AddType audio/wma .wma
AddType application/vnd.ms-write .wri
AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
AddType application/zip .zip