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

奥深きAPLの世界

 奥深きAPLの世界

2019/07/26 AAJUG沖縄 登壇資料

chao2suke

July 26, 2019
Tweet

More Decks by chao2suke

Other Decks in Technology

Transcript

  1. Ԟਂ͖
    "1-ͷੈք
    AAJUGԭೄ vol.1 2019.07.26
    Ϋϥεϝιουגࣜձࣾͤʔͷ

    View Slide

  2. ਗ਼໺ ߶࢙ʢͤʔͷʣ
    Ϋϥεϝιουגࣜձࣾ ࡳຈΦϑΟεॴଐ
    ׆ಈ಺༰
    ίϛϡχςΟʮAlexa Salonʯओ࠵
    ίϛϡχςΟʮAmazon Alexa Japan User GroupʯӡӦ
    Amazonೝఆ Alexa ΤʔδΣϯγʔ
    ॻ੶ʮ͸͡ΊͯͷAlexaεΩϧ։ൃʯࣥච
    Classmethod, Inc.
    AI Solution Department
    Alexa Technical Evangelist / VUI Architect

    View Slide

  3. AGENDA

    View Slide

  4. Step #1 Step #3 Step #5
    Step #2 Step #4
    APLͱ͸
    APLͷ࣮૷
    APLͷجૅ
    APL Video
    APLͰͰ͖Δ͜ͱ

    View Slide

  5. "1-
    "MFYB1SFTFOUBUJPO-BOHVBHF

    View Slide

  6. Display Template
    ܾ·ͬͨ࿮ʹςΩετ΍ը૾Λ౰ͯ͸ΊΔɻ
    01
    02
    03 ࣗ༝౓͕௿͍ɻ
    هड़͕؆୯ɻ

    View Slide

  7. APL
    ࣗ༝౓͕ߴ͍ɻ
    01
    02
    03 ը໘ͷେ͖͞Ͱग़͠෼͚ΒΕΔɻ
    ಈ͖͕͚ͭΒΕΔɻ

    View Slide

  8. "1-ͰͰ͖Δ͜ͱ

    View Slide

  9. 01
    07 02
    03
    06
    05 04
    APL͕
    Ͱ͖Δ͜ͱ
    APL
    ಡΈ্͛ςΩετಉظ
    01.
    02.
    03.
    04.
    05.
    06.
    07.
    ը໘αΠζ͝ͱͷग़͠෼͚
    σʔλͱϨΠΞ΢τͷ
    ෼཭
    εΫϩʔϧରԠ
    εϥΠυγϣʔ
    ಈతͳUIͷߏங
    λονɺεϫΠϓରԠ

    View Slide

  10. "1-ͷجૅ

    View Slide

  11. APL Document
    ը໘ϨΠΞ΢τͱ
    ίϯϙʔωϯτΛنఆ͢Δ

    APL Data
    ը໘ʹຒΊࠐΉ
    ৘ใΛఆٛ͢Δ

    APL Command
    ը໘ͱͷ
    ΠϯλϥΫγϣϯΛ
    ఆٛ͢Δ

    View Slide

  12. ※ΠϝʔδͰ͢ɻ
    APL Data APL Document
    APL Commands

    View Slide

  13. "1-%PDVNFOU

    View Slide

  14. APL Document
    ελΠϧγʔτతͳΠϝʔδ
    {
    "type": "Container",
    "height": "100vh",
    "item": [
    {
    "type": "Image",
    "width": "100vw",
    "height": "100vh",
    "opacity": 0.4,
    "source": "https:/
    /XXX.png",
    "scale": "best-fill",
    "position": "absolute"
    },
    {
    "type": "Text",
    "paddingTop": "50px",
    "text": "͖͢ͳͻͱΛ͑ΒΜͰͶ"
    },
    {
    "type": "Container",
    "width": "100vw",
    "height": "65vh",
    .......

    View Slide

  15. Image / Text
    Pager Touch Wrapper
    APL Document ελΠϧγʔτతͳΠϝʔδ
    Sequence
    Container Frame
    Ұํ޲ʹ
    ίϯϙʔωϯτΛ഑
    ஔɻ
    ͦͷ·Μ·ɻ
    ը૾ͱจࣈɻ
    ڥքͱഎܠ৭ɻ
    ؙΛ࡞ͬͯͦͷதʹς
    ΩετΛ഑ஔ͢Δɺ౳
    ϖʔδϯάॲཧɻ
    ίϯϙʔωϯτ܈ͷ
    ഑ྻ͕ೖΔɻ
    εΫϩʔϧͰදࣔɻ
    ॎͱԣΛબ΂Δɻ
    ࢦఆۣͨ͠ܗʹ
    λονΠϕϯτΛ
    ΋ͨͤΔ

    View Slide

  16. APL DocumentʹΑΔߏ੒

    View Slide

  17. APL DocumentʹΑΔߏ੒
    Container
    Container
    Container
    Image Image Image
    Text Text Text
    Panel Text

    View Slide

  18. ΦʔαϦϯάπʔϧ

    View Slide

  19. ΦʔαϦϯάπʔϧ
    "1-%PDVNFOUͷߏஙΛखܰʹ

    View Slide

  20. "1-%BUB

    View Slide

  21. ※ΠϝʔδͰ͢ɻ
    APL Data APL Document
    APL Commands

    View Slide

  22. datasource
    όΠϯσΟϯά͍ͨ͠%PDVNFOUͷ৔ॴΛม਺Խͯ͠
    EBUBTPVSDFʹσʔλΛೖΕΔ
    %PDVNFOUͱ%BUBΛͭͳ͙

    View Slide

  23. "1-$PNNBOE

    View Slide

  24. ※ΠϝʔδͰ͢ɻ
    APL Data APL Document
    APL Commands

    View Slide

  25. APL Commands
    &YFDVUF$PNNBOETͰಈ࡞Λ+40/ܗࣜͰఆٛɻ
    "1-%PDVNFOUͷίϯϙʔωϯτʹ*%Λ͚ͭ
    "1-$PNNBOEͷ$PNQPOFOU*%Ͱࢦఆͯ͠
    ಈ͖Λ͚ͭΔ
    "1-%PDVNFOUʹಈ͖Λ͚ͭΔ

    View Slide

  26. APL Commandsγʔέϯε
    Sequential
    SetPage
    Parallel
    SpeakItem
    SetPage
    Parallel
    SpeakItem
    SetPage
    Parallel
    SpeakItem
    …………

    View Slide

  27. ࣮૷ํ๏

    View Slide

  28. ΠϯλʔϑΣʔεΛઃఆ

    View Slide

  29. APL DocumentΛઃఆ

    View Slide

  30. A P L D o cu m e n tΛઃఆ

    View Slide

  31. addD ir e ctiv e () Ͱ Ϩεϙϯε

    View Slide

  32. DocumentͱCommand͸ผ
    APL Document
    APL Command

    View Slide

  33. RenderDocument
    document: “cafe.json”,
    datasources: {
    cafedata: {
    properties: {

    dataA: “AAA”,
    dataB: “BBB”,
    dataC: “CCC”
    }
    }
    }
    cafe.json(Lambda)
    {
    "type": "Text",
    "width": "0",
    "height": "0",
    "text": "${payload.cafedata.properties.dataA"},
    "id": "SpeechDrip",
    DocumentͱDataSources

    View Slide

  34. DocumentͱDataSources
    RenderDocument cafe.json(Lambda)
    document: “cafe.json”,
    datasources: {
    cafedata: {
    properties: {

    dataA: “AAA”,
    dataB: “BBB”,
    dataC: “CCC”
    }
    }
    }
    {
    "type": "Text",
    "width": "0",
    "height": "0",
    "text": "${payload.cafedata.properties.dataA"},
    "id": "SpeechDrip",

    View Slide

  35. ※ΠϝʔδͰ͢ɻ
    APL Data APL Document
    APL Commands

    View Slide

  36. "1-7JEFP

    View Slide

  37. APL Document

    View Slide

  38. ओͳϓϩύςΟ
    audioTrack foreground/background
    autoplay true/false
    source ιʔεURL
    onEnd ऴྃ࣌ͷίϚϯυ

    View Slide

  39. Tips
    01
    02
    03
    ιʔε63-͸഑ྻܗࣜͰ΋0,
    "1-$PNNBOEٴͼTQFFDI0VUQVU͸࠶ੜதՄೳ
    BVEJPUSBDLGPSFHSPVOE࣌͸1BSSBSFMίϚϯυ͸࢖͑ͳ͍

    View Slide

  40. Summ a ry
    01
    02
    03
    "1-͸ը૾ɾςΩετɾϘλϯɾϏσΦͳͲ͕ࣗ༝ʹ഑ஔͰ͖Δ
    "1-$PNNBOEͰ"1-ͷૢ࡞͕Մೳ
    ϏσΦΛ্ख͘࢖͏ͱΑΓྟ৔ײͷ͋ΔεΩϧ͕Ͱ͖ΔΑ

    View Slide