HTML ã使ã£ã¦ãã¹ãã¼ããã©ã³ããç»åãã¢ãããã¼ããããã±ã¼ã¹ãããã¾ãã ãã®ãããªå ´åãã¨ã³ãã¦ã¼ã¶ã«å¯¾ãã¦
- ã«ã¡ã©ã使ã£ã¦ã¢ãããã¼ãããã
- ãã©ãã©ã¤ãã©ãªã iCloud Drive ããã¢ãããã¼ãããã
ãªã©ãã§ããã¨ä¾¿å©ã§ãã ãã®ããããã©ã®ããã«å®ç¾ããã®ãã調ã¹ã¦ã¿ãã®ã§ãçå±ä¸ã©ã®ããã«ãªããã説æãããã¨æãã¾ãã
HTML
HTML ã使ã£ã¦ãã¡ã¤ã«ãã¢ãããã¼ããããããã«ã¯ã<input type="file">
ã®ã¿ã°ã使ããã¨ã«ãªãã¾ãã
ä¸è¬ã«ã<input type="file">
ã®è¦ç´ ãããã¨ããã©ã¦ã¶ã¯ã¦ã¼ã¶ã«å¯¾ãã¦ããã¡ã¤ã«é¸æãã¤ã¢ãã°ã表示ãã¾ãã
ãã® <input type="file">
ã«å¯¾ãã¦ã¯ accept
å±æ§ãä»ä¸ã§ãããã®å±æ§ãç¨ãã¦ãã©ã®ãããªãã¡ã¤ã«ã®ã¢ãããã¼ãããæå¾
ããã¦ããã®ãã示ããã¨ãã§ãã¾ããå
·ä½çã«ã¯ããç»åããåç»ããããã代表çã§ããããã
ãã®æå®ã«ããããã©ã¦ã¶ã¯ä¸è¬çãªãã¡ã¤ã«é¸æãã¤ã¢ãã°ã§ã¯ãªãããã®ã³ã³ããã¹ãã«è¦å½ã£ããã¤ã¢ãã°ãåºããã¨ãå¯è½ã«ãªãã¾ãã
ä¾ãã°ãç»åã®ã¢ãããã¼ããè¡ãå ´åã
<input type="file" name="upfile" id="upfile" accept="image/*" />
ã¨æ¸ããã¨ã§ãä¾ãã° Mobile Safari ã¯ä»¥ä¸ã®ãããªç»åé¸æç¨ã®ãã¤ã¢ãã°ã表示ããå®è£ ã«ãªã£ã¦ãã¾ãã
åæ§ã«ãåç»ã®ã¢ãããã¼ããè¡ãå ´åã¯ã
<input type="file" name="upfile" id="upfile" accept="video/*" />
ã¨æ¸ããã¨ã§(éæ¢ç»åã§ã¯ãªã)åç»æ®å½±ãé¸æãããã¨ãå¯è½ã§ãã
è¨ã£ã¦ããã°ãaccept
å±æ§ã«å¯¾ãã¦ã¯ãMIME Type ã®ãããªãã®ãè¨å®ããã°è¯ãã¨ãããã¨ã§ãã
ã¡ãªã¿ã«ãä¸å¿ãHTML ä»æ§ä¸ã¯ .gif
ãªã©ãæ¡å¼µåæå®ãå¯è½ã¨ãããã¨ã«ãªã£ã¦ãã¾ãããMac ã® Chrome ã¯å¯¾å¿ãã¦ãã(â»)ãã®ã®ãiPhone 7 ã® Safari ã¯æªå¯¾å¿ã§ããã
â»Mac ã®å ´åã¯ãå½¢å¼ãã¨ã㦠Graphics Interchange Format
ã¨èªèããã¦ãããã¨ãåããã¾ãã
HTML Media Capture
ä¸è¨ã®ãã㪠<input type="file">
ã®ã¿ã°ã«å ãã¦ãã¦ã¼ã¶ããã¤ã¹ä¸ã®ã«ã¡ã©ã¨ããã¤ã¯ã¨ããå©ç¨ã§ããããã«ããæ¡å¼µæ©è½ã HTML Media Capture ã§ãã
ç¾èã¯ä¸è¦ã«ãããã§ãä¸è¨ã®ã¿ã°ã使ãã¨ãiPhone Safari ããããã¡ã¤ã«ãé¸æããã¿ã³ãæ¼ä¸ããã ãã§ãç´æ¥ã«ã¡ã©ãç«ã¡ä¸ããã¾ãã
<input type="file" name="upfile" id="upfile" accept="image/*" capture="user" />
ããã§ã¯ capture
å±æ§ããã½ã§ãcapture
ã user
ã«ããã¨ããã³ãã«ã¡ã©ãç«ã¡ä¸ãããã»ã«ãã£ã¼æ®å½±ã¢ã¼ãã«ãªãã¾ããä¸æ¹ãcapture
ã environment
ã«ããã¨ããªã¢ã®ã«ã¡ã©ãç«ã¡ä¸ããã¾ãã
ãã® HTML Media Capture ã®ä»æ§ã«ã¤ãã¦ã¯ãW3C ã§ã¯ Candidate Recommendation ã¨ãªã£ã¦ãã¦ã以ä¸ã§å®ç¾©ããã¦ãã¾ãã
ã¡ãªã¿ã«ãWeb ä¸ã®ãµã³ãã«ã¨ãã¦ã¯ãcapture="camera"
ã¨ããæ£è¦ããããã§ãããããã¯ä¸è¨ã®ä»æ§ã«ã¯æ²¿ã£ã¦ãã¾ããã
Mobile Safari ã®ããã¥ã¡ã³ãã«ãããã®è¨è¼ã¯ããã¾ããã
Safari 10.1 via kwout
è£è¶³
ã¨ãããããä½é¨ç¨ã« HTML ãã¼ã¸ãç½®ãã¨ãã®ã§ãããã£ããã©ããã
https://gistpreview.github.io/?71a54c10507364abbc8335c4bfa7d1b0
ã½ã¼ã¹ã¯ãã¡ãã§ãã