agora-appbuilder-core 4.1.20 → 4.1.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/package.json +1 -1
  2. package/template/bridge/rtm/web/__tests__/storage.test.ts +130 -0
  3. package/template/bridge/rtm/web/index.ts +44 -19
  4. package/template/customization-api/customize.tsx +6 -0
  5. package/template/customization-api/index.ts +11 -0
  6. package/template/customization-api/typeDefinition.ts +6 -0
  7. package/template/defaultConfig.js +2 -2
  8. package/template/src/assets/live-reactions/1f440.gif +0 -0
  9. package/template/src/assets/live-reactions/1f44d_1f3fb.gif +0 -0
  10. package/template/src/assets/live-reactions/1f44d_1f3fc.gif +0 -0
  11. package/template/src/assets/live-reactions/1f44d_1f3fd.gif +0 -0
  12. package/template/src/assets/live-reactions/1f44d_1f3fe.gif +0 -0
  13. package/template/src/assets/live-reactions/1f44d_1f3ff.gif +0 -0
  14. package/template/src/assets/live-reactions/1f44f_1f3fb.gif +0 -0
  15. package/template/src/assets/live-reactions/1f44f_1f3fc.gif +0 -0
  16. package/template/src/assets/live-reactions/1f44f_1f3fd.gif +0 -0
  17. package/template/src/assets/live-reactions/1f44f_1f3fe.gif +0 -0
  18. package/template/src/assets/live-reactions/1f44f_1f3ff.gif +0 -0
  19. package/template/src/assets/live-reactions/1f4a1.gif +0 -0
  20. package/template/src/assets/live-reactions/1f4af.gif +0 -0
  21. package/template/src/assets/live-reactions/1f525.gif +0 -0
  22. package/template/src/assets/live-reactions/1f60e.gif +0 -0
  23. package/template/src/assets/live-reactions/1f643.gif +0 -0
  24. package/template/src/assets/live-reactions/1f64c.gif +0 -0
  25. package/template/src/assets/live-reactions/1f64c_1f3fb.gif +0 -0
  26. package/template/src/assets/live-reactions/1f64c_1f3fc.gif +0 -0
  27. package/template/src/assets/live-reactions/1f64c_1f3fd.gif +0 -0
  28. package/template/src/assets/live-reactions/1f64c_1f3fe.gif +0 -0
  29. package/template/src/assets/live-reactions/1f64c_1f3ff.gif +0 -0
  30. package/template/src/assets/live-reactions/1f64f.gif +0 -0
  31. package/template/src/assets/live-reactions/1f64f_1f3fb.gif +0 -0
  32. package/template/src/assets/live-reactions/1f64f_1f3fc.gif +0 -0
  33. package/template/src/assets/live-reactions/1f64f_1f3fd.gif +0 -0
  34. package/template/src/assets/live-reactions/1f64f_1f3fe.gif +0 -0
  35. package/template/src/assets/live-reactions/1f64f_1f3ff.gif +0 -0
  36. package/template/src/assets/live-reactions/1f680.gif +0 -0
  37. package/template/src/assets/live-reactions/2705.gif +0 -0
  38. package/template/src/assets/live-reactions/animated/1f440.json +1 -0
  39. package/template/src/assets/live-reactions/animated/1f44d_1f3fb.json +1 -0
  40. package/template/src/assets/live-reactions/animated/1f44d_1f3fc.json +1 -0
  41. package/template/src/assets/live-reactions/animated/1f44d_1f3fd.json +1 -0
  42. package/template/src/assets/live-reactions/animated/1f44d_1f3fe.json +1 -0
  43. package/template/src/assets/live-reactions/animated/1f44d_1f3ff.json +1 -0
  44. package/template/src/assets/live-reactions/animated/1f44f_1f3fb.json +1 -0
  45. package/template/src/assets/live-reactions/animated/1f44f_1f3fc.json +1 -0
  46. package/template/src/assets/live-reactions/animated/1f44f_1f3fd.json +1 -0
  47. package/template/src/assets/live-reactions/animated/1f44f_1f3fe.json +1 -0
  48. package/template/src/assets/live-reactions/animated/1f44f_1f3ff.json +1 -0
  49. package/template/src/assets/live-reactions/animated/1f4a1.json +1 -0
  50. package/template/src/assets/live-reactions/animated/1f4af.json +1 -0
  51. package/template/src/assets/live-reactions/animated/1f525.json +1 -0
  52. package/template/src/assets/live-reactions/animated/1f60e.json +1 -0
  53. package/template/src/assets/live-reactions/animated/1f643.json +1 -0
  54. package/template/src/assets/live-reactions/animated/1f64c.json +1 -0
  55. package/template/src/assets/live-reactions/animated/1f64c_1f3fb.json +1 -0
  56. package/template/src/assets/live-reactions/animated/1f64c_1f3fc.json +1 -0
  57. package/template/src/assets/live-reactions/animated/1f64c_1f3fd.json +1 -0
  58. package/template/src/assets/live-reactions/animated/1f64c_1f3fe.json +1 -0
  59. package/template/src/assets/live-reactions/animated/1f64c_1f3ff.json +1 -0
  60. package/template/src/assets/live-reactions/animated/1f64f.json +1 -0
  61. package/template/src/assets/live-reactions/animated/1f64f_1f3fb.json +1 -0
  62. package/template/src/assets/live-reactions/animated/1f64f_1f3fc.json +1 -0
  63. package/template/src/assets/live-reactions/animated/1f64f_1f3fd.json +1 -0
  64. package/template/src/assets/live-reactions/animated/1f64f_1f3fe.json +1 -0
  65. package/template/src/assets/live-reactions/animated/1f64f_1f3ff.json +1 -0
  66. package/template/src/assets/live-reactions/animated/1f680.json +1 -0
  67. package/template/src/assets/live-reactions/animated/2705.json +1 -0
  68. package/template/src/assets/live-reactions/custom/ty.png +0 -0
  69. package/template/src/components/RTMConfigure.tsx +15 -10
  70. package/template/src/components/StorageContext.tsx +3 -0
  71. package/template/src/components/reactions/LiveReactionBadge.tsx +20 -2
  72. package/template/src/components/reactions/LiveReactionButton.tsx +200 -44
  73. package/template/src/components/reactions/LiveReactionStageOverlay.native.tsx +34 -10
  74. package/template/src/components/reactions/LiveReactionStageOverlay.tsx +30 -7
  75. package/template/src/components/reactions/catalog.ts +241 -0
  76. package/template/src/components/useVideoCall.tsx +20 -2
  77. package/template/src/rtm/__tests__/isRemoteDeparture.test.ts +19 -0
  78. package/template/src/rtm/isRemoteDeparture.ts +4 -0
  79. package/template/src/subComponents/caption/__tests__/sttRequestBody.test.ts +61 -0
  80. package/template/src/subComponents/caption/__tests__/sttSessionId.native.test.ts +76 -0
  81. package/template/src/subComponents/caption/__tests__/sttSessionId.web.test.ts +190 -0
  82. package/template/src/subComponents/caption/__tests__/useSTTAPI.test.tsx +129 -0
  83. package/template/src/subComponents/caption/sttRequestBody.ts +54 -0
  84. package/template/src/subComponents/caption/sttSessionCoordinator.ts +315 -0
  85. package/template/src/subComponents/caption/sttSessionId.ts +21 -0
  86. package/template/src/subComponents/caption/sttSessionId.web.ts +21 -0
  87. package/template/src/subComponents/caption/useSTTAPI.tsx +13 -33
  88. package/template/src/utils/__tests__/useEndCall.test.tsx +282 -0
  89. package/template/src/utils/useEndCall.ts +63 -22
