HTML5 Video Safari/FireFox/Chtome/IE

Das war ein gecachter Request (304). Da steht kein Content-Type dabei. Guck mal was bei einer 200 Antwort steht (strg+f5 lädt in den meisten Browsern Dateien ohne Cache neu).
 
Ich will sehen, was der Server senden (welche Header), wenn du die Videodatei anfragst. Das hast du auch gepostet. Allerdings ist die Videodatei im Cache deines Browsers und der Server hat nur geantwortet "Die Datei in deinem Cache ist noch aktuell" anstatt dir die Datei zu schicken. Ergo fehlt auch der Content-Type Header, um den es hier geht. Um deinen Browser zu zwingen die Datei vom Server neu anzufragen, kannst du strg+F5 drücken oder du musst den Cache deines Browsers kurz deaktivieren.
 
ich hoffe das ist das was du brauchst, weil sonst weil ich nicht was ich weiter machen soll / kann
Code:
GET /html5/index.html HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Cookie: mf_user=1; __utma=48489974.1210609403.1326804483.1326804483.1326804483.1; __utmz=48489974.1326804483.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); style=normal
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.1 200 OK
Date: Tue, 21 Feb 2012 12:55:00 GMT
Server: Apache
Last-Modified: Tue, 21 Feb 2012 12:52:23 GMT
Etag: "d68e9-44d-4b978e1d6afc0"
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 523
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
----------------------------------------------------------
http://xxx/html5/video.webm

GET /html5/video.webm HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Connection: keep-alive
Range: bytes=0-
Referer: http://xxx/html5/index.html
Cookie: mf_user=1; __utma=48489974.1210609403.1326804483.1326804483.1326804483.1; __utmz=48489974.1326804483.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); style=normal
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.1 206 Partial Content
Date: Tue, 21 Feb 2012 12:55:01 GMT
Server: Apache
Last-Modified: Tue, 14 Feb 2012 11:35:12 GMT
Etag: "d68e7-8d673d-4b8eafceb9c00"
Accept-Ranges: bytes
Content-Length: 9267005
Content-Range: bytes 0-9267004/9267005
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: text/plain
----------------------------------------------------------
http://xxx/html5/video.ogv

GET /html5/video.ogv HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Connection: keep-alive
Range: bytes=0-
Referer: http://xxx/html5/index.html
Cookie: mf_user=1; __utma=48489974.1210609403.1326804483.1326804483.1326804483.1; __utmz=48489974.1326804483.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); style=normal
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.1 206 Partial Content
Date: Tue, 21 Feb 2012 12:55:01 GMT
Server: Apache
Last-Modified: Tue, 14 Feb 2012 15:01:59 GMT
Etag: "d68e5-22c35df-4b8ede06f67c0"
Accept-Ranges: bytes
Content-Length: 36451807
Content-Range: bytes 0-36451806/36451807
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: video/ogg
----------------------------------------------------------
http://xxx/html5/Startbild.png

GET /html5/Startbild.png HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Referer: http://xxx/html5/index.html
Cookie: mf_user=1; __utma=48489974.1210609403.1326804483.1326804483.1326804483.1; __utmz=48489974.1326804483.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); style=normal
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.1 200 OK
Date: Tue, 21 Feb 2012 12:55:01 GMT
Server: Apache
Last-Modified: Fri, 17 Feb 2012 12:24:02 GMT
Etag: "d68e4-3edb5-4b9280515fc80"
Accept-Ranges: bytes
Content-Length: 257461
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: image/png
----------------------------------------------------------
http://xxx/html5/video.ogv

GET /html5/video.ogv HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Connection: keep-alive
Range: bytes=36438016-
Referer: http://xxx/html5/index.html
Cookie: mf_user=1; __utma=48489974.1210609403.1326804483.1326804483.1326804483.1; __utmz=48489974.1326804483.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); style=normal
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.1 206 Partial Content
Date: Tue, 21 Feb 2012 12:55:01 GMT
Server: Apache
Last-Modified: Tue, 14 Feb 2012 15:01:59 GMT
Etag: "d68e5-22c35df-4b8ede06f67c0"
Accept-Ranges: bytes
Content-Length: 13791
Content-Range: bytes 36438016-36451806/36451807
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: video/ogg
----------------------------------------------------------
http://xxx/html5/video.ogv

