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

LINEでビデオ通話してくれる妹の作り方

uezo
December 17, 2021

 LINEでビデオ通話してくれる妹の作り方

LINE Developer Community 忘年LT大会。LIFFでWebGLアプリを動かす技術です

uezo

December 17, 2021
Tweet

More Decks by uezo

Other Decks in Technology

Transcript

  1. ֓೦ΞʔΩςΫνϟ 6OJUZ8FC(-PO-*'' "[VSF4QFFDI4FSWJDFT l ௨࿩தͷը໘͸6OJUZ্Ͱ8FC(-ΛλʔήοτϓϥοτϑΥʔϜͱͯ͠։ൃ͠ɺ-*''ͱͯ͠ಈ࡞ l εΩϧຖͷର࿩ॲཧ౳͸αʔόʔαΠυʹ੾Γग़͢͜ͱͰ։ൃޮ཰Λ޲্ l ϓϩϯϓτ l

    τϐοΫͷཧղ l ର࿩ॲཧ $POWFSTBUJPO4FSWJDF ʢ'BTU"1* 1ZUIPOʣ 3FNJOEFS4FSWJDF 'BTU"1* 1ZUIPO 70*$&30*%4FSWFS l ొ࿥ l औಘ l ఆظ1VTI l จࣈى͜͠ l ಡΈ্͛ 70*$&30*%͍ͭͳͪΌΜ QZWDSPJEΛ 'BTU"1*Ͱ3&45"1*4FSWFSԽ -*/& ೝূ τʔΫϯ ཁٻԻ੠ ॲཧཁٻจݴ ॲཧཁٻจݴ Ԡ౴จݴ Ԡ౴จݴ Ԡ౴Ի੠ ϦϚΠϯμʔ௨஌ τʔΫϯ Ϣʔβ ৘ใ ϓογϡ ௨஌ૹ৴ ϦϚΠϯμʔ֬ೝ ͓஌Βͤจݴ ʢओͳར༻Ξηοτʣ l .JDSPQIPOF8FC(--JCSBSZ l 4"-4""NQMJUVEF l $IBUEPMM,JU l $ZHOFUʢ%Ϟσϧʣ ొ࿥
  2. ѱເʂ8FC(-ͱͷಆ͍ͷه࿥  ΤσΟλͰ͸ಈ͕͘ϒϥ΢βͰಈ͔ͳ͍͜ͱ͕ଟ͍ɻͰ΋Ϗϧυʹ෼ʙ෼͔͔Δ  l5PVTFEMPQFO ZPVOFFEUPVTF&NTDSJQUFO`T MJOLJOHTVQQPSU TFF IUUQTHJUIVCDPNLSJQLFOFNTDSJQUFOXJLJ-JOLJOHz 👉ݪҼՕॴಛఆ͕ख୳Γ

     $ඪ४ͷBTZODBXBJUͰॲཧ͕ఀࢭ👉ϒϥ΢β+4͸γϯάϧεϨουͰͨ͠Ͷɻɻ6OJ5BTL΁Ҡߦ  /&5ඪ४ͷ)UUQ$MJFOU࢖͑ͳ͍👉6OJUZ8FC3FRVFTUʹஔ͖׵͑ɻ6OJ5BTLͷ͓͔͛ͰίϧʔνϯͰ͸ ͳ͘BXBJUͰ͖Δʂ࠷ߴʂʂ  )551ϦΫΤετࣦഊ👉8FCϖʔδͳͷͰ$034ରԠ͕ඞཁ  ඪ४ͷ.JDSPQIPOF࢖͑ͣ👉༗ঈΞηοτʮ.JDSPQIPOF8FC(--JCSBSZʯʹཔΔ  ϒϥ΢β࣮ߦ࣌ͷΈϚΠΫͷϓνϊΠζൃੜɺԻ੠ೝࣝͷ๦͛ʹ👉ϊΠζͷಛ௃Λ௫ΜͰ࿥Իର৅֎ ͱ͢Δॲཧ  ϚΠΫೖྗ͕ )[Ͱ࿥ԻͰ͖ͣ👉)[ͱͯ͠ରԠɻݪҼෆ໌ɻɻ  "VEJP$MJQ(FU%BUB ࢖༻ෆՄɻ࿥ԻσʔλΛѻ͑ͣ👉6OJUZͷαϯϓϦϯάσʔλΛ8BWʹಠࣗม׵  %PXOMPBE)BOEMFS"VEJP$MJQ(FU$POUFOU ΋࢖༻ෆՄɻԻ੠ಡΈ্͛σʔλΛ࠶ੜͰ͖ͣ👉1$. σʔλ͔Β"VEJP$MJQ$MFBUF Ͱੜ੒  .1ͳͲѹॖԻݯ࠶ੜͰ͖ͳ͍ͨΊ554ͷμ΢ϯϩʔυαΠζେ👉αϯϓϦϯάϨʔτΛ )[ ͔Β )[ʹԼ͛ͯ൒ݮ  Ի੠ؔ࿈ͷ੍໿ͰϦοϓγϯΫ΋Ͱ͖ͣ👉༗ঈΞηοτʮ4"-4"ʯ ʮ"NQMJUVEFʯʹཔΔ  ೔ຊޠ͕6*ʹදࣔ͞Εͳ͍👉ϑΥϯτϑΥʔϧόοΫ͠ͳ͍͜ͱ͕ݪҼɻ೔ຊޠϑΥϯτಋೖ
  3. -*''ͱ8FC(-ͷ૬ޓӡ༻5JQTʢਤղʣ 6OJUZεΫϦϓτ KTMJC ൃ৴தը໘ϒϥ΢β+4 -*/& όοΫΤϯυΞϓϦ 3FRVJSF-JGG5PLFO TFTTJPO4UPSBHF l -*''ॳظԽ࣌ͷϦμΠϨΫτΛߟྀ͠ɺ6OJUZΞϓϦΛϩʔυ͠ͳ͍ঢ়ଶͰॳظԽˍτʔΫϯΛऔಘ

    l 6OJUZ8FC(-ͷϒϥ΢βεΫϦϓτ૬ޓӡ༻ͷػೳʢKTMJCʣΛར༻͠ϒϥ΢β͔ΒτʔΫϯΛऔಘ l όοΫΤϯυଆʹτʔΫϯΛ౉ͯ͠ݕূɺϢʔβʔ৘ใͳͲΛ༻͍ͯ೚ҙͷॲཧΛ࣮ߦ l ௨࿩தը໘Ͱ͸JOJU ͍ͯ͠ͳ͍ͷͰػೳར༻ʹ੍໿͋Γͷ͸ͣʢະݕূɻJGSBNFͰରԠ͔ͳʁʣ τʔΫϯݕূ Ϣʔβʔ৘ใ ػೳ΁ͷॲཧཁٻʢXJUIτʔΫϯʣ ػೳॲཧʢϢʔβʔʹඥ͚ͮ ͨϦϚΠϯυొ࿥ͳͲʣ MJGGJOJU ͱ MJGGHFU"DDFTT5PLFO "DDFTT5PLFO TFU*UFN ௨࿩தը໘ϒϥ΢β+4 HFU*UFN "DDFTT5PLFO TFOE-JGG5PLFO TFU-JGG5PLFO Ϩεϙϯεʢൃ࿩จݴΞχϝʔγϣϯʣ IUUQTEFWFMPQFSTMJOFCJ[KBEPDTMJGGPQFOJOHMJGGBQQSFEJSFDUGMPX 4FFBMTP -*''63-ʹΞΫηε͔ͯ͠Β-*''ΞϓϦ͕։͘·Ͱͷಈ࡞ʹ͍ͭͯ
  4. -*''ͱ8FC(-ͷ૬ޓӡ༻5JQTʢίʔυʣ <script> window.liff = liff; window.sendLiffToken = function() { var

    liffToken = window.sessionStorage.getItem("LiffAccessToken"); unityInstance.SendMessage("Cygnet_MidiDress", "SetLiffToken", liffToken); } </script> 6OJUZεΫϦϓτ KTMJC using System.Runtime.InteropServices; using UnityEngine; public class LiffController : MonoBehaviour { [DllImport("__Internal")] private static extern void RequireLiffToken(); public string LiffAccessToken { private set; get; } private void Start() { // Request to HTML to call SetLiffToken RequireLiffToken(); } // HTML calls this method to pass the liff token public void SetLiffToken(string liffToken) { LiffAccessToken = liffToken; } } mergeInto(LibraryManager.library, { CloseLiffWindow: function () { window.liff.closeWindow(); }, RequireLiffToken: function () { window.sendLiffToken(); } }); ϒϥ΢β+4