Upgrade to Pro — share decks privately, control downloads, hide ads and more …

あえてWebエンジニア以外の人に 聞いてほしいWebRTCの話

Yusuke Naka
September 02, 2018
11k

あえてWebエンジニア以外の人に 聞いてほしいWebRTCの話

iOSDC Japan 2018 3日目の発表資料です。

Yusuke Naka

September 02, 2018
Tweet

Transcript

  1. WGT: uCB\ uTwitter\@Tukimikage • WebRTCLE  u;8 • <X WebRTC,2')+5/

    SkyWay 69 • 7&305$145 (!)DevRelNJ • ;8PiOS/Android/WebI MA  ?PHPJSO 9 u#.0*(ZD • WebRTC Meetup Tokyo / Osaka / Fukuoka 7>(2014H • WebRTC Beginners Tokyo 7>(2016H u,2-5) • UY[Q@FV6 S="%RKFTDS
  2.   ⇔       

       WebRTC
  3. )$ WebRTC   &#'    + 

    ! P2P"% ⇔   !"%     *(   WebRTC
  4. WebRTC • WebRTC 6+-0 • / 4 IETF(C~E) W3C(F) 6+!

    C?9!>2;@"),1BA%8 &  • D$4(NAT:)5 P2P'; • E7. <= 3*() • F(# API
  5. 9WebRTC := • "% #' API(2*) ;.  +* •

    "%  - 36- 50 ,7/8 • iOS/Android/Web &#%!'$<4 (2*1 ;. +*
  6. @WebRTC BE • &) !'",# API-91. C5  21 •

    &)"$ 4 :=4 <7  3>6? • iOS/Android/Web +')!#%,( D; -918 C5 21 %*)! WebRTC3>0/ A
  7. %… • BHSDK)A## ([V • \C"pR)L%EiIW IFbZ '… • ocaPJMbaP!J!]nmSY

    s • HbhQ &E &-;>"$NqUD • 312=>/<+:G%F !XkKO %`T ?!  re^@g l4,5,jE* WebRTC7;126.>9)f_dA08'& (08&
  8.    "( • A B 2#1:1  /

    )  '+ %- &$ /,. IP *0  A &$!
  9.    & • AB 2 1:1  /

    #( %) "+ $! -*, IP '. #( B $!
  10. !  &* • A B2( 1:1! / A BP2P

     .-1/ 2UDP $"##3 P2P0%  )' $,+0%.
  11. SDP v=0 (……) a=group:BUNDLE audio video m=audio 54321 RTP/SAVPF 111

    103 104 0 8 106 105 13 126 (……) c=IN IP4 100.1.2.3 a=rtcp:54321 IN IP4 100.1.2.3 a=candidate:4022866446 1 udp 2113937151 192.168.0.1 34567 typ host generation 0 a=candidate:4022866446 2 udp 2113937151 192.168.0.1 34567 typ host generation 0 (……) a=rtpmap:111 opus/48000/2 a=fmtp:111 minptime=10 a=rtpmap:103 ISAC/16000 a=rtpmap:104 ISAC/32000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 (……)    SRTP    54321 Opus(48000kHz  )
  12. SDP v=0 (……) a=group:BUNDLE audio video m=audio 54321 RTP/SAVPF 111

    103 104 0 8 106 105 13 126 (……) c=IN IP4 100.1.2.3 a=rtcp:54321 IN IP4 100.1.2.3 a=candidate:4022866446 1 udp 2113937151 192.168.0.1 34567 typ host generation 0 a=candidate:4022866446 2 udp 2113937151 192.168.0.1 34567 typ host generation 0 (……) a=rtpmap:111 opus/48000/2 a=fmtp:111 minptime=10 a=rtpmap:103 ISAC/16000 a=rtpmap:104 ISAC/32000 a=rtpmap:0 PCMU/8000 a=rtpmap:8 PCMA/8000 (……) ICE
  13. STUN • ICE &.# • NAT2 # • 1% !#IP

    #/'0 $- • * +(&.UDP#""), STUN  STUN  NAT Binding Request +!$IPSTUN +!"IPSTUN Binding Request +!$IPNAT & IP() +!"IPSTUN Binding Response +!$IPSTUN +!"IPNAT & IP() 'NAT & IP() Binding Response +!$IPSTUN +!"IPSTUN 'NAT & IP() *)% # IP,. (-
  14. UDP NAT NAT B   NG   A

       OK  B  OK
  15. TURN • UDP'! & • FW%UDP '$#  ! "

    TURN Allocation Request IP STUN IP TURN Allocation Success Response IP STUN IP TURN TURN B A IP TURN
  16. TURN TURN TURN Create PermissionA B B 2 Create Permission

    Success Response OK • UDP'! & • FW%UDP '$#  ! "
  17. TURN TURN TURN A Create Permission A B B 2

    Create Permission Success Response OK 2 P A • UDP'! & • FW%UDP '$#  ! "
  18. TURN • TURNUDP0/! #"-&+ * %' • UDPTCPTLS4,2  

    3 ()  TURN   TURN       TURN-UDP / TURN-TCP / TURN-TLS 4,2 1$!. UDP
  19. &!H- • WebRTC'( %6C7 UDPH-1; • UDPH- ?=I4GE")3B RTP(Real Time

    Protocol)H-D      Jitter() Out-of-order () Loss (  )           % *# .= $*/5 +*>0  ,: .F )<A @8HA JRTCPSR/RR 29K
  20.  ;$ •WebRTC DataChannel   ;$)5 •SCTP(Stream Control Transmission

    Protocol)   ;$ •SCTPUDP TCP%&<#6>-'. 3=/:9'. +4 • SCTP,/ 3 DTLS 1*( • 0!2  SCTP QUIC"87 
  21. libwebrtc • WebRTC$(   • Google  '% OSS-Framework

    • Chrome, Firefox, SafariWebRTC-PF"& iOS, Android SDK #  • iOS/Android SDK!  https://webrtc.googlesource.com/src/
  22. libwebrtc • libwebrtc -& )     •

    *"  %#(,$!+ ' https://cocoapods.org/pods/GoogleWebRTC https://github.com/shiguredo/sora-webrtc-build
  23. Safari-/ • 2017.09 SafariWebRTC -/ • libwebrtc %  Chrome/Firefox

    ;'20 • %H.264$"% 41 • "(! ,86.:& • RTCPeerConnection+* getUserMedia+*  • 97@taminif3 #)5 http://taminif.hatenablog.jp/entry/2017/10/03/005306
  24. WebRTC IPv6 ! • WebRTCIPv6 (+ • IPv4 IPv6%' NAT64/DNS641

    TURN(.Android464XLAT2 STUN#)/ • & SafariTURN ,$   v6-v4 %' -   *" 1 NAT64/DNS64 --- https://www.slideshare.net/yuyarin/cedecnet-2015 2 464XLAT  --- https://www.slideshare.net/twovs/192004-on-android
  25. "0("' x WebRTC • WebRTC>B"0("'4 = +0$ 0$;? • :1<2EI

    = +0$ 0$J • MCU/SFU*%"0(0;?  • <1<51.)-SFU<A8.)-MCU • .!0%/ • GHG@Cbot"0("'4 ,/&79FD63 GHG@;?  SFU A B C .!0%/bot $&.0#
  26. !6+!( x WebRTC • .0$' • DNH/4';=P2P/ 4'5!6+P2P>  

    • !6+936+1IP(2#C  <:? *%,%K • TURNF  • &.0$' • /4'$-&6': !6+!(WebRTC4"4.4% )4#AL • @I7WebRTC GatewayEG • #6/,0%JB8A L DMM Eikaiwa-san @ WebRTC Meetup Tokyo #18 2 6&4Bot#6/,0%M https://youtu.be/aVmCgVunfog?t=2834
  27. IoT x WebRTC • WebRTC@K ?&(!%;S < ,.%#.% 7C •

    1RaspberryPiI9&(!%40  • HN"+- 5/WebRTC1"+-=2 P U 4/>JE8%*)TJ TQ  • RX • &(!%<MVF:L • W3&(!% • RaspberryPiI9&(!% $%'G6  • RX OA WebRTC Gateway BD 
  28. • RTP0& 6*)'  $ WebRTC,/ • WebRTC,/!"+ 2 (.

    IoT x WebRTC RTP WebRTC(5%) WebRTC Gateway WebRTC,/!  14 WebRTC(#5%) WebRTC Gateway -3: https://www.elekit.co.jp/product/MR-9107 WebRTC,/! 
  29. IoT x WebRTC • Janus WebRTC Gateway - https://janus.conf.meetecho.com/ •

    O;24(%7KEQW$Z  SFU/MCU/bdbTDR"9W`G • SlackdC_YSSFUIS #"eXA"K  $f • https://iwashi.co/2016/03/05/slack-webrtc-analysis.html • SkyWay WebRTC Gateway - https://github.com/skyway/skyway-webrtc-gateway/ • libwebrtc38,SkyWay*(057()81!iOS/Android/JS SDKU:JV?W • RTPUDP$]![WebRTC #" • Janus@ 24(%7PQWHF"" • McB WebRTC Gateway momo (WebRTC Native Client) – https://momo.shiguredo.com • libwebrtc38,Sigiredo soraeSFUf!.1%,L>$SFUa="S^< • N\ Open momo26+&'/ 5,-8/  • https://gist.github.com/voluntas/51c67d0d8ce7af9f24655cee4d7dd253
  30. VR x WebRTC WebVR meets WebRTC: Towards 360-degree social VR

    experiences https://youtu.be/2Ng67blnp9c?t=9
  31. VR x WebRTC • Oculus Go VR  • WebRTC

    Gateway     RTP WebRTC RTP RTP RTP WebRTC Gateway
  32.  • WebRTCP6;015*@8&<(=/)8,793+@.:?QZ C_6>1,= • WebRTC^J[\%#WebRTC6;015*@8&SUO  " $O& NF^EBH

    • WebRTCLAM-@4-)2SUIoTYD%VR YD% RW&T! • WebRTC&SU`V KI'ba X]G