GET /html5/video.ogv HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Connection: keep-alive
Range: bytes=786432-
Referer: http://xxx/html5/index.html
Cookie: mf_user=1; __utma=48489974.1210609403.1326804483.1326804483.1326804483.1; __utmz=48489974.1326804483.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); style=normal
Pragma: no-cache
Cache-Control: no-cache

HTTP/1.1 206 Partial Content
Date: Tue, 21 Feb 2012 12:55:03 GMT
Server: Apache
Last-Modified: Tue, 14 Feb 2012 15:01:59 GMT
Etag: "d68e5-22c35df-4b8ede06f67c0"
Accept-Ranges: bytes
Content-Length: 35665375
Content-Range: bytes 786432-36451806/36451807
Keep-Alive: timeout=15, max=98
Connection: Keep-Alive
Content-Type: video/ogg
----------------------------------------------------------
http://xxx/html5/video.webm

GET /html5/video.webm HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Connection: keep-alive
Range: bytes=0-
Referer: http://xxx/html5/index.html
Cookie: mf_user=1; __utma=48489974.1210609403.1326804483.1326804483.1326804483.1; __utmz=48489974.1326804483.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); style=normal

HTTP/1.1 206 Partial Content
Date: Tue, 21 Feb 2012 12:55:05 GMT
Server: Apache
Last-Modified: Tue, 14 Feb 2012 11:35:12 GMT
Etag: "d68e7-8d673d-4b8eafceb9c00"
Accept-Ranges: bytes
Content-Length: 9267005
Content-Range: bytes 0-9267004/9267005
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/plain
----------------------------------------------------------
http://xxx/html5/video.ogv

GET /html5/video.ogv HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Connection: keep-alive
Range: bytes=786432-
Referer: http://xxx/html5/index.html
Cookie: mf_user=1; __utma=48489974.1210609403.1326804483.1326804483.1326804483.1; __utmz=48489974.1326804483.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); style=normal
If-Range: "d68e5-22c35df-4b8ede06f67c0"

HTTP/1.1 206 Partial Content
Date: Tue, 21 Feb 2012 12:55:05 GMT
Server: Apache
Last-Modified: Tue, 14 Feb 2012 15:01:59 GMT
Etag: "d68e5-22c35df-4b8ede06f67c0"
Accept-Ranges: bytes
Content-Length: 35665375
Content-Range: bytes 786432-36451806/36451807
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: video/ogg
----------------------------------------------------------
http://xxx/favicon.ico

GET /favicon.ico HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
Cookie: mf_user=1; __utma=48489974.1210609403.1326804483.1326804483.1326804483.1; __utmz=48489974.1326804483.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); style=normal

HTTP/1.1 404 Not found
Date: Tue, 21 Feb 2012 12:55:06 GMT
Server: Apache
X-Powered-By: PHP/5.3.3-7+squeeze3
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 750
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
----------------------------------------------------------
http://xxx/html5/video.ogv

GET /html5/video.ogv HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Connection: keep-alive
Range: bytes=36438016-
Referer: http://xxx/html5/index.html
Cookie: mf_user=1; __utma=48489974.1210609403.1326804483.1326804483.1326804483.1; __utmz=48489974.1326804483.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); style=normal

HTTP/1.1 206 Partial Content
Date: Tue, 21 Feb 2012 12:55:07 GMT
Server: Apache
Last-Modified: Tue, 14 Feb 2012 15:01:59 GMT
Etag: "d68e5-22c35df-4b8ede06f67c0"
Accept-Ranges: bytes
Content-Length: 13791
Content-Range: bytes 36438016-36451806/36451807
Keep-Alive: timeout=15, max=99
Connection: Keep-Alive
Content-Type: video/ogg
----------------------------------------------------------
http://xxx/html5/video.ogv