@@ -0,0 +1 @@
1
+ {"v":"5.8.1","fr":60,"ip":0,"op":100,"w":1024,"h":1024,"nm":"emoji_Check mark button","ddd":0,"assets":[],"layers":[{"ddd":0,"ind":1,"ty":3,"nm":"Null depth","sr":1,"ks":{"o":{"a":0,"k":0,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.297,"y":0},"t":19,"s":[512,512,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":23,"s":[517.624,517.072,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0,"y":1},"o":{"x":0.167,"y":0.167},"t":25,"s":[550,542,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":0.667},"o":{"x":0.333,"y":0.333},"t":41,"s":[556,546,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0,"y":1},"o":{"x":0.333,"y":0},"t":66,"s":[556,546,0],"to":[0,0,0],"ti":[0,0,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.75,"y":0},"t":72,"s":[492,498,0],"to":[0,0,0],"ti":[0,0,0]},{"t":84,"s":[512,512,0]}],"ix":2,"l":2},"a":{"a":0,"k":[0,0,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"ip":0,"op":100,"st":0,"bm":0},{"ddd":0,"ind":2,"ty":4,"nm":"check mark","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-4,0,0],"ix":2,"l":2},"a":{"a":0,"k":[512,512,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":0,"k":{"i":[[22.24,-0.16],[9.52,30.241],[0,0],[-38.48,11.679],[-13.12,-36.64],[0,0],[0,0],[-31.6,-24.959],[24.96,-31.6],[0,0]],"o":[[-31.68,0.88],[0,0],[-11.68,-38.48],[37.2,-11.281],[0,0],[0,0],[24.96,-31.6],[31.6,24.96],[0,0],[-13.68,17.521]],"v":[[-170.24,368.039],[-239.84,318.439],[-360.64,-45.561],[-312.08,-136.439],[-222.24,-91.16],[-143.84,144.84],[232.96,-331.96],[335.36,-343.96],[347.36,-241.56],[-113.44,340.039]],"c":true},"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.984000052658,0.976000019148,0.976000019148,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[516.32,507.64],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":4,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":162,"st":0,"bm":0},{"ddd":0,"ind":3,"ty":4,"nm":"shine 2","parent":1,"sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-304.8,-316.262,0],"ix":2,"l":2},"a":{"a":0,"k":[110.4,114.662,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0,"y":1},"o":{"x":0.167,"y":0.167},"t":25,"s":[{"i":[[0.952,-50.613],[-42.998,-0.278],[-66.27,25.128],[-41.77,12.592],[-4.032,108.786],[71.551,-1.254],[68.99,-2.667],[47.129,-25.057],[0.983,-61.742]],"o":[[-1.76,93.592],[39.896,0.258],[83.23,-31.559],[39.303,-11.848],[3.23,-87.142],[-90.8,1.592],[-68.99,2.667],[-46.88,24.925],[-0.553,34.765]],"v":[[-125.44,456.671],[-87.096,580.004],[161.57,405.822],[617.57,263.671],[695.57,29.404],[633.6,-99.329],[66.56,-99.583],[-38.32,-20.662],[-117.565,102.004]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":41,"s":[{"i":[[0.952,-50.613],[-42.998,-0.278],[-70.085,10.55],[-41.77,12.592],[-0.77,174.858],[71.363,5.333],[68.989,-2.667],[75.443,-58.667],[2.667,-34.667]],"o":[[-1.76,93.592],[39.896,0.258],[70.085,-10.55],[39.303,-11.848],[0.573,-130.093],[-71.363,-5.333],[-68.99,2.667],[-75.443,58.667],[-2.667,34.667]],"v":[[-117.44,548.671],[-75.096,672.004],[175.57,445.822],[657.57,353.671],[695.57,121.404],[629.6,-91.329],[244.56,-91.329],[85.68,95.338],[-110.183,138.004]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"t":66,"s":[{"i":[[0.952,-50.613],[-42.998,-0.278],[-70.085,10.55],[-41.77,12.592],[-0.77,174.858],[71.363,5.333],[68.989,-2.667],[75.443,-58.667],[2.667,-34.667]],"o":[[-1.76,93.592],[39.896,0.258],[70.085,-10.55],[39.303,-11.848],[0.573,-130.093],[-71.363,-5.333],[-68.99,2.667],[-75.443,58.667],[-2.667,34.667]],"v":[[-117.44,548.671],[-75.096,672.004],[175.57,445.822],[657.57,353.671],[695.57,121.404],[629.6,-91.329],[244.56,-91.329],[85.68,95.338],[-110.183,138.004]],"c":true}]},{"t":68,"s":[{"i":[[0.952,-50.613],[-42.998,-0.278],[-66.27,25.128],[-41.77,12.592],[-4.032,108.786],[71.551,-1.254],[68.99,-2.667],[47.129,-25.057],[0.983,-61.742]],"o":[[-1.76,93.592],[39.896,0.258],[83.23,-31.559],[39.303,-11.848],[3.23,-87.142],[-90.8,1.592],[-68.99,2.667],[-46.88,24.925],[-0.553,34.765]],"v":[[-125.44,456.671],[-87.096,580.004],[161.57,405.822],[617.57,263.671],[695.57,29.404],[633.6,-99.329],[66.56,-99.583],[-38.32,-20.662],[-117.565,102.004]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.643137254902,0.792156922583,0.482352971096,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[110.4,114.663],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":25,"op":68,"st":0,"bm":0},{"ddd":0,"ind":4,"ty":4,"nm":"shine ","parent":1,"sr":1,"ks":{"o":{"a":1,"k":[{"t":0,"s":[100],"h":1},{"t":25,"s":[0],"h":1},{"t":68,"s":[100],"h":1}],"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[-304.8,-316.262,0],"ix":2,"l":2},"a":{"a":0,"k":[110.4,114.662,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":1,"y":0},"t":19,"s":[{"i":[[0,24],[73.6,-2.4],[18.4,-22.4],[0.8,-54.4],[-20,0],[-22.4,35.2]],"o":[[0,-18.4],[-61.6,2.4],[-18.4,22.4],[0,38.4],[27.2,0],[43.2,-69.6]],"v":[[110.4,-92.537],[24,-114.137],[-86.4,-82.137],[-110.4,40.263],[-90.4,114.663],[-40.8,16.263]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":23,"s":[{"i":[[10.122,21.908],[73.627,-2.046],[16.518,-28.544],[0.603,-53.491],[-28.246,13.972],[-29.131,33.702]],"o":[[-10.122,-16.877],[-65.09,2.013],[-16.518,28.791],[0.115,39.117],[34.714,-13.972],[47.817,-64.606]],"v":[[156.89,-93.485],[20.843,-112.89],[-89.498,-71.394],[-110.828,70.97],[-83.162,137.809],[-12.162,22.042]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":24,"s":[{"i":[[99.613,3.409],[73.864,1.083],[-0.121,-82.861],[-1.136,-45.454],[-101.149,137.5],[-88.636,20.454]],"o":[[-99.613,-3.409],[-95.945,-1.407],[0.124,85.297],[1.136,45.455],[101.149,-137.5],[88.636,-20.455]],"v":[[567.908,-101.867],[-7.068,-101.867],[-116.892,23.587],[-114.613,342.451],[-19.172,342.451],[241.023,73.133]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":25,"s":[{"i":[[99.613,3.409],[73.864,1.083],[-0.121,-82.861],[-1.136,-45.454],[-101.149,137.5],[-134.035,113.593]],"o":[[-99.613,-3.409],[-95.945,-1.407],[0.124,85.297],[1.136,45.455],[101.149,-137.5],[69.396,-58.813]],"v":[[643.908,-101.123],[-7.068,-101.867],[-116.892,23.587],[-114.613,542.451],[-19.172,542.451],[299.023,209.133]],"c":true}]},{"i":{"x":0.25,"y":1},"o":{"x":0.167,"y":0.167},"t":68,"s":[{"i":[[0,24],[73.6,-2.4],[18.4,-22.4],[0.8,-54.4],[-20,0],[-22.4,35.2]],"o":[[0,-18.4],[-61.6,2.4],[-18.4,22.4],[0,38.4],[27.2,0],[43.2,-69.6]],"v":[[110.4,-92.537],[24,-114.137],[-86.4,-82.137],[-110.4,40.263],[-90.4,114.663],[-40.8,16.263]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.75,"y":0},"t":72,"s":[{"i":[[0,15.241],[51.626,-1.524],[12.907,-14.225],[0.561,-34.546],[-14.029,0],[-15.712,22.353]],"o":[[0,-11.685],[-43.209,1.524],[-12.907,14.225],[0,24.385],[19.08,0],[30.303,-44.199]],"v":[[31.04,-80.832],[-29.565,-94.548],[-107.005,-74.227],[-123.84,3.501],[-109.811,50.748],[-75.019,-11.74]],"c":true}]},{"t":84,"s":[{"i":[[0,24],[73.6,-2.4],[18.4,-22.4],[0.8,-54.4],[-20,0],[-22.4,35.2]],"o":[[0,-18.4],[-61.6,2.4],[-18.4,22.4],[0,38.4],[27.2,0],[43.2,-69.6]],"v":[[110.4,-92.537],[24,-114.137],[-86.4,-82.137],[-110.4,40.263],[-90.4,114.663],[-40.8,16.263]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.643137254902,0.792156922583,0.482352971096,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[110.4,114.663],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":100,"st":0,"bm":0},{"ddd":0,"ind":5,"ty":4,"nm":"button ","sr":1,"ks":{"o":{"a":0,"k":100,"ix":11},"r":{"a":0,"k":0,"ix":10},"p":{"a":0,"k":[511.96,512,0],"ix":2,"l":2},"a":{"a":0,"k":[480.29,480.25,0],"ix":1,"l":2},"s":{"a":0,"k":[100,100,100],"ix":6,"l":2}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"t":19,"s":[{"i":[[0,0],[0,0],[0.241,-33.04],[0,0],[-33.119,-0.08],[0,0],[0,0],[-0.08,33.12],[0,0],[0,0],[32.399,0.72]],"o":[[0,0],[-33.04,0.24],[0,0],[-0.08,33.12],[0,0],[0,0],[33.12,0.08],[0,0],[0,0],[0.72,-32.4],[0,0]],"v":[[392.88,-451.64],[-392.72,-451.64],[-452.72,-391.64],[-452.72,391.56],[-392.88,451.56],[-392.72,451.56],[392.08,451.56],[452.08,391.72],[452.08,391.56],[452.08,-391.64],[394.641,-451.64]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":23,"s":[{"i":[[0,0],[0,0],[0.241,-33.04],[0,0],[-33.119,-0.08],[0,0],[0,0],[-0.08,33.12],[0,0],[0,0],[32.399,0.72]],"o":[[0,0],[-33.04,0.24],[0,0],[-0.08,33.12],[0,0],[0,0],[33.12,0.08],[0,0],[0,0],[0.72,-32.4],[0,0]],"v":[[400.047,-444.246],[-385.553,-444.246],[-445.553,-384.246],[-445.553,398.954],[-385.713,458.954],[-385.553,458.954],[399.247,458.954],[459.247,399.114],[459.247,398.954],[459.247,-384.246],[401.808,-444.246]],"c":true}]},{"i":{"x":0,"y":1},"o":{"x":0.167,"y":0.167},"t":25,"s":[{"i":[[0,0],[0,0],[0.241,-33.04],[0,0],[-33.119,-0.08],[0,0],[0,0],[-0.08,33.12],[0,0],[0,0],[32.399,0.72]],"o":[[0,0],[-33.04,0.24],[0,0],[-0.08,33.12],[0,0],[0,0],[33.12,0.08],[0,0],[0,0],[0.72,-32.4],[0,0]],"v":[[439.78,-403.254],[-345.819,-403.254],[-405.819,-343.254],[-405.819,439.946],[-345.98,499.946],[-345.819,499.946],[438.98,499.946],[498.98,440.106],[498.98,439.946],[498.98,-343.254],[441.541,-403.254]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":41,"s":[{"i":[[0,0],[0,0],[0.241,-33.04],[0,0],[-33.119,-0.08],[0,0],[0,0],[-0.08,33.12],[0,0],[0,0],[32.399,0.72]],"o":[[0,0],[-33.04,0.24],[0,0],[-0.08,33.12],[0,0],[0,0],[33.12,0.08],[0,0],[0,0],[0.72,-32.4],[0,0]],"v":[[448.13,-394.64],[-337.47,-394.64],[-397.47,-334.64],[-397.47,448.56],[-337.63,508.56],[-337.47,508.56],[447.33,508.56],[507.33,448.72],[507.33,448.56],[507.33,-334.64],[449.891,-394.64]],"c":true}]},{"i":{"x":0,"y":1},"o":{"x":0.333,"y":0},"t":66,"s":[{"i":[[0,0],[0,0],[0.241,-33.04],[0,0],[-33.119,-0.08],[0,0],[0,0],[-0.08,33.12],[0,0],[0,0],[32.399,0.72]],"o":[[0,0],[-33.04,0.24],[0,0],[-0.08,33.12],[0,0],[0,0],[33.12,0.08],[0,0],[0,0],[0.72,-32.4],[0,0]],"v":[[448.13,-394.64],[-337.47,-394.64],[-397.47,-334.64],[-397.47,448.56],[-337.63,508.56],[-337.47,508.56],[447.33,508.56],[507.33,448.72],[507.33,448.56],[507.33,-334.64],[449.891,-394.64]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.75,"y":0},"t":72,"s":[{"i":[[0,0],[0,0],[0.241,-33.04],[0,0],[-33.119,-0.08],[0,0],[0,0],[-0.08,33.12],[0,0],[0,0],[32.399,0.72]],"o":[[0,0],[-33.04,0.24],[0,0],[-0.08,33.12],[0,0],[0,0],[33.12,0.08],[0,0],[0,0],[0.72,-32.4],[0,0]],"v":[[372.88,-461.64],[-412.72,-461.64],[-472.72,-401.64],[-472.72,381.56],[-412.88,441.56],[-412.72,441.56],[372.08,441.56],[432.08,371.72],[432.08,371.56],[432.08,-401.64],[374.641,-461.64]],"c":true}]},{"t":84,"s":[{"i":[[0,0],[0,0],[0.241,-33.04],[0,0],[-33.119,-0.08],[0,0],[0,0],[-0.08,33.12],[0,0],[0,0],[32.399,0.72]],"o":[[0,0],[-33.04,0.24],[0,0],[-0.08,33.12],[0,0],[0,0],[33.12,0.08],[0,0],[0,0],[0.72,-32.4],[0,0]],"v":[[392.88,-451.64],[-392.72,-451.64],[-452.72,-391.64],[-452.72,391.56],[-392.88,451.56],[-392.72,451.56],[392.08,451.56],[452.08,391.72],[452.08,391.56],[452.08,-391.64],[394.641,-451.64]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.486274539723,0.701960784314,0.258823529412,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[453.05,451.89],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 1","np":2,"cix":2,"bm":0,"ix":1,"mn":"ADBE Vector Group","hd":false},{"ty":"gr","it":[{"ind":0,"ty":"sh","ix":1,"ks":{"a":1,"k":[{"i":{"x":0.833,"y":0.833},"o":{"x":0.333,"y":0},"t":19,"s":[{"i":[[35.36,0],[0,0],[0,-35.36],[0,0],[-35.36,0],[0,0],[0,35.36],[0,0]],"o":[[0,0],[-35.36,0],[0,0],[0,35.36],[0,0],[35.36,0],[0,0],[0,-35.36]],"v":[[416,-480],[-416,-480],[-480,-416],[-480,416],[-416,480],[416,480],[480,416],[480,-416]],"c":true}]},{"i":{"x":0.833,"y":0.833},"o":{"x":0.167,"y":0.167},"t":23,"s":[{"i":[[35.36,0],[0,0],[0,-35.36],[0,0],[-35.36,0],[0,0],[0,35.36],[0,0]],"o":[[0,0],[-35.36,0],[0,0],[0,35.36],[0,0],[35.36,0],[0,0],[0,-35.36]],"v":[[416,-472.573],[-408.833,-472.573],[-472.833,-408.573],[-472.833,416],[-408.833,480],[416,480],[480,416],[480,-408.573]],"c":true}]},{"i":{"x":0,"y":1},"o":{"x":0.167,"y":0.167},"t":25,"s":[{"i":[[35.36,0],[0,0],[0,-35.36],[0,0],[-35.36,0],[0,0],[0,35.36],[0,0]],"o":[[0,0],[-35.36,0],[0,0],[0,35.36],[0,0],[35.36,0],[0,0],[0,-35.36]],"v":[[416,-431.402],[-369.1,-431.402],[-433.1,-367.402],[-433.1,416],[-369.1,480],[416,480],[480,416],[480,-367.402]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.167,"y":0},"t":41,"s":[{"i":[[35.36,0],[0,0],[0,-35.36],[0,0],[-35.36,0],[0,0],[0,35.36],[0,0]],"o":[[0,0],[-35.36,0],[0,0],[0,35.36],[0,0],[35.36,0],[0,0],[0,-35.36]],"v":[[416,-422.75],[-360.75,-422.75],[-424.75,-358.75],[-424.75,416],[-360.75,480],[416,480],[480,416],[480,-358.75]],"c":true}]},{"i":{"x":0,"y":1},"o":{"x":0.333,"y":0},"t":66,"s":[{"i":[[35.36,0],[0,0],[0,-35.36],[0,0],[-35.36,0],[0,0],[0,35.36],[0,0]],"o":[[0,0],[-35.36,0],[0,0],[0,35.36],[0,0],[35.36,0],[0,0],[0,-35.36]],"v":[[416,-422.75],[-360.75,-422.75],[-424.75,-358.75],[-424.75,416],[-360.75,480],[416,480],[480,416],[480,-358.75]],"c":true}]},{"i":{"x":0.667,"y":1},"o":{"x":0.75,"y":0},"t":72,"s":[{"i":[[35.36,0],[0,0],[0,-35.36],[0,0],[-35.36,0],[0,0],[0,35.36],[0,0]],"o":[[0,0],[-35.36,0],[0,0],[0,35.36],[0,0],[35.36,0],[0,0],[0,-35.36]],"v":[[416,-490],[-436,-490],[-500,-426],[-500,416],[-436,480],[416,480],[480,416],[480,-426]],"c":true}]},{"t":84,"s":[{"i":[[35.36,0],[0,0],[0,-35.36],[0,0],[-35.36,0],[0,0],[0,35.36],[0,0]],"o":[[0,0],[-35.36,0],[0,0],[0,35.36],[0,0],[35.36,0],[0,0],[0,-35.36]],"v":[[416,-480],[-416,-480],[-480,-416],[-480,416],[-416,480],[416,480],[480,416],[480,-416]],"c":true}]}],"ix":2},"nm":"Path 1","mn":"ADBE Vector Shape - Group","hd":false},{"ty":"fl","c":{"a":0,"k":[0.407843167174,0.623529411765,0.219607858097,1],"ix":4},"o":{"a":0,"k":100,"ix":5},"r":1,"bm":0,"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill","hd":false},{"ty":"tr","p":{"a":0,"k":[480.33,480.25],"ix":2},"a":{"a":0,"k":[0,0],"ix":1},"s":{"a":0,"k":[100,100],"ix":3},"r":{"a":0,"k":0,"ix":6},"o":{"a":0,"k":100,"ix":7},"sk":{"a":0,"k":0,"ix":4},"sa":{"a":0,"k":0,"ix":5},"nm":"Transform"}],"nm":"Group 2","np":2,"cix":2,"bm":0,"ix":2,"mn":"ADBE Vector Group","hd":false}],"ip":0,"op":100,"st":0,"bm":0}],"markers":[{"tm":86,"cm":"rest","dr":0}]}
@@ -1,12 +1,12 @@
1
1
  /*
2
2
  ********************************************
3
3
  Copyright © 2021 Agora Lab, Inc., all rights reserved.
4
- AppBuilder and all associated components, source code, APIs, services, and documentation
5
- (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6
- accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7
- Use without a license or in violation of any license terms and conditions (including use for
8
- any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9
- information visit https://appbuilder.agora.io.
4
+ AppBuilder and all associated components, source code, APIs, services, and documentation
5
+ (the “Materials”) are owned by Agora Lab, Inc. and its licensors. The Materials may not be
6
+ accessed, used, modified, or distributed for any purpose without a license from Agora Lab, Inc.
7
+ Use without a license or in violation of any license terms and conditions (including use for
8
+ any purpose competitive to Agora Lab, Inc.’s business) is strictly prohibited. For more
9
+ information visit https://appbuilder.agora.io.
10
10
  *********************************************
11
11
  */
12
12
 
@@ -59,6 +59,7 @@ import LocalEventEmitter, {
59
59
  import {controlMessageEnum} from '../components/ChatContext';
60
60
  import {LogSource, logger} from '../logger/AppBuilderLogger';
61
61
  import {RECORDING_BOT_UID} from '../utils/constants';
62
+ import {isRemoteDeparture} from '../rtm/isRemoteDeparture';
62
63
  import {
63
64
  nativeChannelTypeMapping,
64
65
  nativeLinkStateMapping,
@@ -134,7 +135,7 @@ const RtmConfigure = (props: any) => {
134
135
  Object.keys(
135
136
  filterObject(
136
137
  defaultContent,
137
- ([k, v]) =>
138
+ ([_k, v]) =>
138
139
  v?.type === 'rtc' &&
139
140
  !v.offline &&
140
141
  activeUidsRef.current.activeUids.indexOf(v?.uid) !== -1,
@@ -329,12 +330,16 @@ const RtmConfigure = (props: any) => {
329
330
  );
330
331
  await processUserUidAttributes(backoffAttributes, presence.publisher);
331
332
  }
332
- // remoteLeaveChannel
333
- if (presence.type === nativePresenceEventTypeMapping.REMOTE_LEAVE) {
333
+ // remoteLeaveChannel and, on web, remote connection timeout
334
+ if (isRemoteDeparture(presence.type, isWebInternal())) {
335
+ const isTimeout =
336
+ presence.type === nativePresenceEventTypeMapping.REMOTE_TIMEOUT;
334
337
  logger.log(
335
338
  LogSource.AgoraSDK,
336
339
  'Event',
337
- 'RTM presenceEvent of type [4 - remoteLeave] (channelMemberLeft)',
340
+ isTimeout
341
+ ? 'RTM presenceEvent of type [5 - remoteTimeout] (channelMemberTimedOut)'
342
+ : 'RTM presenceEvent of type [4 - remoteLeave] (channelMemberLeft)',
338
343
  presence,
339
344
  );
340
345
  // Chat of left user becomes undefined. So don't cleanup
@@ -14,6 +14,7 @@ import AsyncStorage from '@react-native-async-storage/async-storage';
14
14
  import useMount from './useMount';
15
15
  import {ENABLE_AUTH} from '../auth/config';
16
16
  import {logger, LogSource} from '../logger/AppBuilderLogger';
17
+ import {SkinTonePreference} from './reactions/catalog';
17
18
 
18
19
  type rememberedDevicesListEntries = Record<
19
20
  string,
@@ -31,6 +32,7 @@ export interface StoreInterface {
31
32
  activeDeviceId: Record<MediaDeviceInfo['kind'], string>;
32
33
  whiteboardNativeInfoToast?: boolean;
33
34
  projectId: string;
35
+ liveReactionSkinTone?: SkinTonePreference;
34
36
  }
35
37
 
36
38
  export interface StorageContextInterface {
@@ -54,6 +56,7 @@ export const initStoreValue: StoreInterface = {
54
56
  videoinput: '',
55
57
  },
56
58
  projectId: $config.PROJECT_ID,
59
+ liveReactionSkinTone: 'default',
57
60
  };
58
61
 
59
62
  const initStorageContextValue = {
@@ -1,7 +1,8 @@
1
1
  import React from 'react';
2
- import {StyleSheet, Text, View} from 'react-native';
2
+ import {Image, StyleSheet, Text, View} from 'react-native';
3
3
  import hexadecimalTransparency from '../../utils/hexadecimalTransparency';
4
4
  import {useVideoCall} from '../useVideoCall';
5
+ import {getLiveReactionMap} from './catalog';
5
6
 
6
7
  interface LiveReactionBadgeProps {
7
8
  uid: number | string;
@@ -19,6 +20,9 @@ const LiveReactionBadge = ({
19
20
  return null;
20
21
  }
21
22
 
23
+ const definition = getLiveReactionMap()[reaction.assetKey];
24
+ const isCustom = !!definition?.custom;
25
+
22
26
  return (
23
27
  <View
24
28
  pointerEvents="none"
@@ -26,7 +30,16 @@ const LiveReactionBadge = ({
26
30
  styles.container,
27
31
  hasLeadingIcon ? styles.containerWithLeadingIcon : null,
28
32
  ]}>
29
- <Text style={styles.emoji}>{reaction.emoji}</Text>
33
+ {isCustom ? (
34
+ <Image
35
+ source={definition!.asset}
36
+ style={styles.customImage}
37
+ resizeMode="contain"
38
+ accessibilityLabel={definition!.custom!.label}
39
+ />
40
+ ) : (
41
+ <Text style={styles.emoji}>{reaction.emoji}</Text>
42
+ )}
30
43
  </View>
31
44
  );
32
45
  };
@@ -52,6 +65,11 @@ const styles = StyleSheet.create({
52
65
  fontSize: 24,
53
66
  lineHeight: 26,
54
67
  },
68
+ customImage: {
69
+ width: 20,
70
+ height: 20,
71
+ borderRadius: 4,
72
+ },
55
73
  });
56
74
 
57
75
  export default LiveReactionBadge;
@@ -1,7 +1,9 @@
1
1
  import React from 'react';
2
2
  import {
3
+ Image,
3
4
  Modal,
4
5
  Pressable,
6
+ ScrollView,
5
7
  StyleSheet,
6
8
  Text,
7
9
  TouchableWithoutFeedback,
@@ -17,48 +19,135 @@ import {isMobileUA, isWebInternal} from '../../utils/common';
17
19
  import {useString} from '../../utils/useString';
18
20
  import {toolbarItemReactionText} from '../../language/default-labels/videoCallScreenLabels';
19
21
  import {useVideoCall} from '../useVideoCall';
20
- import {LIVE_REACTIONS, LiveReactionDefinition} from './catalog';
22
+ import StorageContext from '../StorageContext';
23
+ import {
24
+ LiveReactionDefinition,
25
+ SKIN_TONE_CODES,
26
+ SkinTonePreference,
27
+ applySkinToneToEmoji,
28
+ getLiveReactions,
29
+ } from './catalog';
30
+ import hexadecimalTransparency from '../../utils/hexadecimalTransparency';
31
+
32
+ const TRAY_WIDTH = 222;
33
+ const TRAY_HEIGHT = 169;
34
+
35
+ const MAGIC_HOVER_COLOR =
36
+ $config.SEMANTIC_NEUTRAL + hexadecimalTransparency['25%'];
37
+
38
+ const TONE_SWATCH: Record<SkinTonePreference, string> = {
39
+ default: '#FBCC57',
40
+ '1f3fb': '#F5DDB4',
41
+ '1f3fc': '#E5C395',
42
+ '1f3fd': '#C68F6A',
43
+ '1f3fe': '#97674B',
44
+ '1f3ff': '#5D4038',
45
+ };
46
+
47
+ const TONE_OPTIONS: {value: SkinTonePreference; color: string}[] = [
48
+ {value: 'default', color: TONE_SWATCH.default},
49
+ ...SKIN_TONE_CODES.map(code => ({
50
+ value: code,
51
+ color: TONE_SWATCH[code],
52
+ })),
53
+ ];
21
54
 
22
55
  const ReactionTray = ({
23
56
  onSelect,
57
+ tone,
58
+ setTone,
24
59
  }: {
25
60
  onSelect: (reaction: LiveReactionDefinition) => void;
61
+ tone: SkinTonePreference;
62
+ setTone: (next: SkinTonePreference) => void;
26
63
  }) => {
27
64
  const [hoveredReactionKey, setHoveredReactionKey] = React.useState('');
28
65
 
29
66
  return (
30
67
  <View style={styles.tray}>
31
- {LIVE_REACTIONS.map(reaction => {
32
- const scale =
33
- isWebInternal() && hoveredReactionKey === reaction.key ? 37 / 24 : 1;
34
- const webHoverTransition = isWebInternal()
35
- ? {
36
- transitionProperty: 'transform',
37
- transitionDuration: '180ms',
38
- transitionTimingFunction: 'ease-in-out',
39
- }
40
- : {};
41
- return (
42
- <Pressable
43
- key={reaction.key}
44
- onHoverIn={() => {
45
- setHoveredReactionKey(reaction.key);
46
- }}
47
- onHoverOut={() => {
48
- setHoveredReactionKey('');
49
- }}
50
- onPress={() => {
51
- onSelect(reaction);
52
- }}
53
- style={[
54
- styles.reactionButton,
55
- webHoverTransition,
56
- {transform: [{scale}]},
57
- ]}>
58
- <Text style={styles.reactionEmoji}>{reaction.emoji}</Text>
59
- </Pressable>
60
- );
61
- })}
68
+ <View style={styles.toneRow}>
69
+ {TONE_OPTIONS.map(option => {
70
+ const isSelected = option.value === tone;
71
+ const selectedWebStyle =
72
+ isSelected && isWebInternal()
73
+ ? ({
74
+ boxShadow: `0 0 0 3px ${MAGIC_HOVER_COLOR}`,
75
+ } as any)
76
+ : null;
77
+ return (
78
+ <Pressable
79
+ key={option.value}
80
+ onPress={() => setTone(option.value)}
81
+ accessibilityLabel={
82
+ option.value === 'default'
83
+ ? 'Default skin tone'
84
+ : `Skin tone ${option.value}`
85
+ }
86
+ style={styles.toneButton}>
87
+ <View
88
+ style={[
89
+ styles.toneSwatch,
90
+ {backgroundColor: option.color},
91
+ selectedWebStyle,
92
+ ]}
93
+ />
94
+ {isSelected && !isWebInternal() ? (
95
+ <View style={styles.toneRingNative} pointerEvents="none" />
96
+ ) : null}
97
+ </Pressable>
98
+ );
99
+ })}
100
+ </View>
101
+ <ScrollView
102
+ style={styles.emojiScroll}
103
+ contentContainerStyle={styles.emojiGrid}
104
+ showsVerticalScrollIndicator={false}>
105
+ {getLiveReactions().map(reaction => {
106
+ const scale =
107
+ isWebInternal() && hoveredReactionKey === reaction.key
108
+ ? 37 / 24
109
+ : 1;
110
+ const webHoverTransition = isWebInternal()
111
+ ? {
112
+ transitionProperty: 'transform',
113
+ transitionDuration: '180ms',
114
+ transitionTimingFunction: 'ease-in-out',
115
+ }
116
+ : {};
117
+ return (
118
+ <View key={reaction.key} style={styles.reactionCell}>
119
+ <Pressable
120
+ onHoverIn={() => {
121
+ setHoveredReactionKey(reaction.key);
122
+ }}
123
+ onHoverOut={() => {
124
+ setHoveredReactionKey('');
125
+ }}
126
+ onPress={() => {
127
+ onSelect(reaction);
128
+ }}
129
+ style={[
130
+ styles.reactionButton,
131
+ webHoverTransition,
132
+ {transform: [{scale}]},
133
+ ]}>
134
+ {reaction.custom ? (
135
+ <Image
136
+ source={reaction.asset}
137
+ style={styles.reactionCustomImage}
138
+ resizeMode="contain"
139
+ accessibilityLabel={reaction.custom.label}
140
+ />
141
+ ) : (
142
+ <Text style={styles.reactionEmoji}>
143
+ {applySkinToneToEmoji(reaction, tone)}
144
+ </Text>
145
+ )}
146
+ </Pressable>
147
+ </View>
148
+ );
149
+ })}
150
+ </ScrollView>
62
151
  </View>
63
152
  );
64
153
  };
@@ -70,6 +159,7 @@ const LiveReactionButton = () => {
70
159
  const reactionLabel = useString(toolbarItemReactionText)();
71
160
  const {width: windowWidth} = useWindowDimensions();
72
161
  const {rtcProps} = React.useContext(PropsContext);
162
+ const {store, setStore} = React.useContext(StorageContext);
73
163
  const {
74
164
  data: {isHost},
75
165
  } = useRoomInfo();
@@ -80,6 +170,17 @@ const LiveReactionButton = () => {
80
170
  left: number;
81
171
  } | null>(null);
82
172
 
173
+ const tone: SkinTonePreference = store.liveReactionSkinTone ?? 'default';
174
+ const setTone = React.useCallback(
175
+ (next: SkinTonePreference) => {
176
+ if (!setStore) {
177
+ return;
178
+ }
179
+ setStore(prev => ({...prev, liveReactionSkinTone: next}));
180
+ },
181
+ [setStore],
182
+ );
183
+
83
184
  if (!$config.ENABLE_LIVE_REACTIONS) {
84
185
  return null;
85
186
  }
@@ -96,8 +197,6 @@ const LiveReactionButton = () => {
96
197
  }, []);
97
198
 
98
199
  const openTray = React.useCallback(() => {
99
- const trayWidth = 200;
100
- const trayHeight = 104;
101
200
  const trayOffset = 12;
102
201
 
103
202
  requestAnimationFrame(() => {
@@ -112,11 +211,11 @@ const LiveReactionButton = () => {
112
211
  const left = Math.max(
113
212
  8,
114
213
  Math.min(
115
- windowWidth - trayWidth - 8,
116
- x + buttonWidth / 2 - trayWidth / 2,
214
+ windowWidth - TRAY_WIDTH - 8,
215
+ x + buttonWidth / 2 - TRAY_WIDTH / 2,
117
216
  ),
118
217
  );
119
- const top = Math.max(8, y - trayHeight - trayOffset);
218
+ const top = Math.max(8, y - TRAY_HEIGHT - trayOffset);
120
219
 
121
220
  setTrayPosition({top, left});
122
221
  setIsTrayOpen(true);
@@ -175,6 +274,8 @@ const LiveReactionButton = () => {
175
274
 
176
275
  const tray = (
177
276
  <ReactionTray
277
+ tone={tone}
278
+ setTone={setTone}
178
279
  onSelect={reaction => {
179
280
  emitLiveReaction(reaction);
180
281
  }}
@@ -209,23 +310,73 @@ const LiveReactionButton = () => {
209
310
 
210
311
  const styles = StyleSheet.create({
211
312
  tray: {
212
- flexDirection: 'row',
213
- flexWrap: 'wrap',
214
- justifyContent: 'center',
215
- alignItems: 'center',
216
- width: 200,
217
- height: 104,
313
+ width: TRAY_WIDTH,
314
+ height: TRAY_HEIGHT,
218
315
  padding: 4,
219
316
  marginBottom: 12,
220
317
  borderRadius: 28,
221
318
  backgroundColor: $config.CARD_LAYER_4_COLOR,
222
- shadowColor: $config.HARD_CODED_BLACK_COLOR,
319
+ flexDirection: 'column',
320
+ alignItems: 'center',
321
+ overflow: 'hidden',
322
+ shadowColor: '#000',
223
323
  shadowOffset: {width: 0, height: 8},
224
324
  shadowOpacity: 0.25,
225
325
  shadowRadius: 20,
226
326
  elevation: 10,
227
327
  zIndex: 1000,
228
328
  },
329
+ toneRow: {
330
+ flexDirection: 'row',
331
+ padding: 12,
332
+ justifyContent: 'center',
333
+ alignItems: 'center',
334
+ alignSelf: 'stretch',
335
+ gap: 12,
336
+ borderTopLeftRadius: 24,
337
+ borderTopRightRadius: 24,
338
+ borderBottomLeftRadius: 12,
339
+ borderBottomRightRadius: 12,
340
+ backgroundColor: $config.ICON_BG_COLOR,
341
+ },
342
+ toneButton: {
343
+ width: 20,
344
+ height: 20,
345
+ alignItems: 'center',
346
+ justifyContent: 'center',
347
+ position: 'relative',
348
+ },
349
+ toneSwatch: {
350
+ width: 15,
351
+ height: 15,
352
+ borderRadius: 7.5,
353
+ },
354
+ toneRingNative: {
355
+ position: 'absolute',
356
+ top: 0,
357
+ left: 0,
358
+ width: 20,
359
+ height: 20,
360
+ borderRadius: 10,
361
+ borderWidth: 2,
362
+ borderColor: MAGIC_HOVER_COLOR,
363
+ },
364
+ emojiScroll: {
365
+ alignSelf: 'stretch',
366
+ flex: 1,
367
+ },
368
+ emojiGrid: {
369
+ flexDirection: 'row',
370
+ flexWrap: 'wrap',
371
+ justifyContent: 'flex-start',
372
+ alignItems: 'center',
373
+ paddingTop: 4,
374
+ },
375
+ reactionCell: {
376
+ width: '25%',
377
+ alignItems: 'center',
378
+ justifyContent: 'center',
379
+ },
229
380
  modalRoot: {
230
381
  flex: 1,
231
382
  position: 'relative',
@@ -252,6 +403,11 @@ const styles = StyleSheet.create({
252
403
  textAlign: 'center',
253
404
  includeFontPadding: false,
254
405
  },
406
+ reactionCustomImage: {
407
+ width: 28,
408
+ height: 28,
409
+ borderRadius: 4,
410
+ },
255
411
  });
256
412
 
257
413
  export default LiveReactionButton;
@@ -2,13 +2,18 @@ import React from 'react';
2
2
  import {
3
3
  Animated,
4
4
  Easing,
5
+ Image,
5
6
  LayoutChangeEvent,
6
7
  StyleSheet,
7
8
  Text,
8
9
  View,
9
10
  } from 'react-native';
10
11
  import {useVideoCall} from '../useVideoCall';
11
- import {LIVE_REACTION_LANE_COUNT} from './catalog';
12
+ import {
13
+ LIVE_REACTION_LANE_COUNT,
14
+ LiveReactionDefinition,
15
+ getLiveReactionMap,
16
+ } from './catalog';
12
17
 
13
18
  const NATIVE_REACTION_START_BOTTOM = 18;
14
19
  const NATIVE_REACTION_TOP_MARGIN = 120;
@@ -19,11 +24,13 @@ const AnimatedReaction = ({
19
24
  sender,
20
25
  left,
21
26
  travel,
27
+ definition,
22
28
  }: {
23
29
  emoji: string;
24
30
  sender: string;
25
31
  left: number;
26
32
  travel: number;
33
+ definition?: LiveReactionDefinition;
27
34
  }) => {
28
35
  const progress = React.useRef(new Animated.Value(0)).current;
29
36
 
@@ -47,6 +54,8 @@ const AnimatedReaction = ({
47
54
  outputRange: [0, 1, 1, 0],
48
55
  });
49
56
 
57
+ const isCustom = !!definition?.custom;
58
+
50
59
  return (
51
60
  <Animated.View
52
61
  style={[
@@ -58,7 +67,16 @@ const AnimatedReaction = ({
58
67
  transform: [{translateY}],
59
68
  },
60
69
  ]}>
61
- <Text style={styles.reactionEmoji}>{emoji}</Text>
70
+ {isCustom ? (
71
+ <Image
72
+ source={definition!.asset}
73
+ style={styles.reactionCustomImage}
74
+ resizeMode="contain"
75
+ accessibilityLabel={definition!.custom!.label}
76
+ />
77
+ ) : (
78
+ <Text style={styles.reactionEmoji}>{emoji}</Text>
79
+ )}
62
80
  <View style={styles.reactionSenderPill}>
63
81
  <Text numberOfLines={1} style={styles.reactionSender}>
64
82
  {sender}
@@ -140,6 +158,7 @@ const LiveReactionStageOverlay = () => {
140
158
  emoji={reaction.emoji}
141
159
  sender={reaction.senderDisplayName || reaction.senderUid}
142
160
  travel={travel}
161
+ definition={getLiveReactionMap()[reaction.assetKey]}
143
162
  />
144
163
  );
145
164
  })}
@@ -231,21 +250,26 @@ const styles = StyleSheet.create({
231
250
  fontSize: 32,
232
251
  lineHeight: 38,
233
252
  },
253
+ reactionCustomImage: {
254
+ width: 32,
255
+ height: 32,
256
+ borderRadius: 6,
257
+ },
234
258
  reactionSenderPill: {
235
- minWidth: 48,
236
- width: 88,
259
+ maxWidth: 88,
237
260
  marginTop: 4,
238
- paddingHorizontal: 10,
239
- paddingVertical: 4,
240
- borderRadius: 20,
261
+ paddingHorizontal: 8,
262
+ paddingVertical: 2,
263
+ borderRadius: 12,
241
264
  backgroundColor: $config.VIDEO_AUDIO_TILE_AVATAR_COLOR,
242
265
  alignItems: 'center',
243
266
  justifyContent: 'center',
267
+ alignSelf: 'center',
244
268
  },
245
269
  reactionSender: {
246
- maxWidth: 68,
247
- fontSize: 12,
248
- lineHeight: 12,
270
+ maxWidth: 72,
271
+ fontSize: 11,
272
+ lineHeight: 14,
249
273
  fontFamily: 'Source Sans 3',
250
274
  fontWeight: '400',
251
275
  color: $config.BACKGROUND_COLOR,