html5

Server-Sent Events覚え書き

なかなか書く機会はなかったのだけど、ふと使えそう!、という場面があったので、Server-Sent Eventsを書いてみたのでメモ。 レスポンスのContent-Typeはtext/event-stream dataを組み立てる際は、改行(\r, \n, \r\n)をエスケープする。 http://www.w3.org/TR…

HTML Media Captureの記述の仕方

webでHTML Media Captureについてググると、上の方にでてくるコンテンツはわりと、 <input type="file" accept="image/*;capture=camera" /> とか、 <input type="file" accept="image/*" capture="camera" /> とか書いてあったりするのだけど、http://www.w3.org/TR/html-media-capture/ を見たら、 partial interface HTMLInputElement { attribute boolean capture; };の…