vuzix developer conference

34
C-LIS CO., LTD.

Upload: keiji-ariyama

Post on 06-Jan-2017

503 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Vuzix Developer Conference

C-LIS CO., LTD.

Page 2: Vuzix Developer Conference

M100 で WebRTC アプリ開発Vuzix Developer Conference

有限会社シーリス 有山 圭二

Page 3: Vuzix Developer Conference

WebRTC とはWeb Real-Time CommunicationWorld Wide Web Consortium(W3C) が提唱するリアルタイムコミュニケーション用の API の定義で、プラグイン無しでウェブブラウザ間のボイスチャット、ビデオチャット、ファイル共有ができる。

( Wikipedia https://ja.wikipedia.org/wiki/WebRTC )

Page 4: Vuzix Developer Conference

WebRTC とぼくGoogle 社主催の WebRTC ハッカソンに参加。当時はまだ Chrome に Experimental として実装されていた

Page 5: Vuzix Developer Conference

ボスが来た

Page 6: Vuzix Developer Conference

WebRTC 構成

Peer 2 Peer

音声・ビデオ

Page 7: Vuzix Developer Conference

WebRTC 構成

Peer 2 Peer

Signaling Server

7

音声・ビデオ

Page 8: Vuzix Developer Conference

WebRTC 構成( ICE: Interactive Connectivity Estblishment )

Peer 2 Peer

Signaling Server

STUN(Session Traversal Utilities for NAT) Server

8

音声・ビデオ

Page 9: Vuzix Developer Conference

WebRTC 構成Signaling Server

TURN(Traversal Using Relay around NAT) Server

音声・ビデオ

9

Page 10: Vuzix Developer Conference

WebRTC とはWeb Real-Time CommunicationWorld Wide Web Consortium(W3C) が提唱するリアルタイムコミュニケーション用の API の定義で、プラグイン無しでウェブブラウザ間のボイスチャット、ビデオチャット、ファイル共有ができる。

( Wikipedia https://ja.wikipedia.org/wiki/WebRTC )

Page 11: Vuzix Developer Conference

WebRTC とブラウザバージョン 対応状況

Chrome 47 ○Firefox 42 ○Safari 9 × (プラグイン)

Internet Explorer 11 × (プラグイン)Microsoft

Edge 25.10586 ○Android

WebView 5.x 〜 ○Mobile Safari 9.1 ×

出典:JavaScriptoon 2 WebRTC〜知識ゼロから5日でボイスチャットを作れた技術発行 : TechBooster 執筆者 : @mzsm_j

Page 13: Vuzix Developer Conference

M100 で WebRTC

ブラウザ?ネイティブ?

Page 14: Vuzix Developer Conference

M100 の OS

Android 5 系未満なのでブラウザによるWebRTC 対応無し

Page 15: Vuzix Developer Conference

OpenWebRTC by EricssonResearch

https://github.com/EricssonResearch/openwebrtc

Page 16: Vuzix Developer Conference

OpenWebRTC

http://www.openwebrtc.org/

• H.264 と VP8 コーデックに対応( GStreamer ベース)• クロスプラットフォーム• 2条項BSDライセンス

Page 17: Vuzix Developer Conference

デモ

Page 18: Vuzix Developer Conference

STUN Server

stun.l.google.com:19302

Page 19: Vuzix Developer Conference

Signaling Server

http://demo.openwebrtc.org:38080

Page 20: Vuzix Developer Conference

WebRTC 構成( ICE: Interactive Connectivity Estblishment )

Peer 2 Peer

Signaling Server

STUN(Session Traversal Utilities for NAT) Server

20

音声・ビデオ

Page 21: Vuzix Developer Conference

ハマったところ

Page 22: Vuzix Developer Conference

ライブラリの追加

https://github.com/EricssonResearch/openwebrtc-examples/wiki/Developing-Android-apps

Page 23: Vuzix Developer Conference

dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'io.openwebrtc:openwebrtc-android:0.3'}

今はリポジトリにあるので jar 不要

https://github.com/EricssonResearch/openwebrtc-examples/blob/master/android/Native/app/build.gradle

Page 24: Vuzix Developer Conference

dependencies { compile fileTree(include: ['*.jar'], dir: 'libs') testCompile 'junit:junit:4.12' compile 'io.openwebrtc:openwebrtc-android-sdk:0.1.0'}

android-sdk が別にある

https://github.com/EricssonResearch/openwebrtc-examples/blob/master/android/NativeCall/app/build.gradle

Page 25: Vuzix Developer Conference

ビルドエラー

SDK の AndroidManifest.xml にプロパティが設定されているのが原因

Page 26: Vuzix Developer Conference

<manifest package="com.vuzix.samplewebrtc.android" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">

<application android:allowBackup="false" android:configChanges="orientation|keyboard|keyboardHidden|screenSize" android:icon="@mipmap/ic_launcher" android:label="@string/app_name" tools:replace="android:allowBackup">

ビルドエラー

Page 27: Vuzix Developer Conference

AndroidHttpClient is deprecated

ビルドはできるけど、あまり気持ちよいものではないHttpUrlConnection に置き換えた

Page 28: Vuzix Developer Conference

/** * Shutdown the process as a workaround until cleanup has been fully implemented. */@Overrideprotected void onStop() { finish(); System.exit(0);}

なぞのコードが……

Page 29: Vuzix Developer Conference

android { compileSdkVersion 22 buildToolsVersion "22.0.1" defaultConfig { applicationId "com.ericsson.research.owr.examples.nativecall" minSdkVersion 19 targetSdkVersion 22 versionCode 1 versionName "1.0"

ndk { abiFilter "armeabi-v7a" } } compileOptions { sourceCompatibility JavaVersion.VERSION_1_7 targetCompatibility JavaVersion.VERSION_1_7 }

build.gradle

Page 30: Vuzix Developer Conference

対応アーキテクチャが ARM のみ!

https://github.com/EricssonResearch/openwebrtc

Page 31: Vuzix Developer Conference

Intel CPU には非対応 (M300 は……? )

https://www.vuzix.com/Products/m300-smart-glasses

Page 32: Vuzix Developer Conference

M300 は Android 6 がベース

https://www.vuzix.com/Products/m300-smart-glasses

Page 33: Vuzix Developer Conference

WebRTC サンプルコード (M100 向け ) は、GitHub で公開予定

https://github.com/vuzixtokyo

Page 34: Vuzix Developer Conference

C-LIS CO., LTD.

各製品名・ブランド名、会社名などは、一般に各社の商標または登録商標です。本資料中では、 © 、 ® 、™を割愛しています。

本資料は、有限会社シーリスの著作物であり、クリエイティブコモンズの表示 - 非営利 - 継承 3.0 Unported ライセンスの元で公開しています。