Search Results

Search found 2166 results on 87 pages for 'html5'.

Page 15/87 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • HTML5 Cache manifest file itself is not cached, and called at each resource load

    - by Mic
    We have a web app that runs on the iPhone.The manifest file is ok, and the resources(html, css, js) are cached correctly.The page sits in the home screen. The trouble is, when the page loads a resource from the cache, there is as well a GET call to the server to read the Cache Manifest file.The server is configured to send the correct header (max-age=31536000; public, etc...) and caches well all other files except the cache manifest itself. Is this a normal behavior? It looks there is a slight lag, because of that call, for each resource load.Any idea, if these multiple calls can get a status 304 or even better avoided?

    Read the article

  • HTML5 video problem

    - by mathiregister
    hey guys, i wonder what i'm doing wrong? <video id="movie" width="320" height="240" preload controls> <source src="pr6.mp4" type='video/mp4; codecs="avc1.42E01E, mp4a.40.2"' /> <source src="pr6.webm" type='video/webm; codecs="vp8, vorbis"' /> <source src="pr6.ogv" type='video/ogg; codecs="theora, vorbis"' /> </video> this peace of code lies in my index.html. in the same directory i got all 3 videofiles (mp4, webm, ogv) Somehow the video component shows up, however no video gets played. A big X shows up inside of the video component.

    Read the article

  • html5 cache -> "network: *" doesn't work

    - by Greg
    Hello all, I am trying a simple test with the html 5 cache. Here is a simple web page : <!DOCTYPE html> <html manifest="test.manifest"> <head> </head> <body> <img src="http://www.somewebsite.com/picture.jpg"/> </body> </html> With the following manifest : CACHE MANIFEST #v0.1 NETWORK: http://www.somewebsite.com/ This work fine, the picture is displayed. My problem is that I won't be able to know from where the picture will come. Here comes the online whitelist wildcard flag, that is supposed to solve my problem. But with the manifest : CACHE MANIFEST #v0.1 NETWORK: * The image is not displayed (tested on safari / safari mobile / firefox). What is not working ? Is there another way to turn the online whitelist wildcard flag on ?

    Read the article

  • SimpleModal bug when positioning HTML5 video

    - by Damon Morda
    I recently Simple Modal Test <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script> <script src="jquery.simplemodal-1.3.5.min.js" type="text/javascript"></script> <script type="text/javascript"> jQuery(function ($) { $('.simple-clicker').click(function (e) { $("#simple-container").modal(); }); }); </script> View preview Header Description of video

    Read the article

  • Not able to show video with html5

    - by shin
    I am testing html 5 video tag. I am using http://www.kaltura.org/project/HTML5_Video_Media_JavaScript_Library and http://camendesign.co.uk/. I downloaded the creative common video. When I use an external link, it plays the video. So I uploaded the video to my server but it does not play. It asks if I want to save it or asking an application to play. When I go to the external link, http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/bbb400p.ogv, it plays it on the browser automatically. I also tested locally, but it does not play either. I am hoping someone gives me why and how to solve the problem. This code works. <figure> <video id="vid1" width="500" height="300" style="position:absolute" poster="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/bbb480.jpg" durationHint="33" controls = "true"> <source src="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/bbb400p.ogv" /> <source src="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/bbb_trailer_iphone.m4v"/> </video> </figure> This does not. <figure> <video id="vid1" width="500" height="300" style="position:absolute" poster="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/bbb480.jpg" durationHint="33" controls = "true"> <source src="http://www.mywebsite.com/media/bbb400p.ogv" /> <source src="http://www.mywebsite.com/media/bbb_trailer_iphone.m4v"/> </video> </figure> This does not work either. <figure> <video id="vid1" width="500" height="300" style="position:absolute" poster="http://cdn.kaltura.org/apis/html5lib/kplayer-examples/media/bbb480.jpg" durationHint="33" controls = "true"> <source src="http://127.0.0.1/html5videotest/media/bbb400p.ogv" /> <source src="http://127.0.0.1/html5videotest/media/bbb_trailer_iphone.m4v"/> </video> </figure>

    Read the article

  • HTML5 move Canvas object

    - by Mircea
    Hi, I have 2 canvas created on the same canvas. Is it possible to drag the small black one around? I want to make it draggable but I can not find any online tutorial or demo on this. Is it possible? I had looked to Canvas moveTo or transitions but I was unable to make it work. The code is here http://jsfiddle.net/35P9F/2/ var ctx = document.getElementById('canvas').getContext('2d'); var radgrad3 = ctx.createLinearGradient(255,10,0,180,80,190); radgrad3.addColorStop(0, '#00C9FF'); radgrad3.addColorStop(1, 'red'); ctx.fillStyle = radgrad3; ctx.fillRect(0,0,255,255); var ctx4 = document.getElementById('canvas').getContext('2d'); var radgrad4 = ctx4.createLinearGradient(0, 0, 0, 255); radgrad4.addColorStop(0, '#000000'); radgrad4.addColorStop(1, '#ff0000'); ctx4.fillStyle = radgrad4; ctx4.fillRect(0,0,25,25); Thank you.

    Read the article

  • Making Javascript and HTML5 games

    - by Jeff Meatball Yang
    A long time ago (Netscape 4-era), I wrote Javascript-based games: Pong, Minesweeper, and John Conway's Life among them. I'm getting back into it, and want to get my hands even dirtier. I have a few games in mind: Axis & Allies clone, with rugged maps and complex rules. Tetris clone, possibly with real-time player-vs-player or player-vs-computer mode Breakout clone, with a couple weapons and particle velocities In all of these, I have only a few objectives: Use JavaScript and HTML 5 - it should run on Chrome, Safari, or maybe an iPad. Start small and simple, then build-up features. Learn something new about game design and implementation. So my questions are: How would you implement these games? Do you have any technology recommendations? If you've written these games, what was the hardest part? N.B. I also want to start from first-principles - if you recommend a framework/library, I would appreciate some theory or implementation details behind it. These games are different enough that I should learn something new from each one.

    Read the article

  • HTML5 Database Transactions

    - by jiewmeng
    i am wondering abt the example W3C Offline Web Apps the example function renderNotes() { db.transaction(function(tx) { tx.executeSql('CREATE TABLE IF NOT EXISTS Notes(title TEXT, body TEXT)', []); tx.executeSql(‘SELECT * FROM Notes’, [], function(tx, rs) { for(var i = 0; i < rs.rows.length; i++) { renderNote(rs.rows[i]); } }); }); } has the create table before the 'main' executeSql(). will it be better if i do something like $(function() { // create table 1st db.transaction(function(tx) { tx.executeSql('CREATE TABLE IF NOT EXISTS Notes(title TEXT, body TEXT)', []); }); // when i execute say to select/modify data, i just do the actual action db.transaction(function(tx) { tx.executeSql(‘SELECT * FROM Notes’, [], function(tx, rs) { ... } }); db.transaction(function(tx) { tx.executeSql(‘INSERT ...’, [], function(tx, rs) { ... } }); }) i was thinking i don't need to keep repeating the CREATE IF NOT EXISTS right?

    Read the article

  • Opting out of `dragenter` and `dragover` events (html5)

    - by aaaidan
    I have a collection of draggable "content" elements, and a root-level "feedback" UI element which is displayed above them to provide feedback during drag and drop. The problem is, during the drag operation, hovering over the "feedback" element causes the dragenter and dragover events to be fired on that element, rather than the underlying content element. It effectively "blocks" the dragenter event from firing on the correct element. Is there a way for an element to cancel, or "opt out" of a dragenter/dragover event? I could display the feedback element underneath the content, but I'd rather not do that. jsFiddle: http://jsfiddle.net/jact8/1/ I'm using the HTML drag/drop api, not jQuery or anything like that.

    Read the article

  • How, exactly does HTML5's GeoLocation work?

    - by Dan
    I know the browser shares my IP address and details of nearby wireless networks to determine my location, but what sort of info does it know about nearby wifi networks? For example, where I live are no public wireless networks, and from my home I can see about 5 private networks, yet my location is determined within 20 meters. With there being no open networks nearby, how does Google determine my location? The only way I can think of is that Google mapped the locations of all wireless networks when they mapped streets for Street View. I've searched about online, but all I can't find any specific details.

    Read the article

  • Newbie want to learn: Javascript + HTML5 localstorage

    - by Alai
    So I'm searching for a good crash course on localstorage and interacting with it in Javascript. I want to build a to-do list webapp with some extra functionality but it would be just for 1 user. I don't want to mess with php/mysql and have the server doing anything. Links to tutorials would be best :-D

    Read the article

  • Transparent Arc on HTML5 Canvas

    - by Rigil
    Here I have an arc with some transparency applied to one of the two gradients its using:` ctx.arc(mouseX,mouseY,radius,0, 2*Math.PI,false); var grd=ctx.createRadialGradient(mouseX,mouseY,0,mouseX,mouseY,brushSize); grd.addColorStop(1,"transparent"); grd.addColorStop(0.1,"#1f0000"); ctx.fillStyle=grd; ctx.fill(); Is there a way to now give the entire arc some transparency affecting only the arc and none of the rest of the canvas? Thanks

    Read the article

  • Element point map for html5 canvas element, need algorithm

    - by Artiom Chilaru
    I'm currently working on a pure html 5 canvas implementation of the "flying tag cloud sphere", which many of you have undoubtedly seen as a flash object in some pages. The tags are drawn fine, and the performance is satisfactory, but there's one thing in the canvas element that's kind of breaking this idea: you can't identify the objects that you've drawn on a canvas, as it's just a simple flat "image".. What I have to do in this case is catch the click event, and try to "guess" which element was clicked. So I have to have some kind of matrix, which stores a link to a tag object for each pixel on the canvas, AND I have to update this matrix on every redraw. Now this sounds incredibly inefficient, and before I even start trying to implement this, I want to ask the community - is there some "well known" algorithm that would help me in this case? Or maybe I'm just missing something, and the answer is right behind the corner? :)

    Read the article

  • Image re sizing not working after rotation in Html5 canvas

    - by Deepu the Don
    In my HTML 5 + Javascript application, we can drag, re size and rotate image in Html 5 canvas. But after doing rotation, re sizing is not working. (I think it i related to finding dx,dy,not sure). Please help me to fix the code given below. Thanks in advance. <!doctype html> <html> <head> <style> #canvas{ border:red dashed #ccc; } </style> <script type="text/javascript" src="http://code.jquery.com/jquery.min.js"></script> <script> $(function(){ var canvas=document.getElementById("canvas"),ctx=canvas.getContext("2d"),canvasOffset=$("#canvas").offset(); var offsetX=canvasOffset.left,offsetY=canvasOffset.top,startX,startY,isDown=false,pi2=Math.PI*2; var resizerRadius=8,rr=resizerRadius*resizerRadius,draggingResizer={x:0,y:0},imageX=50,imageY=50; var imageWidth,imageHeight,imageRight,imageBottom,draggingImage=false,startX,startY,doRotation=false; var r=0,rotImg = new Image(); rotImg.src="rotation.jpg"; var img=new Image(); img.onload=function(){ imageWidth=img.width; imageHeight=img.height; imageRight=imageX+imageWidth; imageBottom=imageY+imageHeight; w=img.width/2; h=img.height/2; draw(true,false); } img.src="https://dl.dropboxusercontent.com/u/139992952/stackoverflow/facesSmall.png"; function draw(withAnchors,withBorders){ ctx.fillStyle="black"; ctx.clearRect(0,0,canvas.width,canvas.height); ctx.save(); ctx.translate(imageX,imageY); ctx.translate(imageWidth/2,imageHeight/2); ctx.rotate(r); ctx.translate(-imageX,-imageY); ctx.translate(-imageWidth/2,-imageHeight/2); ctx.drawImage(img,0,0,img.width,img.height,imageX,imageY,imageWidth,imageHeight); ctx.restore(); if(withAnchors){ drawDragAnchor(imageX,imageY); drawDragAnchor(imageRight,imageY); drawDragAnchor(imageRight,imageBottom); drawDragAnchor(imageX,imageBottom); } if(withBorders){ ctx.save(); ctx.translate(imageX,imageY); ctx.translate(imageWidth/2,imageHeight/2); ctx.rotate(r); ctx.translate(-imageX,-imageY); ctx.translate(-imageWidth/2,-imageHeight/2); ctx.beginPath(); ctx.moveTo(imageX,imageY); ctx.lineTo(imageRight,imageY); ctx.lineTo(imageRight,imageBottom); ctx.lineTo(imageX,imageBottom); ctx.closePath(); ctx.stroke(); ctx.restore(); } ctx.fillStyle="blue"; ctx.save(); ctx.translate(imageX,imageY); ctx.translate(imageWidth/2,imageHeight/2); ctx.rotate(r); ctx.translate(-imageX,-imageY); ctx.translate(-imageWidth/2,-imageHeight/2); ctx.beginPath(); ctx.moveTo(imageRight+15,imageY-10); ctx.lineTo(imageRight+45,imageY-10); ctx.lineTo(imageRight+45,imageY+20); ctx.lineTo(imageRight+15,imageY+20); ctx.fill(); ctx.closePath(); ctx.restore(); } function drawDragAnchor(x,y){ ctx.save(); ctx.translate(imageX,imageY); ctx.translate(imageWidth/2,imageHeight/2); ctx.rotate(r); ctx.translate(-imageX,-imageY); ctx.translate(-imageWidth/2,-imageHeight/2); ctx.beginPath(); ctx.arc(x,y,resizerRadius,0,pi2,false); ctx.closePath(); ctx.fill(); ctx.restore(); } function anchorHitTest(x,y){ var dx,dy; dx=x-imageX; dy=y-imageY; if(dx*dx+dy*dy<=rr){ return(0); } // top-right dx=x-imageRight; dy=y-imageY; if(dx*dx+dy*dy<=rr){ return(1); } // bottom-right dx=x-imageRight; dy=y-imageBottom; if(dx*dx+dy*dy<=rr){ return(2); } // bottom-left dx=x-imageX; dy=y-imageBottom; if(dx*dx+dy*dy<=rr){ return(3); } return(-1); } function hitImage(x,y){ return(x>imageX && x<imageX+imageWidth && y>imageY && y<imageY+imageHeight); } function handleMouseDown(e){ startX=parseInt(e.clientX-offsetX); startY=parseInt(e.clientY-offsetY); draggingResizer= anchorHitTest(startX,startY); draggingImage= draggingResizer<0 && hitImage(startX,startY); doRotation = draggingResizer<0 && !draggingImage && ctx.isPointInPath(startX,startY); } function handleMouseUp(e){ draggingResizer=-1; draggingImage=false; doRotation=false; draw(true,false); } function handleMouseOut(e){ handleMouseUp(e); } function handleMouseMove(e){ mouseX=parseInt(e.clientX-offsetX); mouseY=parseInt(e.clientY-offsetY); if(draggingResizer>-1){ switch(draggingResizer){ case 0: //top-left imageX=mouseX; imageWidth=imageRight-mouseX; imageY=mouseY; imageHeight=imageBottom-mouseY; break; case 1: //top-right imageY=mouseY; imageWidth=mouseX-imageX; imageHeight=imageBottom-mouseY; break; case 2: //bottom-right imageWidth=mouseX-imageX; imageHeight=mouseY-imageY; break; case 3: //bottom-left imageX=mouseX; imageWidth=imageRight-mouseX; imageHeight=mouseY-imageY; break; } if(imageWidth<25) imageWidth=25; if(imageHeight<25) imageHeight=25; imageRight=imageX+imageWidth; imageBottom=imageY+imageHeight; draw(true,true); }else if(draggingImage){ imageClick=false; var dx=mouseX-startX; var dy=mouseY-startY; imageX+=dx; imageY+=dy; imageRight+=dx; imageBottom+=dy; startX=mouseX; startY=mouseY; draw(false,true); }else if(doRotation){ var dx=mouseX-imageX; var dy=mouseY-imageY; r=Math.atan2(dy,dx); draw(false,true); } } $("#canvas").mousedown(function(e){handleMouseDown(e);}); $("#canvas").mousemove(function(e){handleMouseMove(e);}); $("#canvas").mouseup(function(e){handleMouseUp(e);}); $("#canvas").mouseout(function(e){handleMouseOut(e);}); }); </script> </head> <body> <canvas id="canvas" width=800 height=500></canvas> </body> </html>

    Read the article

  • HTML5 applicationCache in local development

    - by jesper
    I'm experimenting with application cache based on this example: http://html5demos.com/html5demo.manifest This example works fine in ff, but when I create analogous site (almost identical) I get only status "UNCACHED (numeric value 0) -- The ApplicationCache object's cache host is not associated with an application cache at this time." I work on xampp and I've set correct mime-type. When the page is loading ff "is asking to store data on your computer for offline use" and when I show Tools - Options - Advanced - Network - Offline data there is localhost but with 0B size.

    Read the article

  • Offline mode app in a (HTML5) browser possible?

    - by Horace Ho
    Is it possible to build an application inside in browser? An application means: 1 Where there is connection (online mode) between the browser and an remote application server: the application runs in typical web-based mode the application stores necessary data in offline storage, to be used in offline mode (2) the application sync/push data (captured during offline mode) back to the server when it is resumed from offline mode back to online mode 2 Where there is no connection (offline mode) between the browser and an remote application server: the application will still run (javascript?) the application will present data (which is stored offline) to user the application can accept input from user (and store/append in offline storage) Is this possible? If the answer is a yes, is there any (Ruby/Python/PHP) framework being built? Thanks

    Read the article

  • HTML5 audio object doesn't play on iPad (when called from a setTimeout)

    - by Dan Halliday
    I have a page with a hidden <audio> object which is being started and stopped using a custom button via javascript. (The reason being I want to customise the button, and that drawing an audio player seems to destroy rendering performance on iPad anyway). A simplified example (in coffeescript): // Works fine on all browsers constructor: (@_button, @_audio) -> @_button.on 'click', @_play // Bind button's click event with jQuery _play: (e) => @_audio[0].play() // Call play() on audio element The audio plays fine when triggered from a function bound to a click event, but I actually want an animation to complete before the file plays so I put .play() inside a setTimeout. However I just can't get this to work: // Will not play on iPad constructor: (@_button, @_audio) -> @_button.on 'click', @_play // Bind button's click event with jQuery _play: (e) => setTimeout (=> // Declare a 300ms timeout @_audio[0].play() // Call play() on audio element ), 300 I've checked that @_audio (this._audio) is in scope and that its play() method exists. Why doesn't this work on iPad?

    Read the article

  • HTML5 validator.w3.org

    - by danixd
    My site was valid until today, wondering wether it is my site's or the validator's fault. I am getting this message: The error encountered was: 500 Can't connect to localhost:8888 (connect: Connection refused)

    Read the article

  • Inserting HTML5 video using JavaScript for iPad

    - by Vishal
    Hello, I am trying to insert a video into HTML using jQuery for iPad but all I see is a black screen. If I add the video tag directly to the HTML page all seems to work fine. Here is what I have in my JavaScript and I call this using a function for onClick event. var html = ""; html += '<video id="someVideo"'; html += ' width="'+settings.width+'" height="'+settings.height+'"' html += ' controls="controls">'; html += '<source src="'+url+'" type="video/mp4" />'; html += '</video>'; $("#videoDiv").html(html); Any help will be greatly appreciated Thanks

    Read the article

  • Can't serve HTML5 video through PHP on Safari/Mac (5.0)

    - by JKS
    I'm encountering a strange bug in Safari where, when I serve MP4 video through PHP (to obfuscate the file beneath the document root with a token-based authentication system), Safari for some reason fires the <video>'s onerror event, and the video never loads (I can't get any useful information out of the event object sent to onerror — everything is undefined). When I access the PHP script directly (i.e., the video is not embedded in a page), the video controls appear momentarily before flashing to a QuickTime question mark. When I access the MP4 file directly, it works as expected. What's bizarre is that the embedded video works perfectly in the latest version of Chrome for Mac. Here are the headers when accessed through PHP: Connection:Keep-Alive Content-Disposition:inline; filename="test.mp4" Content-Length:5558749 Content-Type:video/mp4 Date:Tue, 22 Jun 2010 01:24:25 GMT Keep-Alive:timeout=10, max=29 Server:Apache/2.2.15 (CentOS) mod_ssl/2.2.15 0.9.8l DAV/2 mod_auth_passthrough/2.1 FrontPage/5.0.2.2635 X-Powered-By:PHP/5.2.13 And here are the headers when test.mp4 is accessed directly: Accept-Ranges:bytes Connection:Keep-Alive Content-Length:5558749 Content-Type:video/mp4 Date:Tue, 22 Jun 2010 01:26:45 GMT Etag:"1c04757-54d1dd-489944c5a6400" Keep-Alive:timeout=10, max=30 Last-Modified:Tue, 22 Jun 2010 01:25:36 GMT Server:Apache/2.2.15 (CentOS) mod_ssl/2.2.15 0.9.8l DAV/2 mod_auth_passthrough/2.1 FrontPage/5.0.2.2635 The only differing headers are: Accept-Ranges (which I don't think is necessary), Etag, Last-Modified, Content-Disposition, and X-Powered-By. Not only can Chrome handle the PHP-served video fine, but when I use the same script to load the MP4 through a Flash player, it also works fine. I just can't figure out what Safari is choking on. EDIT: Also, when I change the content disposition to "attachment", Safari will download the MP4 file just fine.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >