@ray-js/ipc-player-integration 0.0.1-beta-1
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.
- package/README.md +32 -0
- package/lib/core.d.ts +0 -0
- package/lib/core.js +0 -0
- package/lib/ctx/ctx.composition.d.ts +1 -0
- package/lib/ctx/ctx.composition.js +38 -0
- package/lib/ctx/ctx.d.ts +10 -0
- package/lib/ctx/ctx.js +159 -0
- package/lib/ctx/ctx.test.d.ts +1 -0
- package/lib/ctx/ctx.test.js +95 -0
- package/lib/ctx/index.d.ts +2 -0
- package/lib/ctx/index.js +2 -0
- package/lib/ctx/ports.output.d.ts +1 -0
- package/lib/ctx/ports.output.js +1 -0
- package/lib/ctx/useCtx.d.ts +0 -0
- package/lib/ctx/useCtx.js +0 -0
- package/lib/hooks/index.d.ts +5 -0
- package/lib/hooks/index.js +5 -0
- package/lib/hooks/useBattery/index.d.ts +2 -0
- package/lib/hooks/useBattery/index.js +17 -0
- package/lib/hooks/useDpState/index.d.ts +1 -0
- package/lib/hooks/useDpState/index.js +1 -0
- package/lib/hooks/useDpState/useDpState.d.ts +6 -0
- package/lib/hooks/useDpState/useDpState.js +79 -0
- package/lib/hooks/useHumidity/index.d.ts +1 -0
- package/lib/hooks/useHumidity/index.js +16 -0
- package/lib/hooks/useMuted/index.d.ts +1 -0
- package/lib/hooks/useMuted/index.js +3 -0
- package/lib/hooks/useTemperature/index.d.ts +5 -0
- package/lib/hooks/useTemperature/index.js +30 -0
- package/lib/hooks/useVideoBitKbps/index.d.ts +1 -0
- package/lib/hooks/useVideoBitKbps/index.js +44 -0
- package/lib/iconfont/demo.css +539 -0
- package/lib/iconfont/demo_index.html +556 -0
- package/lib/iconfont/iconfont.css +79 -0
- package/lib/iconfont/iconfont.js +42 -0
- package/lib/iconfont/iconfont.json +121 -0
- package/lib/iconfont/iconfont.ttf +0 -0
- package/lib/iconfont/iconfont.woff +0 -0
- package/lib/iconfont/iconfont.woff2 +0 -0
- package/lib/index.config.js +14 -0
- package/lib/index.d.ts +3 -0
- package/lib/index.js +3 -0
- package/lib/index.less +7 -0
- package/lib/interface.d.ts +59 -0
- package/lib/interface.js +19 -0
- package/lib/plugins/battery/battery.composition.d.ts +27 -0
- package/lib/plugins/battery/battery.composition.js +5 -0
- package/lib/plugins/battery/battery.d.ts +13 -0
- package/lib/plugins/battery/battery.js +39 -0
- package/lib/plugins/battery/battery.less +67 -0
- package/lib/plugins/battery/index.d.ts +1 -0
- package/lib/plugins/battery/index.js +1 -0
- package/lib/plugins/fullScreen/fullScreen.d.ts +6 -0
- package/lib/plugins/fullScreen/fullScreen.js +71 -0
- package/lib/plugins/fullScreen/fullScreen.less +16 -0
- package/lib/plugins/fullScreen/index.d.ts +1 -0
- package/lib/plugins/fullScreen/index.js +1 -0
- package/lib/plugins/fullScreen/verticalScreen.d.ts +8 -0
- package/lib/plugins/fullScreen/verticalScreen.js +15 -0
- package/lib/plugins/fullScreen/verticalScreen.less +11 -0
- package/lib/plugins/index.d.ts +8 -0
- package/lib/plugins/index.js +8 -0
- package/lib/plugins/muted/index.d.ts +1 -0
- package/lib/plugins/muted/index.js +1 -0
- package/lib/plugins/muted/muted.d.ts +4 -0
- package/lib/plugins/muted/muted.js +42 -0
- package/lib/plugins/muted/muted.less +5 -0
- package/lib/plugins/recordVideo/index.d.ts +1 -0
- package/lib/plugins/recordVideo/index.js +1 -0
- package/lib/plugins/recordVideo/recordVideo.d.ts +6 -0
- package/lib/plugins/recordVideo/recordVideo.js +93 -0
- package/lib/plugins/recordVideo/recordVideo.less +37 -0
- package/lib/plugins/screenshot/index.d.ts +1 -0
- package/lib/plugins/screenshot/index.js +1 -0
- package/lib/plugins/screenshot/screenshot.d.ts +6 -0
- package/lib/plugins/screenshot/screenshot.js +55 -0
- package/lib/plugins/screenshot/screenshot.less +38 -0
- package/lib/plugins/tempHumidity/index.d.ts +1 -0
- package/lib/plugins/tempHumidity/index.js +1 -0
- package/lib/plugins/tempHumidity/tempHumidity.d.ts +8 -0
- package/lib/plugins/tempHumidity/tempHumidity.js +54 -0
- package/lib/plugins/tempHumidity/tempHumidity.less +21 -0
- package/lib/plugins/videoBitKbps/index.d.ts +1 -0
- package/lib/plugins/videoBitKbps/index.js +1 -0
- package/lib/plugins/videoBitKbps/videoBitKbps.d.ts +6 -0
- package/lib/plugins/videoBitKbps/videoBitKbps.js +13 -0
- package/lib/plugins/videoBitKbps/videoBitKbps.less +11 -0
- package/lib/plugins/voiceIntercom/index.d.ts +1 -0
- package/lib/plugins/voiceIntercom/index.js +1 -0
- package/lib/plugins/voiceIntercom/voiceIntercom.d.ts +9 -0
- package/lib/plugins/voiceIntercom/voiceIntercom.js +67 -0
- package/lib/plugins/voiceIntercom/voiceIntercom.less +10 -0
- package/lib/ports.output.d.ts +6 -0
- package/lib/ports.output.js +1 -0
- package/lib/props.d.ts +14 -0
- package/lib/props.js +1 -0
- package/lib/ui/index.d.ts +1 -0
- package/lib/ui/index.js +1 -0
- package/lib/ui/ui.d.ts +21 -0
- package/lib/ui/ui.js +121 -0
- package/lib/ui/ui.less +44 -0
- package/lib/utils/authorize/index.d.ts +1 -0
- package/lib/utils/authorize/index.js +31 -0
- package/lib/utils/content/dpCode.d.ts +4 -0
- package/lib/utils/content/dpCode.js +7 -0
- package/lib/utils/device/index.d.ts +13 -0
- package/lib/utils/device/index.js +68 -0
- package/package.json +74 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
window._iconfont_svg_string_4727767 = '<svg><symbol id="icon-panel-jingyin" viewBox="0 0 1024 1024"><path d="M791.8413039 298.23338973c37.41134567 52.83974341 61.51191614 126.04900768 61.51191484 208.53547821 0 66.55387602-15.7309158 127.15823926-41.44491333 175.81315599l61.51191614 61.56233451c40.53736044-65.69674282 63.98247641-148.53615108 63.9824751-237.3754905 0-100.53668885-30.05008323-193.40959724-80.8226225-262.43403354a20.06700151 20.06700151 0 0 0-29.09211197-3.07559638l-32.26854512 26.8736488a22.38630404 22.38630404 0 0 0-3.37811316 30.10050291z m-106.53662133 257.79542975v-406.38200051c0-44.92386582-37.51218502-87.326753-88.78892103-81.32681927-103.10808848 11.99986491-194.46840915 63.02450384-260.92144582 137.99845291l59.54555132 59.54555134c52.83974341-61.41107678 125.29271382-102.75515074 206.11533633-113.44410666v319.55944427l84.0494792 84.04947792zM265.15812977 254.67085258L175.56249519 165.12563767a21.02497407 21.02497407 0 0 0-29.74756517 0l-29.64672713 29.69714551a21.02497407 21.02497407 0 0 0 0 29.74756646l35.44498088 35.44498088a84.04947792 84.04947792 0 0 0-54.55400984 78.6545803v336.14749327c0 46.43645484 37.66344404 84.04947792 84.04947793 84.04947921H298.43506843c67.15891085 101.091304 174.09888958 171.93084607 298.08069311 186.35085287 51.27673602 5.99993245 88.78892103-36.40295343 88.78892103-81.32682055v-70.18408757l114.14998084 114.14998213a21.02497407 21.02497407 0 0 0 29.74756519 0l29.69714679-29.74756648a21.02497407 21.02497407 0 0 0 0-29.64672582l-173.59469282-173.59469411-84.0494792-84.04947792-254.26605757-254.26605757L265.15812977 254.67085258zM181.10865186 338.77075015h49.20953187l370.93701964 370.93701966v151.51090682c-101.94843722-13.51245391-190.58609923-75.83108357-243.32500328-165.57797587l-12.20154491-20.72245731H181.10865186V338.66991082z" ></path></symbol><symbol id="icon-panel-fanhui-copy" viewBox="0 0 1024 1024"><path d="M472.60051 39.378168L39.384967 472.593711q-3.898828 3.898828-6.906496 8.466028-3.063365 4.567199-5.179873 9.635676-2.116507 5.012779-3.17476 10.415442-1.058253 5.402662-1.058253 10.91672 0 5.45836 1.113951 10.861022 1.002556 5.346965 3.119062 10.415442 2.116507 5.068477 5.179873 9.635676 3.007668 4.567199 6.906496 8.466028l433.215543 433.215543q3.898828 3.898828 8.466028 6.906496 4.567199 3.063365 9.635676 5.179873 5.012779 2.060809 10.415442 3.17476 5.402662 1.058253 10.861022 1.058253 5.514057 0 10.861023-1.113951 5.402662-1.058253 10.471139-3.119062 5.012779-2.116507 9.635676-5.179873 4.567199-3.063365 8.41033-6.906496 3.898828-3.898828 6.962194-8.466027 3.007668-4.567199 5.124174-9.635676 2.116507-5.012779 3.174761-10.415442 1.113951-5.402662 1.113951-10.861023 0-5.514057-1.113951-10.861022-1.113951-5.402662-3.174761-10.471139-2.116507-5.068477-5.124174-9.635676-3.063365-4.567199-6.962194-8.41033L157.630865 512.027577l393.781679-393.893074q3.898828-3.898828 6.962193-8.41033 3.063365-4.567199 5.124175-9.635676 2.116507-5.068477 3.17476-10.471139 1.113951-5.346965 1.113951-10.861022 0-5.45836-1.113951-10.861023-1.058253-5.346965-3.17476-10.415441-2.060809-5.068477-5.124175-9.635677-3.063365-4.567199-6.962193-8.466027-3.898828-3.898828-8.41033-6.906496Q538.379317 29.408306 533.31084 27.291799q-5.012779-2.060809-10.471139-3.17476-5.346965-1.058253-10.861023-1.058253-5.45836 0-10.861022 1.113951-5.346965 1.058253-10.415442 3.119062-5.068477 2.116507-9.635676 5.179873-4.567199 3.007668-8.466028 6.906496z" ></path></symbol><symbol id="icon-panel-zanwuhuifang" viewBox="0 0 1024 1024"><path d="M843.294118 572.235294c83.169882 0 150.588235 67.418353 150.588235 150.588235s-67.418353 150.588235-150.588235 150.588236-150.588235-67.418353-150.588236-150.588236 67.418353-150.588235 150.588236-150.588235z m45.17647-331.294118a90.352941 90.352941 0 0 1 90.352941 90.352942v214.949647c0 13.251765-16.655059 20.48-27.723294 13.161411A195.764706 195.764706 0 0 0 843.294118 527.058824c-108.122353 0-195.764706 87.642353-195.764706 195.764705 0 13.552941 1.400471 27.045647 4.186353 40.267295 2.108235 9.999059-5.165176 19.968-15.390118 19.968H331.294118a90.352941 90.352941 0 0 1-90.352942-90.352942v-37.406117c0-13.071059-15.510588-19.937882-25.178352-11.158589l-95.051295 86.241883A45.176471 45.176471 0 0 1 45.176471 696.922353V327.077647a45.176471 45.176471 0 0 1 75.535058-33.460706l95.051295 86.241883c9.682824 8.779294 25.178353 1.912471 25.178352-11.14353V331.294118a90.352941 90.352941 0 0 1 90.352942-90.352942h557.17647z m-98.42447 428.634353a15.058824 15.058824 0 0 0-1.310118 19.817412l1.310118 1.490824L822.000941 722.823529l-31.939765 31.939765a15.058824 15.058824 0 0 0 19.877648 22.558118l1.415529-1.264941 31.924706-31.924706 31.954823 31.924706a15.058824 15.058824 0 0 0 22.558118-19.877647l-1.264941-1.41553L864.602353 722.823529l31.924706-31.939764a15.058824 15.058824 0 0 0-19.877647-22.558118l-1.41553 1.249882L843.294118 701.530353l-31.939765-31.954824a15.058824 15.058824 0 0 0-21.308235 0z" ></path></symbol><symbol id="icon-panel-xiaoxiweikong" viewBox="0 0 1024 1024"><path d="M929.430588 63.171765l-36.517647-3.824941-0.225882-0.030118a14.230588 14.230588 0 0 1 1.310117-28.385882l1.882353 0.105411 85.097412 8.944941a14.230588 14.230588 0 0 1 4.864 26.895059l-47.299765 23.552 36.728471 3.870118a14.230588 14.230588 0 0 1-1.310118 28.370823l-1.882353-0.090352-85.082352-8.944942a14.230588 14.230588 0 0 1-4.864-26.895058l47.284705-23.567059z m-103.890823 121.795764l-65.596236-11.565176-0.225882-0.045177a14.230588 14.230588 0 0 1 3.297882-28.220235l1.867295 0.240941 111.887058 19.727059a14.230588 14.230588 0 0 1 3.237647 27.045647l-82.236235 36.080941 65.807059 11.595295a14.230588 14.230588 0 0 1-3.282824 28.235294l-1.867294-0.240942-111.887059-19.727058a14.230588 14.230588 0 0 1-3.237647-27.045647l82.236236-36.080942zM742.791529 359.604706l79.329883 259.463529c19.440941 63.623529-15.887059 130.816-79.510588 150.272l-284.702118 87.04-89.569882 110.366118a18.672941 18.672941 0 0 1-25.404236 3.568941l-74.134588-52.148706-6.339765 1.731765c-62.795294 17.106824-127.728941-18.477176-146.763294-80.715294L35.237647 575.909647C15.766588 512.301176 50.928941 445.138824 114.567529 425.712941l478.433883-146.281412c63.638588-19.456 130.334118 16.549647 149.790117 80.173177zM292.592941 639.081412a47.435294 47.435294 0 1 0-90.714353 27.723294 47.435294 47.435294 0 0 0 90.714353-27.723294z m122.202353-86.964706a47.435294 47.435294 0 1 0 27.738353 90.714353 47.435294 47.435294 0 0 0-27.738353-90.714353z m217.569882-51.983059a47.435294 47.435294 0 1 0-44.528941 83.772235 47.435294 47.435294 0 0 0 44.528941-83.772235z" ></path></symbol><symbol id="icon-panel-shanchu" viewBox="0 0 1024 1024"><path d="M682.666667 85.333333a42.666667 42.666667 0 0 1 4.992 85.034667L682.666667 170.666667H341.333333a42.666667 42.666667 0 0 1-4.992-85.034667L341.333333 85.333333h341.333334z m213.333333 128a42.666667 42.666667 0 0 1 4.992 85.034667L896 298.666667h-42.666667v554.666666a85.333333 85.333333 0 0 1-85.333333 85.333334H256a85.333333 85.333333 0 0 1-85.333333-85.333334V298.666667H128a42.666667 42.666667 0 0 1-4.992-85.034667L128 213.333333h768zM256 298.666667v554.666666h512V298.666667H256z m149.333333 128a42.666667 42.666667 0 0 1 42.368 37.674666L448 469.333333v213.333334a42.666667 42.666667 0 0 1-85.034667 4.992L362.666667 682.666667v-213.333334a42.666667 42.666667 0 0 1 42.666666-42.666666z m255.701334 37.674666A42.666667 42.666667 0 0 0 576 469.333333v213.333334l0.298667 4.992A42.666667 42.666667 0 0 0 661.333333 682.666667v-213.333334l-0.298666-4.992z" ></path></symbol><symbol id="icon-panel-fangxiang" viewBox="0 0 1024 1024"><path d="M981.333333 512c0 259.2-210.133333 469.333333-469.333333 469.333333S42.666667 771.2 42.666667 512 252.8 42.666667 512 42.666667s469.333333 210.133333 469.333333 469.333333z m-85.333333 0a384 384 0 1 0-768 0 384 384 0 0 0 768 0z m-341.333333-256a42.666667 42.666667 0 1 1-85.333334 0 42.666667 42.666667 0 0 1 85.333334 0z m85.333333 256a128 128 0 1 1-256 0 128 128 0 0 1 256 0z m-341.333333 0a42.666667 42.666667 0 1 1-85.333334 0 42.666667 42.666667 0 0 1 85.333334 0z m512 0a42.666667 42.666667 0 1 1-85.333334 0 42.666667 42.666667 0 0 1 85.333334 0z m-256 256a42.666667 42.666667 0 1 1-85.333334 0 42.666667 42.666667 0 0 1 85.333334 0z" ></path></symbol><symbol id="icon-panel-yuyin" viewBox="0 0 1024 1024"><path d="M154.026667 459.349333c11.776 0 21.290667 9.6 22.016 21.333334a341.333333 341.333333 0 0 0 681.344 0 22.613333 22.613333 0 0 1 18.133333-20.992l3.84-0.341334h42.666667c11.776 0 21.418667 9.557333 20.821333 21.333334-10.24 207.573333-168.789333 376.149333-371.925333 401.92l-11.52 1.28v87.466666a21.333333 21.333333 0 0 1-17.493334 20.992l-3.84 0.341334h-42.666666a21.333333 21.333333 0 0 1-21.034667-17.493334l-0.341333-3.84v-87.466666c-208.64-20.693333-373.034667-191.701333-383.445334-403.2a20.437333 20.437333 0 0 1 16.938667-20.992l3.84-0.341334h42.666667z m362.666666-426.666666a234.666667 234.666667 0 0 1 234.496 225.237333l0.170667 9.429333v213.333334a234.666667 234.666667 0 0 1-469.12 9.429333l-0.213333-9.386667v-213.333333a234.666667 234.666667 0 0 1 234.666666-234.666667z m0 85.333333a149.333333 149.333333 0 0 0-149.333333 149.333333v213.333334a149.333333 149.333333 0 1 0 298.666667 0v-213.333334a149.333333 149.333333 0 0 0-149.333334-149.333333z" ></path></symbol><symbol id="icon-panel-huifang" viewBox="0 0 1024 1024"><path d="M512 42.666667c259.2 0 469.333333 210.133333 469.333333 469.333333s-210.133333 469.333333-469.333333 469.333333a469.333333 469.333333 0 0 1-316.501333-122.752 20.565333 20.565333 0 0 1-0.298667-29.781333l30.165333-30.165333a22.101333 22.101333 0 0 1 30.421334-0.597334A384 384 0 1 0 215.04 268.501333h62.08c11.776 0 21.546667 9.941333 21.546667 21.76v41.813334c0 11.776-9.813333 21.76-21.632 21.76h-182.613334a21.845333 21.845333 0 0 1-21.589333-21.632v-182.613334c0-11.733333 9.984-21.589333 21.76-21.589333h41.813333c11.818667 0 21.76 9.813333 21.76 21.546667v54.058666A469.333333 469.333333 0 0 1 512 42.666667z m-48.469333 286.08l5.12 2.730666 229.248 144.426667a42.666667 42.666667 0 0 1 4.394666 68.992l-4.394666 3.2-229.290667 144.426667a42.666667 42.666667 0 0 1-65.066667-30.976l-0.341333-5.12v-288.853334a42.666667 42.666667 0 0 1 55.04-40.832l5.290667 2.005334z m25.002666 116.138666v134.229334L595.114667 512l-106.581334-67.114667z" ></path></symbol><symbol id="icon-panel-tongzhi" viewBox="0 0 1024 1024"><path d="M853.333333 601.002667v-218.026667A338.730667 338.730667 0 0 0 514.048 42.666667h-4.096A338.730667 338.730667 0 0 0 170.666667 382.976v218.026667l-63.616 62.549333C52.565333 717.056 89.813333 810.666667 166.186667 810.666667h691.626666c76.373333 0 113.621333-93.610667 59.136-147.114667L853.333333 601.002667zM509.952 128h4.096q105.813333 0 179.882667 74.325333Q768 276.736 768 382.976v253.824l89.130667 87.594667q0.341333 0.341333 0.128 0.938666H166.698667q-0.170667-0.597333 0.170666-0.938666L256 636.8V382.976q0-106.24 74.069333-180.650667Q404.096 128 509.952 128zM341.333333 896a42.666667 42.666667 0 1 0 0 85.333333h341.333334a42.666667 42.666667 0 0 0 0-85.333333H341.333333z" ></path></symbol><symbol id="icon-panel-gongnengshezhi" viewBox="0 0 1024 1024"><path d="M418.909091 232.727273c55.668364 0 103.005091 35.514182 120.645818 85.178182l2.513455 7.912727h214.295272a34.909091 34.909091 0 0 1 4.747637 69.492363l-4.747637 0.325819h-214.295272a128.046545 128.046545 0 0 1-243.805091 7.912727l-2.513455-7.912727H267.636364a34.909091 34.909091 0 0 1-4.747637-69.492364L267.636364 325.818182h28.113454A128.046545 128.046545 0 0 1 418.909091 232.727273z m0 69.818182A58.181818 58.181818 0 1 0 418.909091 418.909091a58.181818 58.181818 0 0 0 0-116.363636z m186.181818 232.727272c58.600727 0 107.985455 39.377455 123.159273 93.090909h28.113454a34.909091 34.909091 0 0 1 0 69.818182h-28.113454a128.046545 128.046545 0 0 1-246.318546 0H267.636364a34.909091 34.909091 0 0 1 0-69.818182h214.295272a128.046545 128.046545 0 0 1 123.159273-93.090909z m0 69.818182a58.181818 58.181818 0 1 0 0 116.363636 58.181818 58.181818 0 0 0 0-116.363636z" ></path></symbol><symbol id="icon-panel-shidu" viewBox="0 0 1024 1024"><path d="M896 618.642286a362.642286 362.642286 0 0 1-725.357714 0c0-285.622857 290.377143-576 362.715428-576 72.265143 0 362.642286 290.377143 362.642286 576z m-349.915429-492.251429a4.096 4.096 0 0 0 0.512-0.219428l-0.512 0.146285z m-26.038857-0.219428l0.512 0.146285a3.657143 3.657143 0 0 0-0.512-0.146285z m290.011429 472.356571c-6.436571-110.518857-64.365714-227.913143-136.411429-323.584a746.788571 746.788571 0 0 0-108.251428-117.321143 308.297143 308.297143 0 0 0-32.036572-24.137143 308.297143 308.297143 0 0 0-32.036571 24.137143 746.788571 746.788571 0 0 0-108.251429 117.321143C326.436571 363.154286 272.091429 469.796571 258.925714 572.562286a603.794286 603.794286 0 0 1 146.285715-17.92c113.956571 0 149.357714 64 277.357714 64 58.953143 0 99.547429-9.435429 127.414857-20.114286z" ></path></symbol><symbol id="icon-panel-wendu" viewBox="0 0 1024 1024"><path d="M384 128c-47.104 0-85.357714 38.180571-85.357714 85.357714v341.284572a42.642286 42.642286 0 0 1-17.042286 34.157714 170.642286 170.642286 0 1 0 204.8 0 42.642286 42.642286 0 0 1-17.042286-34.157714V213.357714c0-47.177143-38.253714-85.357714-85.357714-85.357714zM213.357714 213.357714a170.642286 170.642286 0 0 1 341.284572 0v321.097143a256 256 0 1 1-341.357715 0v-321.097143zM384 320c23.552 0 42.642286 19.090286 42.642286 42.642286v241.956571a128 128 0 1 1-85.284572 0V362.642286c0-23.552 19.017143-42.642286 42.642286-42.642286z m256-106.642286c0-23.552 19.090286-42.715429 42.642286-42.715428h170.715428a42.642286 42.642286 0 0 1 0 85.357714H682.642286a42.642286 42.642286 0 0 1-42.642286-42.642286z m85.357714 128a42.642286 42.642286 0 1 0 0 85.284572h128a42.642286 42.642286 0 0 0 0-85.284572h-128z m0 213.284572c0-23.552 19.017143-42.642286 42.642286-42.642286h85.357714a42.642286 42.642286 0 0 1 0 85.357714H768a42.642286 42.642286 0 0 1-42.642286-42.715428z" ></path></symbol><symbol id="icon-panel-jieping" viewBox="0 0 1024 1024"><path d="M897.2288 86.784c44.6464 0 81.2544 34.304 84.992 77.9264l0.3072 7.3728v682.7008c0 44.6464-34.304 81.2544-77.9264 84.992l-7.3728 0.3072h-768c-44.6464 0-81.3056-34.304-84.992-77.9776l-0.3584-7.3216V172.032c0-44.6464 34.304-81.2544 77.9776-84.992l7.3728-0.3072h768z m0 85.2992h-768v682.7008h768V172.032z m-384 149.3504a192 192 0 1 1 0 384 192 192 0 0 1 0-384z m0 85.3504a106.6496 106.6496 0 1 0 0 213.2992 106.6496 106.6496 0 0 0 0-213.2992z m-256-149.3504a42.6496 42.6496 0 1 1 0 85.3504 42.6496 42.6496 0 0 1 0-85.3504z" ></path></symbol><symbol id="icon-panel-luping" viewBox="0 0 1075 1024"><path d="M768.6144 83.6096c44.6976 0 81.3056 34.304 85.0432 77.9776l0.3072 7.3728v177.8688l100.096-86.6304a42.7008 42.7008 0 0 1 70.2464 26.624l0.3072 5.632v478.3104a42.7008 42.7008 0 0 1-66.048 35.6864l-4.5056-3.4304-100.096-86.6816v135.2704c0 44.6464-34.304 81.3056-77.9776 84.992l-7.3728 0.3584H86.016c-44.6464 0-81.3056-34.304-84.992-77.9776l-0.3584-7.3728V168.96c0-44.6464 34.304-81.3056 77.9776-84.992l7.3728-0.3584h682.6496z m0 85.3504H86.016v682.6496h682.6496V168.96zM367.4112 335.5136a21.3504 21.3504 0 0 1 26.8288-2.7648l3.328 2.7648 159.744 159.6928c7.2704 7.2704 8.192 18.5344 2.7136 26.8288l-2.7648 3.328-159.6928 159.6928a21.3504 21.3504 0 0 1-26.8288 2.7136l-3.328-2.7136-30.208-30.208a21.3504 21.3504 0 0 1-2.7136-26.7776l2.7648-3.3792 114.432-114.432-114.432-114.432a21.3504 21.3504 0 0 1-2.7648-26.8288l2.7648-3.328 30.1568-30.208z m571.904 50.3296l-85.3504 73.8816v143.7696l85.3504 73.8816V385.8432z" ></path></symbol><symbol id="icon-panel-yinliang" viewBox="0 0 1024 1024"><path d="M682.6496 149.3504c0-45.6192-38.0928-88.6784-90.1632-82.5856C466.5856 81.408 357.9904 153.2928 289.792 256H170.6496c-47.104 0-85.2992 38.1952-85.2992 85.3504v341.2992c0 47.104 38.1952 85.3504 85.2992 85.3504H289.792c68.1984 102.656 176.7936 174.592 302.6944 189.2352 52.0704 6.0928 90.1632-36.9664 90.1632-82.5856V149.3504zM350.208 320.256c53.5552-91.136 143.5648-154.4192 247.1424-168.1408V871.936c-103.5776-13.7216-193.536-77.0048-247.1424-168.1408l-12.3392-21.0944H170.6496V341.3504H337.92l12.3392-21.0944z m440.6272-20.0192c37.9904 53.6576 62.464 128 62.464 211.7632 0 83.712-24.4736 158.1056-62.464 211.7632a22.7328 22.7328 0 0 0 3.4304 30.5664l32.768 27.3408c9.0624 7.5264 22.528 6.3488 29.5424-3.1744 51.5584-70.0928 82.0736-164.352 82.0736-266.496s-30.5152-196.4032-82.0736-266.496a20.3776 20.3776 0 0 0-29.5424-3.1744l-32.768 27.3408a22.7328 22.7328 0 0 0-3.4304 30.5664z" ></path></symbol><symbol id="icon-panel-fangda" viewBox="0 0 1024 1024"><path d="M853.3504 170.6496h-192a21.3504 21.3504 0 0 1-21.3504-21.2992v-42.7008c0-11.776 9.5744-21.2992 21.3504-21.2992h192c47.104 0 85.2992 38.1952 85.2992 85.2992v192c0 11.776-9.5232 21.3504-21.2992 21.3504h-42.7008a21.3504 21.3504 0 0 1-21.2992-21.3504v-192zM149.3504 384c11.776 0 21.2992-9.5232 21.2992-21.3504v-192h192c11.776 0 21.3504-9.5232 21.3504-21.2992v-42.7008a21.3504 21.3504 0 0 0-21.3504-21.2992h-192c-47.104 0-85.2992 38.1952-85.2992 85.2992v192c0 11.776 9.5232 21.3504 21.2992 21.3504h42.7008z m-42.7008 256a21.3504 21.3504 0 0 0-21.2992 21.3504v192c0 47.104 38.1952 85.2992 85.2992 85.2992h192c11.776 0 21.3504-9.5232 21.3504-21.2992v-42.7008a21.3504 21.3504 0 0 0-21.3504-21.2992h-192v-192a21.3504 21.3504 0 0 0-21.2992-21.3504h-42.7008z m746.7008 21.3504c0-11.776 9.5232-21.3504 21.2992-21.3504h42.7008c11.776 0 21.2992 9.5744 21.2992 21.3504v192c0 47.104-38.1952 85.2992-85.2992 85.2992h-192a21.3504 21.3504 0 0 1-21.3504-21.2992v-42.7008c0-11.776 9.5744-21.2992 21.3504-21.2992h192v-192z" ></path></symbol></svg>', (e => {
|
|
2
|
+
var a = (l = (l = document.getElementsByTagName("script"))[l.length - 1]).getAttribute("data-injectcss"),
|
|
3
|
+
l = l.getAttribute("data-disable-injectsvg");
|
|
4
|
+
if (!l) {
|
|
5
|
+
var t,
|
|
6
|
+
n,
|
|
7
|
+
c,
|
|
8
|
+
o,
|
|
9
|
+
i,
|
|
10
|
+
h = function (a, l) {
|
|
11
|
+
l.parentNode.insertBefore(a, l);
|
|
12
|
+
};
|
|
13
|
+
if (a && !e.__iconfont__svg__cssinject__) {
|
|
14
|
+
e.__iconfont__svg__cssinject__ = !0;
|
|
15
|
+
try {
|
|
16
|
+
document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>");
|
|
17
|
+
} catch (a) {
|
|
18
|
+
console && console.log(a);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
t = function () {
|
|
22
|
+
var a,
|
|
23
|
+
l = document.createElement("div");
|
|
24
|
+
l.innerHTML = e._iconfont_svg_string_4727767, (l = l.getElementsByTagName("svg")[0]) && (l.setAttribute("aria-hidden", "true"), l.style.position = "absolute", l.style.width = 0, l.style.height = 0, l.style.overflow = "hidden", l = l, (a = document.body).firstChild ? h(l, a.firstChild) : a.appendChild(l));
|
|
25
|
+
}, document.addEventListener ? ~["complete", "loaded", "interactive"].indexOf(document.readyState) ? setTimeout(t, 0) : (n = function () {
|
|
26
|
+
document.removeEventListener("DOMContentLoaded", n, !1), t();
|
|
27
|
+
}, document.addEventListener("DOMContentLoaded", n, !1)) : document.attachEvent && (c = t, o = e.document, i = !1, v(), o.onreadystatechange = function () {
|
|
28
|
+
"complete" == o.readyState && (o.onreadystatechange = null, m());
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function m() {
|
|
32
|
+
i || (i = !0, c());
|
|
33
|
+
}
|
|
34
|
+
function v() {
|
|
35
|
+
try {
|
|
36
|
+
o.documentElement.doScroll("left");
|
|
37
|
+
} catch (a) {
|
|
38
|
+
return void setTimeout(v, 50);
|
|
39
|
+
}
|
|
40
|
+
m();
|
|
41
|
+
}
|
|
42
|
+
})(window);
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "4727767",
|
|
3
|
+
"name": "tydzbk9g4xfl9wiscc",
|
|
4
|
+
"font_family": "icon-panel",
|
|
5
|
+
"css_prefix_text": "icon-panel-",
|
|
6
|
+
"description": "IPC 小程序公版",
|
|
7
|
+
"glyphs": [
|
|
8
|
+
{
|
|
9
|
+
"icon_id": "42343208",
|
|
10
|
+
"name": "静音",
|
|
11
|
+
"font_class": "jingyin",
|
|
12
|
+
"unicode": "e618",
|
|
13
|
+
"unicode_decimal": 58904
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"icon_id": "42343159",
|
|
17
|
+
"name": "返回",
|
|
18
|
+
"font_class": "fanhui-copy",
|
|
19
|
+
"unicode": "e61f",
|
|
20
|
+
"unicode_decimal": 58911
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"icon_id": "42337835",
|
|
24
|
+
"name": "暂无回放",
|
|
25
|
+
"font_class": "zanwuhuifang",
|
|
26
|
+
"unicode": "e616",
|
|
27
|
+
"unicode_decimal": 58902
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
"icon_id": "42337710",
|
|
31
|
+
"name": "消息为空",
|
|
32
|
+
"font_class": "xiaoxiweikong",
|
|
33
|
+
"unicode": "e615",
|
|
34
|
+
"unicode_decimal": 58901
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
"icon_id": "42337397",
|
|
38
|
+
"name": "删除",
|
|
39
|
+
"font_class": "shanchu",
|
|
40
|
+
"unicode": "e614",
|
|
41
|
+
"unicode_decimal": 58900
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"icon_id": "42337363",
|
|
45
|
+
"name": "方向",
|
|
46
|
+
"font_class": "fangxiang",
|
|
47
|
+
"unicode": "e612",
|
|
48
|
+
"unicode_decimal": 58898
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"icon_id": "42337280",
|
|
52
|
+
"name": "语音",
|
|
53
|
+
"font_class": "yuyin",
|
|
54
|
+
"unicode": "e611",
|
|
55
|
+
"unicode_decimal": 58897
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"icon_id": "42335361",
|
|
59
|
+
"name": "回放",
|
|
60
|
+
"font_class": "huifang",
|
|
61
|
+
"unicode": "e610",
|
|
62
|
+
"unicode_decimal": 58896
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"icon_id": "42335299",
|
|
66
|
+
"name": "通知",
|
|
67
|
+
"font_class": "tongzhi",
|
|
68
|
+
"unicode": "e60f",
|
|
69
|
+
"unicode_decimal": 58895
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
"icon_id": "42334896",
|
|
73
|
+
"name": "功能设置",
|
|
74
|
+
"font_class": "gongnengshezhi",
|
|
75
|
+
"unicode": "e60d",
|
|
76
|
+
"unicode_decimal": 58893
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"icon_id": "42334670",
|
|
80
|
+
"name": "湿度",
|
|
81
|
+
"font_class": "shidu",
|
|
82
|
+
"unicode": "e60a",
|
|
83
|
+
"unicode_decimal": 58890
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"icon_id": "42334669",
|
|
87
|
+
"name": "温度",
|
|
88
|
+
"font_class": "wendu",
|
|
89
|
+
"unicode": "e60b",
|
|
90
|
+
"unicode_decimal": 58891
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
"icon_id": "42334633",
|
|
94
|
+
"name": "截屏",
|
|
95
|
+
"font_class": "jieping",
|
|
96
|
+
"unicode": "e608",
|
|
97
|
+
"unicode_decimal": 58888
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
"icon_id": "42334518",
|
|
101
|
+
"name": "录屏",
|
|
102
|
+
"font_class": "luping",
|
|
103
|
+
"unicode": "e607",
|
|
104
|
+
"unicode_decimal": 58887
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
"icon_id": "42324827",
|
|
108
|
+
"name": "音量",
|
|
109
|
+
"font_class": "yinliang",
|
|
110
|
+
"unicode": "e606",
|
|
111
|
+
"unicode_decimal": 58886
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"icon_id": "42324824",
|
|
115
|
+
"name": "放大",
|
|
116
|
+
"font_class": "fangda",
|
|
117
|
+
"unicode": "e609",
|
|
118
|
+
"unicode_decimal": 58889
|
|
119
|
+
}
|
|
120
|
+
]
|
|
121
|
+
}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const tuya = {
|
|
2
|
+
backgroundColor: '#f2f4f6',
|
|
3
|
+
navigationBarTitleText: 'Ray 跨端组件'
|
|
4
|
+
};
|
|
5
|
+
export const wechat = {
|
|
6
|
+
backgroundColor: '#f2f4f6',
|
|
7
|
+
navigationBarTitleText: 'Ray 跨端组件'
|
|
8
|
+
};
|
|
9
|
+
export const native = {
|
|
10
|
+
backgroundColor: 'transparent',
|
|
11
|
+
isBleOfflineOverlay: false,
|
|
12
|
+
useSafeAreaView: true,
|
|
13
|
+
navigationBarTitleText: 'Ray 跨端组件'
|
|
14
|
+
};
|
package/lib/index.d.ts
ADDED
package/lib/index.js
ADDED
package/lib/index.less
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export type ComponentConfig<T = Record<string, unknown>> = {
|
|
3
|
+
id: string;
|
|
4
|
+
content: (props: T) => React.ReactElement;
|
|
5
|
+
initProps?: T;
|
|
6
|
+
};
|
|
7
|
+
export type ScreenType = 'full' | 'vertical';
|
|
8
|
+
export declare const enum PlayerStreamStatus {
|
|
9
|
+
UnknownException = -1000,
|
|
10
|
+
ConnectSuccess = 1001,
|
|
11
|
+
ConnectFail = -1001,
|
|
12
|
+
PreviewSuccess = 1002,
|
|
13
|
+
PreviewFail = -1002,
|
|
14
|
+
NetworkError = -1010,
|
|
15
|
+
DeviceDelete = -1012,
|
|
16
|
+
DisconnectSuccess = 1009,
|
|
17
|
+
DisconnectFail = -1009,
|
|
18
|
+
PAUSE = 4
|
|
19
|
+
}
|
|
20
|
+
export declare const enum PlayState {
|
|
21
|
+
CONNECTING = 0,
|
|
22
|
+
PLAYING = 1,
|
|
23
|
+
PAUSE = 2
|
|
24
|
+
}
|
|
25
|
+
export type UseCtx = (options: {
|
|
26
|
+
devId: string;
|
|
27
|
+
initTopContent?: ComponentConfig[];
|
|
28
|
+
initBottomContent?: ComponentConfig[];
|
|
29
|
+
initAbsoluteContent?: ComponentConfig[];
|
|
30
|
+
saveToAlbum?: 0 | 1;
|
|
31
|
+
}) => {
|
|
32
|
+
devId: string;
|
|
33
|
+
saveToAlbum: 0 | 1;
|
|
34
|
+
screenType: ScreenType;
|
|
35
|
+
recording: boolean;
|
|
36
|
+
mute: boolean;
|
|
37
|
+
intercom: boolean;
|
|
38
|
+
playState: PlayState;
|
|
39
|
+
IPCPlayerInstance: IpcContext;
|
|
40
|
+
topContent: ComponentConfig[];
|
|
41
|
+
bottomContent: ComponentConfig[];
|
|
42
|
+
absoluteContent: ComponentConfig[];
|
|
43
|
+
setScreenType: (type: ScreenType) => void;
|
|
44
|
+
setRecording: (value: boolean) => Promise<boolean>;
|
|
45
|
+
setIntercom: (value: boolean) => Promise<boolean>;
|
|
46
|
+
setMute: (value: boolean) => Promise<boolean>;
|
|
47
|
+
changeStreamStatus: (value: PlayerStreamStatus) => void;
|
|
48
|
+
getStreamStatus: () => PlayerStreamStatus;
|
|
49
|
+
setPlayState: (value: PlayState) => void;
|
|
50
|
+
addContent: <T>(type: 'top' | 'bottom' | 'absolute', config: ComponentConfig<T> | ComponentConfig<T>[]) => void;
|
|
51
|
+
deleteContent: (type: 'top' | 'bottom' | 'absolute', id: string) => void;
|
|
52
|
+
};
|
|
53
|
+
export type ComponentConfigProps = {
|
|
54
|
+
IPCPlayerContext: IpcContext;
|
|
55
|
+
} & ReturnType<UseCtx>;
|
|
56
|
+
export type PlayStatusData = {
|
|
57
|
+
playState: PlayState;
|
|
58
|
+
playCode: number;
|
|
59
|
+
};
|
package/lib/interface.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export let PlayerStreamStatus = /*#__PURE__*/function (PlayerStreamStatus) {
|
|
2
|
+
PlayerStreamStatus[PlayerStreamStatus["UnknownException"] = -1000] = "UnknownException";
|
|
3
|
+
PlayerStreamStatus[PlayerStreamStatus["ConnectSuccess"] = 1001] = "ConnectSuccess";
|
|
4
|
+
PlayerStreamStatus[PlayerStreamStatus["ConnectFail"] = -1001] = "ConnectFail";
|
|
5
|
+
PlayerStreamStatus[PlayerStreamStatus["PreviewSuccess"] = 1002] = "PreviewSuccess";
|
|
6
|
+
PlayerStreamStatus[PlayerStreamStatus["PreviewFail"] = -1002] = "PreviewFail";
|
|
7
|
+
PlayerStreamStatus[PlayerStreamStatus["NetworkError"] = -1010] = "NetworkError";
|
|
8
|
+
PlayerStreamStatus[PlayerStreamStatus["DeviceDelete"] = -1012] = "DeviceDelete";
|
|
9
|
+
PlayerStreamStatus[PlayerStreamStatus["DisconnectSuccess"] = 1009] = "DisconnectSuccess";
|
|
10
|
+
PlayerStreamStatus[PlayerStreamStatus["DisconnectFail"] = -1009] = "DisconnectFail";
|
|
11
|
+
PlayerStreamStatus[PlayerStreamStatus["PAUSE"] = 4] = "PAUSE";
|
|
12
|
+
return PlayerStreamStatus;
|
|
13
|
+
}({}); // 暂停
|
|
14
|
+
export let PlayState = /*#__PURE__*/function (PlayState) {
|
|
15
|
+
PlayState[PlayState["CONNECTING"] = 0] = "CONNECTING";
|
|
16
|
+
PlayState[PlayState["PLAYING"] = 1] = "PLAYING";
|
|
17
|
+
PlayState[PlayState["PAUSE"] = 2] = "PAUSE";
|
|
18
|
+
return PlayState;
|
|
19
|
+
}({});
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const Battery: import("react").FunctionComponent<{
|
|
3
|
+
IPCPlayerContext: IpcContext;
|
|
4
|
+
} & {
|
|
5
|
+
devId: string;
|
|
6
|
+
saveToAlbum: 0 | 1;
|
|
7
|
+
screenType: import("../../interface").ScreenType;
|
|
8
|
+
recording: boolean;
|
|
9
|
+
mute: boolean;
|
|
10
|
+
intercom: boolean;
|
|
11
|
+
playState: import("../../interface").PlayState;
|
|
12
|
+
IPCPlayerInstance: IpcContext;
|
|
13
|
+
topContent: import("../../interface").ComponentConfig<Record<string, unknown>>[];
|
|
14
|
+
bottomContent: import("../../interface").ComponentConfig<Record<string, unknown>>[];
|
|
15
|
+
absoluteContent: import("../../interface").ComponentConfig<Record<string, unknown>>[];
|
|
16
|
+
setScreenType: (type: import("../../interface").ScreenType) => void;
|
|
17
|
+
setRecording: (value: boolean) => Promise<boolean>;
|
|
18
|
+
setIntercom: (value: boolean) => Promise<boolean>;
|
|
19
|
+
setMute: (value: boolean) => Promise<boolean>;
|
|
20
|
+
changeStreamStatus: (value: import("../../interface").PlayerStreamStatus) => void;
|
|
21
|
+
getStreamStatus: () => import("../../interface").PlayerStreamStatus;
|
|
22
|
+
setPlayState: (value: import("../../interface").PlayState) => void;
|
|
23
|
+
addContent: <T>(type: "absolute" | "top" | "bottom", config: import("../../interface").ComponentConfig<T> | import("../../interface").ComponentConfig<T>[]) => void;
|
|
24
|
+
deleteContent: (type: "absolute" | "top" | "bottom", id: string) => void;
|
|
25
|
+
} & {
|
|
26
|
+
className?: string | undefined;
|
|
27
|
+
}>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { UseBattery } from '../../ports.output';
|
|
3
|
+
import { ComponentConfigProps } from '../../interface';
|
|
4
|
+
import './battery.less';
|
|
5
|
+
type Depend = {
|
|
6
|
+
useBattery: UseBattery;
|
|
7
|
+
};
|
|
8
|
+
type Props = ComponentConfigProps & {
|
|
9
|
+
className?: string;
|
|
10
|
+
};
|
|
11
|
+
type CreateBattery = (deps: Depend) => React.FunctionComponent<Props>;
|
|
12
|
+
export declare const createBattery: CreateBattery;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, Text } from '@ray-js/ray';
|
|
3
|
+
import clsx from 'clsx';
|
|
4
|
+
import './battery.less';
|
|
5
|
+
export const createBattery = _ref => {
|
|
6
|
+
let {
|
|
7
|
+
useBattery
|
|
8
|
+
} = _ref;
|
|
9
|
+
return props => {
|
|
10
|
+
const {
|
|
11
|
+
className,
|
|
12
|
+
devId,
|
|
13
|
+
screenType
|
|
14
|
+
} = props;
|
|
15
|
+
const {
|
|
16
|
+
batteryValue,
|
|
17
|
+
batteryCharging
|
|
18
|
+
} = useBattery(devId);
|
|
19
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
20
|
+
className: clsx('ipc-player-plugin-battery', {
|
|
21
|
+
'ipc-player-plugin-battery-relative': screenType === 'full',
|
|
22
|
+
'ipc-player-plugin-battery-absolute': screenType === 'vertical'
|
|
23
|
+
}, className)
|
|
24
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
25
|
+
className: "ipc-player-plugin-battery-border"
|
|
26
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
27
|
+
className: "ipc-player-plugin-battery-border-1"
|
|
28
|
+
}), /*#__PURE__*/React.createElement(View, {
|
|
29
|
+
className: "ipc-player-plugin-battery-value-wrap"
|
|
30
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
31
|
+
style: {
|
|
32
|
+
width: `${batteryValue}%`
|
|
33
|
+
},
|
|
34
|
+
className: "ipc-player-plugin-battery-value-value"
|
|
35
|
+
}))), /*#__PURE__*/React.createElement(Text, {
|
|
36
|
+
className: "ipc-player-plugin-battery-text"
|
|
37
|
+
}, batteryValue, "%"));
|
|
38
|
+
};
|
|
39
|
+
};
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
.ipc-player-plugin-battery {
|
|
2
|
+
display: flex;
|
|
3
|
+
align-items: center;
|
|
4
|
+
background-color: red;
|
|
5
|
+
height: 48rpx;
|
|
6
|
+
padding: 0 18rpx;
|
|
7
|
+
border-radius: 48rpx;
|
|
8
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
9
|
+
backdrop-filter: blur(10px);
|
|
10
|
+
&.ipc-player-plugin-battery-absolute {
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 50%;
|
|
13
|
+
left: 11px;
|
|
14
|
+
transform: translateY(-50%);
|
|
15
|
+
}
|
|
16
|
+
&.ipc-player-plugin-battery-relative {
|
|
17
|
+
position: relative;
|
|
18
|
+
top: 0;
|
|
19
|
+
left: 0;
|
|
20
|
+
transform: translateY(0);
|
|
21
|
+
}
|
|
22
|
+
.ipc-player-plugin-battery-border {
|
|
23
|
+
position: relative;
|
|
24
|
+
width: 32rpx;
|
|
25
|
+
height: 24rpx;
|
|
26
|
+
box-sizing: border-box;
|
|
27
|
+
border: 4rpx solid #fff;
|
|
28
|
+
margin-right: 8rpx;
|
|
29
|
+
border-radius: 6rpx;
|
|
30
|
+
overflow: visible;
|
|
31
|
+
.ipc-player-plugin-battery-border-1 {
|
|
32
|
+
position: absolute;
|
|
33
|
+
height: 10rpx;
|
|
34
|
+
width: 5rpx;
|
|
35
|
+
background-color: #fff;
|
|
36
|
+
left: -7rpx;
|
|
37
|
+
top: 4rpx;
|
|
38
|
+
border-radius: 4rpx;
|
|
39
|
+
}
|
|
40
|
+
.ipc-player-plugin-battery-value-wrap {
|
|
41
|
+
position: absolute;
|
|
42
|
+
width: 20rpx;
|
|
43
|
+
height: 12rpx;
|
|
44
|
+
left: 50%;
|
|
45
|
+
top: 50%;
|
|
46
|
+
transform: translate(-50%, -50%);
|
|
47
|
+
.ipc-player-plugin-battery-value-value {
|
|
48
|
+
position: absolute;
|
|
49
|
+
right: 0;
|
|
50
|
+
top: 0;
|
|
51
|
+
bottom: 0;
|
|
52
|
+
background-color: #5BE19C;
|
|
53
|
+
border-radius: 1rpx;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
.ipc-player-plugin-battery-text {
|
|
62
|
+
font-size: 24rpx;
|
|
63
|
+
line-height: 24rpx;
|
|
64
|
+
color: var(--fontColor);
|
|
65
|
+
font-family: 'Manrope';
|
|
66
|
+
font-weight: 600;
|
|
67
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './battery.composition';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './battery.composition';
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { View, setPageOrientation, CoverView } from '@ray-js/ray';
|
|
4
|
+
import { VerticalScreen } from './verticalScreen';
|
|
5
|
+
import { VoiceIntercom } from '../voiceIntercom';
|
|
6
|
+
import './fullScreen.less';
|
|
7
|
+
const VerticalScreenId = 'VerticalScreen';
|
|
8
|
+
const VoiceIntercomId = 'VoiceIntercom';
|
|
9
|
+
export function FullScreen(props) {
|
|
10
|
+
const {
|
|
11
|
+
screenType,
|
|
12
|
+
setScreenType,
|
|
13
|
+
devId,
|
|
14
|
+
addContent,
|
|
15
|
+
deleteContent
|
|
16
|
+
} = props;
|
|
17
|
+
const handFull = () => {
|
|
18
|
+
ty.hideMenuButton();
|
|
19
|
+
ty.hideStatusBar();
|
|
20
|
+
ty.setNavigationBarBack({
|
|
21
|
+
type: 'custom'
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// 显示全屏按钮5s后隐藏
|
|
25
|
+
// showFullButtonAnd5sHide();
|
|
26
|
+
// 添加全屏后,返回竖屏的控件
|
|
27
|
+
addContent('top', {
|
|
28
|
+
id: VerticalScreenId,
|
|
29
|
+
content: VerticalScreen,
|
|
30
|
+
initProps: _objectSpread(_objectSpread({}, props), {}, {
|
|
31
|
+
onClick: handClick.bind(null, 'vertical')
|
|
32
|
+
})
|
|
33
|
+
});
|
|
34
|
+
// 全屏后,添加语音对讲控件
|
|
35
|
+
addContent('absolute', {
|
|
36
|
+
id: VoiceIntercomId,
|
|
37
|
+
content: props => {
|
|
38
|
+
return /*#__PURE__*/React.createElement(CoverView, {
|
|
39
|
+
className: "ipc-player-plugin-full-screen-voice"
|
|
40
|
+
}, /*#__PURE__*/React.createElement(VoiceIntercom, props));
|
|
41
|
+
},
|
|
42
|
+
initProps: _objectSpread({}, props)
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
const handClick = target => {
|
|
46
|
+
const pageOrientation = target === 'vertical' ? 'portrait' : 'landscape';
|
|
47
|
+
setScreenType(target);
|
|
48
|
+
handFull(); // todo
|
|
49
|
+
setPageOrientation({
|
|
50
|
+
pageOrientation,
|
|
51
|
+
success: () => {
|
|
52
|
+
if (target === 'full') {
|
|
53
|
+
handFull();
|
|
54
|
+
} else {
|
|
55
|
+
ty.setNavigationBarBack({
|
|
56
|
+
type: 'system'
|
|
57
|
+
});
|
|
58
|
+
ty.showMenuButton();
|
|
59
|
+
ty.showStatusBar();
|
|
60
|
+
deleteContent('top', VerticalScreenId);
|
|
61
|
+
deleteContent('absolute', VoiceIntercomId);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
};
|
|
66
|
+
if (screenType === 'full') return null;
|
|
67
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
68
|
+
className: "ipc-player-plugin-full-screen icon-panel icon-panel-fangda",
|
|
69
|
+
onClick: () => handClick('full')
|
|
70
|
+
});
|
|
71
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.ipc-player-plugin-full-screen {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 50%;
|
|
4
|
+
transform: translateY(-50%);
|
|
5
|
+
right: 18px;
|
|
6
|
+
color: var(--iconColor);
|
|
7
|
+
font-size: var(--iconFontSize);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.ipc-player-plugin-full-screen-voice {
|
|
11
|
+
position: absolute;
|
|
12
|
+
top: 50%;
|
|
13
|
+
transform: translateY(-50%);
|
|
14
|
+
right: 20px;
|
|
15
|
+
z-index: 3;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './fullScreen';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './fullScreen';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './verticalScreen.less';
|
|
3
|
+
import type { ComponentConfigProps } from '../../interface';
|
|
4
|
+
type Props = ComponentConfigProps & {
|
|
5
|
+
onClick?: () => void;
|
|
6
|
+
};
|
|
7
|
+
export declare function VerticalScreen({ onClick }: Props): React.JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View } from '@ray-js/ray';
|
|
3
|
+
import './verticalScreen.less';
|
|
4
|
+
const NILL = () => null;
|
|
5
|
+
export function VerticalScreen(_ref) {
|
|
6
|
+
let {
|
|
7
|
+
onClick = NILL
|
|
8
|
+
} = _ref;
|
|
9
|
+
return /*#__PURE__*/React.createElement(View, {
|
|
10
|
+
className: "ipc-player-plugin-vertical-screen",
|
|
11
|
+
onClick: onClick
|
|
12
|
+
}, /*#__PURE__*/React.createElement(View, {
|
|
13
|
+
className: "icon-panel icon-panel-fanhui ipc-player-plugin-vertical-screen-icon"
|
|
14
|
+
}));
|
|
15
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './muted';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './muted';
|