GET /html5/video.ogv HTTP/1.1
Host: xxx
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20100101 Firefox/10.0.2
Accept: video/webm,video/ogg,video/*;q=0.9,application/ogg;q=0.7,audio/*;q=0.6,*/*;q=0.5
Accept-Language: de-de,de;q=0.8,en-us;q=0.5,en;q=0.3
Connection: keep-alive
Range: bytes=786432-
Referer: http://xxx/html5/index.html
Cookie: mf_user=1; __utma=48489974.1210609403.1326804483.1326804483.1326804483.1; __utmz=48489974.1326804483.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); style=normal

HTTP/1.1 206 Partial Content
Date: Tue, 21 Feb 2012 12:55:08 GMT
Server: Apache
Last-Modified: Tue, 14 Feb 2012 15:01:59 GMT
Etag: "d68e5-22c35df-4b8ede06f67c0"
Accept-Ranges: bytes
Content-Length: 35665375
Content-Range: bytes 786432-36451806/36451807
Keep-Alive: timeout=15, max=98
Connection: Keep-Alive
Content-Type: video/ogg
----------------------------------------------------------
 
Ja, aber da fehlt die Anfrage zur mp4 Datei.

Folgender kann man aber erkennen:

Die .ogv Datei wird als "video/ogg" versendet, was korrekt ist.
Die .webm Datei wird als "text/plain" versendet, was falsch ist.

Für die .mp4 Datei muss es "video/mp4" sein. Jetzt such im Netz danach wie man bei Apache eine Dateiendung mit einem Content-Type (mime) verknüpft. Ich muss jetzt los zum Bus.
 
So das problem wurde gestern Abend gefunden und gelöst!
Es liegte alles an der .htaccess Datei! (also an den Servereinstellungen)

Das Problem war das der Format .webm als ein Textdokument gelesen und ausgegeben wurde anstelle von einen Video!

Zur Sicherheit an alle die vll. das gleiche Problem haben, oder haben werden!

Es gibt zwei Probleme die wir festgestellt haben!

  • Wenn ihr mit Apache Arbeitet erstellt eine datei mit dem Namen .htaccess und legt die datei in den htdocs Ordner
    Der Ihnalt der Datei sollte der Folgende Text sein.
Code:
<IfModule mod_rewrite.c>
  AddType video/ogg .ogv
  AddType video/webm .webm
  AddType video/mp4 .mp4
</IfModule>
  • Wenn Ihr die Safari v. 5.1.2
    Wird euch der FlashPlayer angezeigt zusammen mit der Meldung das
Code:
<p>Ihr Browser Unterstützt kein HTML5</p>
  • Wenn Ihr die Safari v. 5.1 verwendet wird euch das Video im Format .m4v angezeigt, das Format ist Extra für Apfelgeräte
Code:
<source src='video.m4v' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2" '/>
  • So sieht mein Quelltext inzwischen aus
HTML:
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<title>HTML5 Video/Flash Video Demo</title>
</head>
<body>
<center>
<video poster="Startbild.png" preload="auto" width="480" height="272" controls="controls" autobuffer >
        <source src='video.webm' type='video/webm; codecs="vp8, vorbis" '/>
        <source src='video.ogv' type='video/ogg; codecs="theora, vorbis" '/>
		<source src='video.mp4' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2" '/>
        <source src='video.m4v' type='video/mp4; codecs="avc1.42E01E, mp4a.40.2" '/>
        <object id="player" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" name="player" width="480" height="310">
			<!--[if IE]><!--><param name="movie" value="player/player-licensed.swf" /><!--<![endif]-->
			<param name="allowfullscreen" value="true" />
			<param name="allowscriptaccess" value="always" />
			<param name="flashvars" value="file=video.flv&image=Startbild.png" />
			<embed
				type="application/x-shockwave-flash"
				id="player2"
				name="player2"
				src="player/player-licensed.swf"
				width="360"
				height="308"
				allowscriptaccess="always"
				allowfullscreen="true"
				flashvars="file=video.flv&image=Startbild.png"
			/>
		</object>
        <p>Ihr Browser Unterstützt kein HTML5</p>
</video>
</center>
</body>
</html>


Somit ist der Post geschlossen.
Wenn was schreibt weiter hier rein oder erstellt einen neuen Post.

Gruß Aleks
 

Neue Beiträge

Zurück