39
HTML5 HTML5 とデバイスの連携 とデバイスの連携 : : 良いところ 良いところ 悪いところ 悪いところ 未来のこと 未来のこと デイビス ダニエル デイビス ダニエル @ourmaninjapan @ourmaninjapan

HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

HTML5HTML5 とデバイスの連携とデバイスの連携 ::良いところ良いところ悪いところ悪いところ未来のこと未来のこと

デイビス ダニエルデイビス ダニエル@ourmaninjapan@ourmaninjapan

Page 2: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

まずは、昔話まずは、昔話

18991899 年の未来の予測年の未来の予測

Page 3: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

2000年の街の風景

Page 4: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

2000年の Drive Thru

Page 5: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

2000年の警察

Page 6: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

2000年の消防士

Page 7: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

2000年の建設

Page 8: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

2000年の散髪屋さん

Page 9: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

2000年のお風呂

Page 10: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

2000年の学校

Page 11: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

2000年の Skypeビデオチャット

Page 12: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

最新の最新の Web APIWeb API

Page 13: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

Geolocation APIGeolocation API位置情報位置情報caniuse.com/#feat=geolocationcaniuse.com/#feat=geolocation

Page 14: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

navigator.geolocation.getCurrentPosition(showMap);

function showMap(position) {

// position オブジェクト : // (position.coords.latitude, // position.coords.longitude)

}

Geolocation APIGeolocation API位置情報位置情報

Page 15: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

Device Orientation APIDevice Orientation APIデバイスオリエンテーションデバイスオリエンテーション

caniuse.com/#feat=deviceorientationcaniuse.com/#feat=deviceorientation

● 加速度センサー加速度センサー● 方向センサー方向センサー

Page 16: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

window.ondevicemotion = function(event) {

// event.acceleration オブジェクト : // {x: 0, y: 0, z: -9.81}

// event.rotationRate オブジェクト : // {alpha: 0, beta: 0, gamma: -v/r*180/pi}

}

Device Orientation APIDevice Orientation APIデバイスオリエンテーションデバイスオリエンテーション

Page 17: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

System Information APISystem Information APIシステム情報システム情報

● 気温気温● 気圧気圧● 湿度湿度● 騒音騒音● 距離間距離間

Page 18: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

System Information APISystem Information APIシステム情報システム情報

navigator.system.monitor("Thermal", success);

function success(thermal) {

// thermal オブジェクト : // thermal.state = 気温

}

Page 19: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

WebSocket API, Server Sent EventsWebSocket API, Server Sent Eventsウェブソケット、サーバセントイベントウェブソケット、サーバセントイベント

caniuse.com/#feat=websocketscaniuse.com/#feat=websockets

Page 20: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

WebSocket API, Server Sent EventsWebSocket API, Server Sent Eventsウェブソケット、サーバセントイベントウェブソケット、サーバセントイベント

// ウェブソケットの作成var socket = new WebSocket('ws://example.com/update');

socket.onopen = function () { // 接続する時に実効するコード setInterval(function() { if (socket.bufferedAmount == 0) socket.send(getUpdateData()); }, 50);};

Page 21: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

Offline StorageOffline Storageオフラインストレージオフラインストレージcaniuse.com/#feat=offline-appscaniuse.com/#feat=offline-appscaniuse.com/#feat=namevalue-storagecaniuse.com/#feat=namevalue-storage

● Application CacheApplication Cache (ファイル) (ファイル) ● localStoragelocalStorage (文字列)(文字列)● IndexedDBIndexedDB (データベース)(データベース)

Page 22: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

Offline StorageOffline Storageオフラインストレージオフラインストレージ

// オンラインの場合は「 true」 :var online = navigator.onLine;

// localStorage オブジェクトでの保存 :window.localStorage["status"] = "移動中 ";

Page 23: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

ウェブソケット

オフラインストレージ

位置情報、デバイスオリエンテーション、システム情報

Page 24: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

デバイスでは何の問題が出るかデバイスでは何の問題が出るか

Page 25: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

•文字入力が楽ではない

•ナビゲーションが楽ではない

•テキストを読むのが楽ではない

•ページロードが楽ではない

•文字入力、本当に楽ではない

Page 26: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

Logitech MX Air / Hillcrest Labs Loop Pointer

Page 27: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

Sony / Google TV

Page 28: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

Opera / Pioneer 社内ブラウザ

Page 29: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

さぁ、これからは何が必要でしょうかさぁ、これからは何が必要でしょうか

Page 30: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

Webによるデバイス認識方法

Page 31: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

ブラウザによる支払い方法

Page 32: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

パフォーマンスのレベルアップパフォーマンスのレベルアップ

Page 33: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

開発やテスティングツール開発やテスティングツール

Page 34: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

2013年の未来の予測2013年の未来の予測

Page 35: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

Nike+の車版、ジェットパック版…

Page 36: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

マルチスクリーンのゲームやアプリマルチスクリーンのゲームやアプリ

Page 37: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

複数のデバイス、一つの複数のデバイス、一つの UIUI

Page 38: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

本当のどこでも本当のどこでも WebWeb

Page 39: HTML5とデバイスの連携: 良いところ、悪いところ、未来のこと

HTML5HTML5 とデバイスの連携とデバイスの連携 ::良いところ良いところ悪いところ悪いところ未来のこと未来のこと

デイビス ダニエルデイビス ダニエル@ourmaninjapan@ourmaninjapan