HTML - Html5 <video>
Hi,
Im tryin to use html5 video so my video can be watched by most browsers and cell phone OSs. Having an issue. the link working in Safari (on win) but not in FireFox http://beerdiaries.com/html5/html5.html any idea why? thanks Similar TutorialsI am a relative newcomer to HTML5, and love it, especially the ability to use video more easily. I am trying this out with the ability to gracefully degrade to Flash for those browsers that do not support the <video> element, and thought that this would work:- Code: <video width="640" height="480" controls> <source src="videos/coots.ipad.mp4" type="video/mp4" /> <source src="videos/coots.webmvp8.webm" type="video/webm" /> <source src="videos/coots.theora.ogv" type="video/ogg" /> <object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="480" id="movie_name" align="middle"> <param name="movie" value="videos/coots.swf.swf"/> <!--[if !IE]>--> <object type="application/x-shockwave-flash" data="videos/coots.swf.swf" width="550" height="400"> <param name="movie" value="videos/coots.swf.swf"/> <!--<![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> </video> It seems to work fine in Firefox and Opera, but Chrome (surprisingly) seems to ignore it, as does (unsurprisingly) IE8. I have been puzzling over it for a couple of days now and can't see the solution. I know the solution will be quite obvious when I see it, but I am just to close to it at present to be able to figure it out... I have a nice little HTML5 demo that plays a video in a canvas that is not displayed. As part of the demo, I copy "frames" from the hidden canvas into a resized canvas that is displayed. My "custom" code to manipulate the video frames works fine. What doesn't work depends on the browser, but also the source of the video. If the source of the video is on the local disk along with the html file, it plays fine and it loops fine in both Safari, Chrome. Opera and Firefox. If the source of the video is on the web, either as a local (to the website) where the html file is stored, or if the html file is local but the video is on the web, then Safari works fine. Chrome displays the video ONE time and then stops. The loop does not work. Remember, same code, works fine if all data is local. Changing the source URL of the video to a website is the ONLY change. Opera and Firefox do not display anything except the box rectangle when the video source is on the web. Firefox gives the error: Quote: Error: uncaught exception: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIDOMCanvasRenderingContext2D.drawImage]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: file:///Volumes/Olorin/sliceNdice/demow.html :: processFrame :: line 34" data: no] No errors show up in Opera, but no video is displayed. The Code: (or a snippet, actually) Code: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html><head><title>HTML5 Video Deom</title> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <script type="text/javascript"> var video; var copy; var copycanvas; var draw; var VID_WID = 640; var VID_HIGH = 360; var OUT_WID = 480; var OUT_HIGH = 320; function init(){ video = document.getElementById('sourcevid'); copycanvas = document.getElementById('sourcecopy'); copy = copycanvas.getContext('2d'); var outputcanvas = document.getElementById('output'); draw = outputcanvas.getContext('2d'); setInterval("processFrame()", 33); } function processFrame(){ //get video image copy.drawImage(video, 0, 0); // manipulate image here draw.drawImage(copycanvas, 0,0); } </script></head> <body onload="init()" style="margin:0px;"> <div><br/><br/></div> <div style="display:none"> <video id="sourcevid" autoplay loop=loop> <source src="http://catalystart.reststop.com/html5/BigBuckBunny_640x360.mp4" type="video/mp4"/> <source src="http://catalystart.reststop.com/html5/BigBuckBunny_640x360.ogv" type="video/ogg"/> </video> <canvas id="sourcecopy" width="640" height="360"></canvas> </div> <div> <canvas id="output" width="480" height="320" style="border: solid 5px #666666"></canvas> </div> </body> </html> Works if all files are local, shows box outline if all files are on the web: Code: <video id="sourcevid" autoplay loop=loop> <source src="BigBuckBunny_640x360.mp4" type="video/mp4"/> <source src="BigBuckBunny_640x360.ogv" type="video/ogg"/> </video> Fails: Code: <video id="sourcevid" autoplay loop=loop> <source src="http://catalystart.reststop.com/html5/BigBuckBunny_640x360.mp4" type="video/mp4"/> <source src="http://catalystart.reststop.com/html5/BigBuckBunny_640x360.ogv" type="video/ogg"/> </video> Note: Safari works in both cases, as long as all files and website are reachable. Chrome works to play the video ONCE, then stops. Firefox and Opera show an empty outline, but no video. I'm not a cross-browser expert. I will accept any and all possible solutions to try. In the meantime, I will continue to see if I can find the problem. Obviously, I want it to work from a website. Hey all, Is it possible to shut down video screen automatically after displaying the video? I mean, after video is over, is it possible to hide the video screen? ( I tried to use embed tag... <embed src="myVideo" autostart="true" /> ??) Thanks, Doron Hello, first post. HELLO! my video widget playlist on my index is a different size on my index.php but the correct size throughout the rest of my site. Its quite annoying, can anyone shed any light on this issue? thanks. http://www.brewrecords.net HTML Code: <?php get_header(); ?> <div id="content"> <div id="homepagetop"> <div class="textbanner"> <?php $recent = new WP_Query("cat=" .ot_option('hp_top_cat'). "&showposts=1"); while($recent->have_posts()) : $recent->the_post();?> <h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3> <?php endwhile; ?> </div> <div id="homeslider"> <?php include(TEMPLATEPATH."/includes/slider.php");?> </div> <div class="homewidgets"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Homepage Top Right') ) : ?> <div class="widget"> <h4>Widget Area</h4> <p>This section is widgetized. To add widgets here, go to the <a href="<?php echo admin_url(); ?>widgets.php">Widgets</a> panel in your WordPress admin, and add the widgets you would like to <strong>Homepage Top Right</strong>.</p> <p><small>*This message will be overwritten after widgets have been added</small></p> </div> <?php endif; ?> </div> </div> <div id="homepage"> <?php include(TEMPLATEPATH."/sidebar_left.php");?> <div class="homepagemid"> <h3><?php echo cat_id_to_name(ot_option('hp_mid_cat')); ?></h3> <?php $recent = new WP_Query("cat=" .ot_option('hp_mid_cat'). "&showposts=" .ot_option('hp_mid_num') ); while($recent->have_posts()) : $recent->the_post();?> <div class="homepagecontent"> <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_post_thumbnail( 'home-thumbnail' ); ?></a> <h4><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h4> <?php the_excerpt(); ?> </div> <?php endwhile; ?> </div> <?php include(TEMPLATEPATH."/sidebar_right.php");?> </div> </div> <!-- The main column ends --> <?php get_footer(); ?> Heya peeps. I have a problem I'm trying to overcome as shown below (From another thread): I'm in the process of building a website where audio can be purchased and downloaded. I want each file to allow a preview, but would rather the preview occur on the same page, rather than load up a blank page with a quicktime plugin splodged in the middle. Is there a way of doing it? All I want is a basic play/pause/stop button. To control a piece of sound. It seems that I may be able to achieve this using HTML 5, but I'm worried that people won't be able to read it with there browsers. Am I mistaken? Thanks Hey folks, I have a background in traditional enterprise software, and I am trying to gain expertise on newer technologies. I will greatly appreciate, if you could help me understand, when to use HTML5, when to use Flash and when to use Silverlight. If you could point to some tools etc that will be helpful. Thanks for your help hi everyone, Can anyone provide me canvas tutorials? I am keep to update more knowledge on html5 and its tags. If you can provide me related information. Thankyou. Hi all, I have a web site that has some html tags and it works fine in Chrome and Firefox, however in IE8 and IE9 it just won't load any resources (stylesheets and javascript) and it gets completely broken. Does anyone know what the problem is? The doctype and html tag are declared as following: Code: <!DOCTYPE html> <html lang="en"> and the content type: Code: <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> I was quite surprised to discover that a lot browsers are already starting to support HTML5... While the support isn't comprehensive, and it isn't universal - it does seem to at least work reasonably well - at least for those elements that are not tied to media: http://www.brucelawson.co.uk/2009/re...ml-5-wai-aria/ I'm already thinking about making use of HTML5 in new projects... I quite like the idea of <header> and other elements. Hi, I am doing my final year project and am comparing two technologies (HTML5 -JavaScript and Flash -ActionScript). It would be greatly appreciated if you could take a few minutes to answer my survey: http://www.surveymonkey.com/s/CLVC23Z Thank You i have to draw ball on canvas in html 5 depending on the input given by user in a textbox. ex: if a user enter 5 in a textfield, 5 ball should draw on canvas. Greetings, Can some one explain me the difference between HTML4 and HTML5? what is the content management system, and what are the benefits of CMS? Do you heard the word Joomla? i heard somewhere this is a war.. can I ask (not to familiar with html5) what about html5 encroaches on flash? what new elements/features? If it does compensate i know Jobbs will be pushing the hell out of it (html5) Hey Guys! Both kids are now in school and I need to brush up on my skills so I can get back to work! What is the best Free HTML5/CSS3 editor? I'd love something that does a split screen (half code/half visual) And for when I'm back to work ...... What is the Best HTML5/CSS3 editor ever? I can't believe it's been over a year since I last logged in! I have a client I did an website for, the homepage has an Adobe Edge animation and it works fine except of course for non HTML5 browsers like IE8. So I was looking for a solution like a user agent where when the site is accessed by a non HTML 5 browser the div tag on the page where the edge animation is would be replaced with a .jpg I have looked at HTML boilerplate which I think could do this but I'm not a coder so if someone can point me in the right direction here I would appreciate it. Ralph Dee Hi, I am researching HTML5 vs Plug-in based browser software, namely Flash. I have developed a simple website with both technologies and a short survey. The survey is at the following URL- http://www.obiter-training.com/research All contributions are anonymous and no personal data is collected. Thank you for your help! Ok. So I'm trying to create an HTML music player (local purposes) using Perl. I want to use CSS so it can be easily "themed" and I am stuck on using Perl since the second main purpose of this is for me to get some practice. It has to use HTML 5 for ogg vorbis purposes (that's what all my music is)... The Issue - Can't have a form action specifically scripted to run in a <DIV> tag. Was going to use frames <form action="foo.cgi" target="someFrame"> but frames aren't supported in HTML 5. What are my other options? I'm using mass perl scripts (basically every link/button click) so I don't want to parse the whole page every freaking time. Once again... I know Perl isn't necessarily meant for this nor the best option but I'm practicing Perl so I HAVE to use Perl and I HAVE to use HTML 5 for ogg support. Any takers? Preferably I just want to use HTML and Perl... but some JS could be used if it is only other option. I seem to have run into a problem trying to locally load web applications offline. I think what I need to accomplish this is a .manifest file. I cant seem to get it to work though. I have the manifest file, I have it load in the html tag, and I think I have the .htaccess file set up correctly. If somebody could point me in the right direction it would be appreciated. I'm having trouble getting a table to stay within its containing DIV. No matter what I do, I can't reduce the widths of the cells to make it fit. All cells are the same width, and using the width attribute to adjust them (either in the table or the td tags) doesn't help. Any suggestions? I'm willing to use DIV's to format the data, but it is tabular data and I think the table is still the best way to display it. Thanks Jason Hello, I wonder if it is possible or it will be possible to make the webcam (Audio/Video) streaming with her website as a webcam chat without Flash or Silverlight but with HTML5 or perhaps JavaScript. Or will it always must pass through Flash or Silverlight to make a webcam chat Thanks in advance |