|
|||
HTML5 Frage
Hallo liebe Forumgemeinde,
ich hab ein Anliegen: "Ich versuche über eine Website per http gehostete Videos darzustellen auf einer neuen seite nur mit dem player. Es handelt sich um die Video Formate: .flv, .mp4, .ogg Nun hab Ich über Adobe Flash Pro schon die beide .swf Dateien erstellt und auch die normale HTML Datei. Also Flash läuft nun schonmal. Möchte allerdings allen Betrachtern die Möglichkeit geben meine Videos anzusehn. Somit auch Iphone, Ipad Kunden die eben KEIN Flash haben. Somit kam Ich auf HTML5. Wie schreibe Ich bei HTML5 zu der Flash Programmierung den HTML5 Code so dazu das nicht 2 Player erscheinen und nur eines ausgewählt wird von beidem !? Ich füge nun mal den Code vom HTML vom Flash dazu, da muss irgendwie noch der HTML5 Code dazu HTML-Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"> <head> <title>Unbenannt-15</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css" media="screen"> html, body { height:100%; background-color: #ffffff;} body { margin:0; padding:0; overflow:hidden; } #flashContent { width:100%; height:100%; } </style> </head> <body> <div id="flashContent"> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="819" height="499" id="Unbenannt-15" align="middle"> <param name="movie" value="Unbenannt-15.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="play" value="true" /> <param name="loop" value="true" /> <param name="wmode" value="window" /> <param name="scale" value="showall" /> <param name="menu" value="true" /> <param name="devicefont" value="false" /> <param name="salign" value="" /> <param name="allowScriptAccess" value="sameDomain" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="Unbenannt-15.swf" width="819" height="499"> <param name="movie" value="Unbenannt-15.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="play" value="true" /> <param name="loop" value="true" /> <param name="wmode" value="window" /> <param name="scale" value="showall" /> <param name="menu" value="true" /> <param name="devicefont" value="false" /> <param name="salign" value="" /> <param name="allowScriptAccess" value="sameDomain" /> <!--<![endif]--> <a href="http://www.adobe.com/go/getflash"> <img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash Player" /> </a> <!--[if !IE]>--> </object> <!--<![endif]--> </object> </div> </body> </html> HTML-Code:
<video src="video.ogg" autoplay controls > <video src="video.mp4" type="video/mp4" autoplay controls > Bin am verzweifeln #bitte herzlichst um Hilfe! Ich will es mit Javascript realisieren: HTML-Code:
<SCRIPT LANGUAGE=JavaScript1.1> <!-- var MM_contentVersion = 6; var plugin = (navigator.mimeTypes && navigator.mimeTypes["application/x-shockwave-flash"]) ? navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin : 0; if ( plugin ) { var words = navigator.plugins["Shockwave Flash"].description.split(" "); for (var i = 0; i < words.length; ++i) { if (isNaN(parseInt(words[i]))) continue; var MM_PluginVersion = words[i]; } var MM_FlashCanPlay = MM_PluginVersion >= MM_contentVersion; } else if (navigator.userAgent && navigator.userAgent.indexOf("MSIE")>=0 && (navigator.appVersion.indexOf("Win") != -1)) { document.write('<SCR' + 'IPT LANGUAGE=VBScript\> \n'); //FS hide this from IE4.5 Mac by splitting the tag document.write('on error resume next \n'); document.write('MM_FlashCanPlay = ( IsObject(CreateObject("ShockwaveFlash.ShockwaveFlash." & MM_contentVersion)))\n'); document.write('</SCR' + 'IPT\> \n'); } if ( MM_FlashCanPlay ) { } else{ } //--> </SCRIPT> P.s.: Ich habe Adobe Dreamweaver mit welchem Ich dann die HTML5 Seite anfertigen würde. Geht nur um eine allein mit dem Video stehende Videoseite. Geändert von Html5 (13.04.2012 um 20:02 Uhr) |
Sponsored Links |
|
|||
Zitat:
Dieses Uralt-Script solltest du rückstandslos entfernen.
__________________
Über Internet Explorer 8: Noch bis 8. April 2014 wird der Internet Explorer 6 mit Sicherheitsupdates versorgt. Bereits jetzt kann dieser Browser aber vollständig durch den IE8 ersetzt werden. Ältere Betriebssysteme und Browserversionen werden von Microsoft nicht mehr unterstützt. Auch Programme, die den IE7 benötigen, sind kein Argument gegen IE8, da dieser über entsprechende Kompatibilitätsschichten verfügt. Ab sofort gilt daher der Internet Explorer 8 als vorausgesetzer Mindeststandard. |
Sponsored Links |
|
|||
Danke erstmal für die Antwort!
Vielen Dank! Ist das so koreckt !? Erkennt nun der Browser Systemabhängig welches Video er besser öffnet !? HTML-Code:
<!DOCTYPE HTML> <html> <head> <title>Unbenannt-15</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css" media="screen"> html, body { height:100%; background-color: #ffffff;} body { margin:0; padding:0; overflow:hidden; } #flashContent { width:100%; height:100%; } </style> </head> <body> <div id="flashContent"> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="819" height="499" id="Unbenannt-15" align="middle"> <param name="movie" value="Unbenannt-15.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="play" value="true" /> <param name="loop" value="true" /> <param name="wmode" value="window" /> <param name="scale" value="showall" /> <param name="menu" value="true" /> <param name="devicefont" value="false" /> <param name="salign" value="" /> <param name="allowScriptAccess" value="sameDomain" /> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="Unbenannt-15.swf" width="819" height="499"> <param name="movie" value="Unbenannt-15.swf" /> <param name="quality" value="high" /> <param name="bgcolor" value="#ffffff" /> <param name="play" value="true" /> <param name="loop" value="true" /> <param name="wmode" value="window" /> <param name="scale" value="showall" /> <param name="menu" value="true" /> <param name="devicefont" value="false" /> <param name="salign" value="" /> <param name="allowScriptAccess" value="sameDomain" /> <!--<![endif]--> <video src="Video15.ogg" autoplay controls > <video src="Video15.mp4" type="video/mp4" autoplay controls > <!--[if !IE]>--> </object> <!--<![endif]--> </object> </div> </body> </html> Geändert von Html5 (13.04.2012 um 20:36 Uhr) |
|
|||
Korrekt.
Der Browser versucht zuerst das object-Element darzustellen, misslingt dies, versucht er die darinliegenden Elemente, also das video-Element darzustellen. Kurz: Ja. |
|
|||
Muss ich dazu noch in der .htaccess
HTML-Code:
AddType video/ogg .ogv AddType video/mp4 .mp4 Die aufgerufene HTML5 kommuniziert ja direkt mit dem Browser. Also wenn die Filme im selben Ordner sind müssten Sie ja sowieso erkannt und abgerufen werden. Ich hab hierzu eben etwas gelesen was sich "Flash Fallbackforward nennt: geht hauptsächlich um Plugin Skins für den Player aber behandelt auch das Thema HTML5 und Flash in einer HTML... MediaElement.js - HTML5 video player and audio player with Flash and Silverlight shims Vielen Dank schonmal !!!'DANKESCHÖN |
|
||||
Du kannst es ohne Javascript lösen, das Videoelement kann mehrere Sourceelemente aufnehmen. Für die Flashvariante empfehle ich dir Flashsatay, damit kannst du den Code deutlich kürzer halten.
|
|
|||
Guten Morgen liebe Forumgemeinde
hallo inta, wie sieht sowas denn dann aus !? HTML-Code:
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="400" height="300" id="movie" align=""> <param name="movie" value="movie.swf"> <embed src="movie.swf" quality="high" width="400" height="300" name="movie" align="" type="application/x-shockwave-flash" plug inspage="http://www.macromedia.com/go/getflashplayer"> </object> HTML-Code:
<!DOCTYPE HTML> <html> <head> <title>Unbenannt-15</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css" media="screen"> html, body { height:100%; background-color: #ffffff;} body { margin:0; padding:0; overflow:hidden; } #flashContent { width:100%; height:100%; } </style> </head> <body> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com /pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="400" height="300" id="movie" align=""> <param name="movie" value="movie.swf"> <embed src="movie.swf" quality="high" width="400" height="300" name="movie" align="" type="application/x-shockwave-flash" plug inspage="http://www.macromedia.com/go/getflashplayer"> </object> <!--[if !IE]>--> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width="400" height="300" id="movie" align=""> <param name="movie" value="movie.swf"> <embed src="movie.swf" quality="high" width="400" height="300" name="movie" align="" type="application/x-shockwave-flash" plug inspage="http://www.macromedia.com/go/getflashplayer"> </object> <!--<![endif]--> <video src="Video15.ogg" autoplay controls > <video src="Video15.mp4" type="video/mp4" autoplay controls > <!--[if !IE]>--> </object> <!--<![endif]--> </object> </div> </body> </html> Danke und Grüsse, HTML5 |
|
|||
Nein.
Es sieht so aus, dass du den Artikel vollständig lesen und verstehen musst Zitat:
Das funktioniert nicht. Die Inhalte des video-Element sind nur für Browser gedacht, die das video-Element gar nicht unterstützen. Unterstützt der Browser das video-Element, aber nicht das genutzte Format, dann wird lediglich ein Platzhalter angezeigt. |
Sponsored Links |
|
|||
HTML-Code:
<!DOCTYPE HTML> <html> <head> <title>video1</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style type="text/css" media="screen"> html, body { height:100%; background-color: #ffffff;} body { margin:0; padding:0; overflow:hidden; } #flashContent { width:100%; height:100%; } </style> </head> <body> <video width="400" height="300" controls="controls" autoplay="autoplay"> <source src="video-1.mp4" type="video/mp4" /> <source src="video-1.ogg" type="video/ogg" /> <object type="application/x-shockwave-flash" data="secure-video-1.swf" width="400" height="300"> <param name="movie" value="video-1.swf" /> </object> </video> <!--[if !IE]>--> </object> <!--<![endif]--> </object> </div> </body> </html> Wäre das so koreckt ? Ist ja viel übersichtlicher, also wäre echt toll wenn das geht. |
Sponsored Links |
Stichwörter |
browser, flash, html5, video player |
Themen-Optionen | |
Ansicht | |
|
|
Ähnliche Themen | ||||
Thema | Autor | Forum | Antworten | Letzter Beitrag |
HTML5 XML-Konform notieren | pixel24 | (X)HTML | 9 | 13.04.2012 18:04 |
HTML5 & CSS3 Quiz | joocom | Ressourcen | 12 | 30.03.2012 14:43 |
Frage bzg. Prinzip für HTML5 (offline) WebApp | endlezz | (X)HTML | 7 | 28.03.2012 22:40 |
Veranstaltungstipp - MMT 28 "Webtechnologien - HTML5, CSS3 & Co" - Köln MediaPark | hemfrie | Offtopic | 2 | 20.10.2011 11:00 |
html5 | Sukkulent | (X)HTML | 9 | 02.03.2010 09:57 |