grid.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698
  1. <template>
  2. <uni-shadow-root class="trtc-room-template-grid-grid"><template v-if="wxTemplateName === 'grid'">
  3. <view class="template-grid">
  4. <view class="column-layout">
  5. <view class="column-1">
  6. <view class="grid-scroll-container" @touchstart="_$self.$parent[('_handleGridTouchStart')]($event)" @touchend="_$self.$parent[('_handleGridTouchEnd')]($event)">
  7. <view id="grid-container-id" :class="'grid-container '+(visibleStreamList.length < 4 ? 'stream-' + visibleStreamList.length : 'stream-3')">
  8. <view :class="'view-container pusher-container '+(pusher.isVisible && ((gridCurrentPage === 1 && gridPlayerPerPage > 3) || gridPlayerPerPage < 4)?'':'none')">
  9. <live-pusher class="pusher" :url="pusher.url" :mode="pusher.mode" :autopush="pusher.autopush" :enable-camera="pusher.enableCamera" :enable-mic="pusher.enableMic" :muted="(!pusher.enableMic)" :enable-agc="pusher.enableAgc" :enable-ans="pusher.enableAns" :enable-ear-monitor="pusher.enableEarMonitor" :auto-focus="pusher.enableAutoFocus" :zoom="pusher.enableZoom" :min-bitrate="pusher.minBitrate" :max-bitrate="pusher.maxBitrate" :video-width="pusher.videoWidth" :video-height="pusher.videoHeight" :beauty="pusher.beautyLevel" :whiteness="pusher.whitenessLevel" :orientation="pusher.videoOrientation" :aspect="pusher.videoAspect" :device-position="pusher.frontCamera" :remote-mirror="pusher.enableRemoteMirror" :local-mirror="pusher.localMirror" :background-mute="pusher.enableBackgroundMute" :audio-quality="pusher.audioQuality" :audio-volume-type="pusher.audioVolumeType" :audio-reverb-type="pusher.audioReverbType" :waiting-image="pusher.waitingImage" :debug="debug" :beauty-style="pusher.beautyStyle" :filter="pusher.filter" @statechange="_$self.$parent[('_pusherStateChangeHandler')]($event)" @netstatus="_$self.$parent[('_pusherNetStatusHandler')]($event)" @error="_$self.$parent[('_pusherErrorHandler')]($event)" @bgmstart="_$self.$parent[('_pusherBGMStartHandler')]($event)" @bgmprogress="_$self.$parent[('_pusherBGMProgressHandler')]($event)" @bgmcomplete="_$self.$parent[('_pusherBGMCompleteHandler')]($event)" @audiovolumenotify="_$self.$parent[('_pusherAudioVolumeNotify')]($event)"></live-pusher>
  10. <view class="no-video" v-if="(!pusher.enableCamera)">
  11. <image class="image" src="./static/mute-camera-white.png"></image>
  12. </view>
  13. </view>
  14. <view v-for="(item,index) in (visibleStreamList)" :key="item.streamID" :class="'view-container player-container '+(item.isVisible?'':'none')" :id="'player-'+item.streamID" :data-userid="item.userID" :data-streamtype="item.streamType" @click="_$self.$parent[('_doubleTabToggleFullscreen')]($event)">
  15. <live-player class="player" :id="item.streamID" :data-userid="item.userID" :data-streamid="item.streamID" :data-streamtype="item.streamType" :src="item.src" mode="RTC" :autoplay="item.autoplay" :mute-audio="item.muteAudio" :mute-video="item.muteVideo" :orientation="item.orientation" :object-fit="item.objectFit" :background-mute="item.enableBackgroundMute" :min-cache="item.minCache" :max-cache="item.maxCache" :sound-mode="item.soundMode" :enable-recv-message="item.enableRecvMessage" :auto-pause-if-navigate="item.autoPauseIfNavigate" :auto-pause-if-open-native="item.autoPauseIfOpenNative" :debug="debug" @statechange="_$self.$parent[('_playerStateChange')]($event)" @fullscreenchange="_$self.$parent[('_playerFullscreenChange')]($event)" @netstatus="_$self.$parent[('_playerNetStatus')]($event)" @audiovolumenotify="_$self.$parent[('_playerAudioVolumeNotify')]($event)"></live-player>
  16. <view class="no-video" v-if="item.muteVideo">
  17. <image class="image" src="./static/display-pause-white.png"></image>
  18. <view class="text">
  19. <p>{{item.userID}}</p>
  20. </view>
  21. </view>
  22. <view class="no-video" v-if="(!item.hasVideo && !item.muteVideo)">
  23. <image class="image" src="./static/mute-camera-white.png"></image>
  24. <view class="text">
  25. <p>{{item.userID}}</p>
  26. </view>
  27. <view class="text">
  28. <p>对方摄像头未打开</p>
  29. </view>
  30. </view>
  31. <view class="no-audio" v-if="(!item.hasAudio)">
  32. <image class="image" src="./static/mute-mic-white.png"></image>
  33. </view>
  34. <view class="audio-volume" v-if="item.hasAudio">
  35. <image class="image" src="./static/micro-open.png"></image>
  36. <view class="audio-active" :style="'height:'+(item.volume)+'%'">
  37. <image class="image" src="./static/audio-active.png"></image>
  38. </view>
  39. </view>
  40. <view class="operation-bar">
  41. <view class="operation-item-container">
  42. <view class="operation-item" @click.stop.prevent="_$self.$parent[('_handleSubscribeRemoteAudio')]($event)" :data-user-i-d="item.userID" :data-stream-type="item.streamType">
  43. <image class="item-image" :src="item.muteAudio? './static/speaker-false.png': './static/speaker-white.png'"></image>
  44. </view>
  45. <view class="operation-item" @click.stop.prevent="_$self.$parent[('_handleSubscribeRemoteVideo')]($event)" :data-user-i-d="item.userID" :data-stream-type="item.streamType">
  46. <image class="item-image" :src="item.muteVideo? './static/display-pause-false.png': './static/display-play-white.png'"></image>
  47. </view>
  48. <view class="operation-item" @click="_$self.$parent[('_toggleFullscreen')]($event)" :data-user-i-d="item.userID" :data-stream-type="item.streamType">
  49. <image class="item-image" src="./static/fullscreen-white.png"></image>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. <view v-for="(item,index) in (gridPagePlaceholderStreamList)" :key="item.id" class="view-container player-container player-placeholder">
  55. <image class="image" src="./static/mute-camera-white.png"></image>
  56. </view>
  57. </view>
  58. </view>
  59. </view>
  60. <view class="column-2">
  61. <view class="menu" v-if="(!isShowMoreMenu)">
  62. <view class="menu-item" @click="_$self.$parent[('_switchSettingPanel')]($event)">
  63. <image class="image" src="./static/setting-white.png"></image>
  64. </view>
  65. <view class="menu-item" @click="_$self.$parent[('_switchMemberListPanel')]($event)">
  66. <image class="image" src="./static/list-white.png"></image>
  67. </view>
  68. <view class="menu-item" @click="_$self.$parent[('_hangUp')]($event)">
  69. <image class="image" src="./static/hangup-red.png"></image>
  70. </view>
  71. <view class="menu-item" @click="_$self.$parent[('_toggleIMPanel')]($event)">
  72. <image class="image" :src="enableIM? './static/im-white.png': './static/im-disable.png'"></image>
  73. </view>
  74. </view>
  75. </view>
  76. </view>
  77. <view class="pages-container" v-if="gridPageCount > 1">
  78. <view v-for="(item,index) in (gridPageCount)" :key="item.this" :class="'page-item '+(index+1 === gridCurrentPage? 'current':'')"></view>
  79. </view>
  80. <view :class="'panel memberlist-panel '+(panelName === 'memberlist-panel' ? '' : 'none')">
  81. <view @click="_$self.$parent[('_handleMaskerClick')]($event)" class="close-btn">X</view>
  82. <view class="panel-header">成员列表</view>
  83. <view class="panel-body">
  84. <view class="panel-tips" v-if="streamList.length === 0">暂无成员</view>
  85. <scroll-view class="scroll-container" scroll-y="true">
  86. <view v-for="(item,index) in (streamList)" :key="item.streamID" class="member-item">
  87. <view class="member-id">{{item.userID}}</view>
  88. <view class="member-btns">
  89. <button class="btn" hover-class="btn-hover" :data-userid="item.userID" :data-streamtype="item.streamType" data-key="objectFit" data-value="fillCrop|contain" @click="_$self.$parent[('_setPlayerProperty')]($event)">{{item.objectFit === 'fillCrop'? '填充':'适应'}}</button>
  90. <button class="btn" hover-class="btn-hover" :data-userid="item.userID" :data-streamtype="item.streamType" data-key="orientation" data-value="vertical|horizontal" @click="_$self.$parent[('_setPlayerProperty')]($event)">{{item.orientation === 'vertical'? '竖屏':'横屏'}}</button>
  91. <button class="btn" hover-class="btn-hover" :data-userid="item.userID" :data-streamtype="item.streamType" @click="_$self.$parent[('_switchStreamType')]($event)" v-if="item.streamType === 'main'">{{item._definitionType === 'small'? '小画面':'主画面'}}</button>
  92. <button class="btn" hover-class="btn-hover" :data-userid="item.userID" :data-streamtype="item.streamType" @click="_$self.$parent[('_handleSnapshotClick')]($event)">截屏</button>
  93. </view>
  94. </view>
  95. </scroll-view>
  96. </view>
  97. </view>
  98. <view :class="'panel setting-panel '+(panelName === 'setting-panel' ? '' : 'none')">
  99. <view @click="_$self.$parent[('_handleMaskerClick')]($event)" class="close-btn">X</view>
  100. <view class="panel-header">推流设置</view>
  101. <view class="panel-body">
  102. <scroll-view class="scroll-container" scroll-y="true">
  103. <view class="setting-option">
  104. <view class="label">启用摄像头</view>
  105. <view class="btn-normal" @click="_$self.$parent[('_toggleVideo')]($event)">
  106. <image class="btn-image" :src="pusher.enableCamera? './static/camera-true.png': './static/camera-false.png'"></image>
  107. </view>
  108. </view>
  109. <view class="setting-option">
  110. <view class="label">启用麦克风</view>
  111. <view class="btn-normal" @click="_$self.$parent[('_toggleAudio')]($event)">
  112. <image class="btn-image" :src="pusher.enableMic? './static/audio-true.png': './static/audio-false.png'"></image>
  113. </view>
  114. </view>
  115. <view class="setting-option">
  116. <view class="label">切换摄像头</view>
  117. <view class="btn-normal" @click="_$self.$parent[('switchCamera')]($event)">
  118. <image class="btn-image" src="./static/switch.png"></image>
  119. </view>
  120. </view>
  121. <view class="setting-option">
  122. <view class="label">开启美颜</view>
  123. <switch class="setting-switch" color="#006eff" :checked="pusher.beautyLevel == 9 ? true: false" data-key="beautyLevel" data-value="9|0" data-value-type="number" @change="_$self.$parent[('_setPuserProperty')]($event)"></switch>
  124. </view>
  125. <view class="setting-option">
  126. <view class="label">开启AGC</view>
  127. <switch class="setting-switch" color="#006eff" :checked="pusher.enableAgc" data-key="enableAgc" data-value="true" data-value-type="boolean" @change="_$self.$parent[('_setPuserProperty')]($event)"></switch>
  128. </view>
  129. <view class="setting-option">
  130. <view class="label">开启ANS</view>
  131. <switch class="setting-switch" color="#006eff" :checked="pusher.enableAns" data-key="enableAns" data-value="true" data-value-type="boolean" @change="_$self.$parent[('_setPuserProperty')]($event)"></switch>
  132. </view>
  133. <view class="setting-option">
  134. <view class="label">开启横屏推流</view>
  135. <switch class="setting-switch" color="#006eff" :checked="pusher.videoOrientation === 'vertical' ? false: true" data-key="videoOrientation" data-value="horizontal|vertical" data-value-type="string" @change="_$self.$parent[('_setPuserProperty')]($event)"></switch>
  136. </view>
  137. </scroll-view>
  138. </view>
  139. </view>
  140. <view :class="'panel bgm-panel '+(panelName === 'bgm-panel' ? '' : 'none')">
  141. <view @click="_$self.$parent[('_handleMaskerClick')]($event)" class="close-btn">X</view>
  142. <view class="panel-header">背景音乐</view>
  143. <view class="panel-body">
  144. <view class="setting-option">
  145. <view class="label">MIC音量</view>
  146. <view class="slider-content">
  147. <slider :value="MICVolume" min="0" max="100" show-value="true" activeColor="#006eff" @change="_$self.$parent[('_changeProperty')]($event)" data-property-name="MICVolume"></slider>
  148. </view>
  149. </view>
  150. <view class="setting-option">
  151. <view class="label">BGM音量</view>
  152. <view class="slider-content">
  153. <slider :value="BGMVolume" min="0" max="100" show-value="true" activeColor="#006eff" @change="_$self.$parent[('_changeProperty')]($event)" data-property-name="BGMVolume"></slider>
  154. </view>
  155. </view>
  156. <view class="setting-option">
  157. <view class="label">播放进度</view>
  158. <view class="slider-content">
  159. <progress activeColor="#006eff" :percent="BGMProgress"></progress>
  160. </view>
  161. </view>
  162. <view class="menu">
  163. <view class="menu-item" @click="_$self.$parent[('_handleBGMOperation')]($event)" data-operation-name="playBGM">
  164. <view class="label">播放</view>
  165. </view>
  166. <view class="menu-item" @click="_$self.$parent[('_handleBGMOperation')]($event)" data-operation-name="pauseBGM">
  167. <view class="label">暂停</view>
  168. </view>
  169. <view class="menu-item" @click="_$self.$parent[('_handleBGMOperation')]($event)" data-operation-name="resumeBGM">
  170. <view class="label">继续</view>
  171. </view>
  172. <view class="menu-item" @click="_$self.$parent[('_handleBGMOperation')]($event)" data-operation-name="stopBGM">
  173. <view class="label">停止</view>
  174. </view>
  175. </view>
  176. </view>
  177. </view>
  178. <view :class="'masker '+(panelName =='' ? 'none' : '')" @click="_$self.$parent[('_handleMaskerClick')]($event)"></view>
  179. </view>
  180. </template></uni-shadow-root>
  181. </template>
  182. <script>
  183. global['__wxRoute'] = 'trtc-room/template/grid/grid'
  184. Component({})
  185. export default global['__wxComponents']['trtc-room/template/grid/grid']
  186. </script>
  187. <style platform="mp-weixin">
  188. /* 9人 会议模版 */
  189. .template-grid{
  190. width: 100vw;
  191. height: 100vh;
  192. overflow: hidden;
  193. /* display: flex;
  194. flex-direction: row;
  195. flex-wrap: wrap; */
  196. }
  197. .column-layout{
  198. width: 100vw;
  199. height: 100vh;
  200. display: flex;
  201. flex-direction: column;
  202. }
  203. .column-layout .column-1{
  204. flex: 1;
  205. }
  206. .column-layout .column-2{
  207. position: relative;
  208. height: 100rpx;
  209. background-color: rgb(36, 36, 36);
  210. }
  211. .fullscreen-device-fix .column-layout .column-2{
  212. height: 120rpx;
  213. }
  214. .menu {
  215. width: 100%;
  216. display: flex;
  217. flex-direction: row;
  218. justify-content: center;
  219. align-items: center;
  220. }
  221. .menu .menu-item{
  222. text-align: center;
  223. height: 100rpx;
  224. flex-grow: 1;
  225. display: flex;
  226. flex-direction: column;
  227. justify-content: center;
  228. align-items: center;
  229. }
  230. .menu .menu-item .image{
  231. width: 46rpx;
  232. height: 46rpx;
  233. }
  234. .more-menu {
  235. position: absolute;
  236. top: 0;
  237. }
  238. .more-menu .scroll-container{
  239. width: 100%;
  240. height: 100rpx;
  241. white-space: nowrap;
  242. }
  243. .more-menu .menu-item-container{
  244. width: 20%;
  245. display: inline-block;
  246. }
  247. .template-grid .grid-container {
  248. width: 100%;
  249. height: 100%;
  250. display: flex;
  251. flex-direction: row;
  252. flex-wrap: wrap;
  253. }
  254. .template-grid .grid-scroll-container{
  255. width: 100%;
  256. height: 100%;
  257. /* box-sizing: border-box; */
  258. /* overflow-y: scroll; */
  259. background-color: #000;
  260. }
  261. .grid-containe.overflow {
  262. height: auto;
  263. }
  264. .template-grid .view-container {
  265. position: relative;
  266. }
  267. .stream-0 .view-container{
  268. width: 100%;
  269. height: 100%;
  270. }
  271. .stream-1 .view-container{
  272. width: 100%;
  273. height: 50%;
  274. }
  275. .stream-2 .view-container{
  276. width: 50%;
  277. height: 50%;
  278. }
  279. .stream-2 .view-container:nth-child(1){
  280. width: 100%;
  281. height: 50%;
  282. }
  283. .stream-3 .view-container{
  284. width: 50%;
  285. height: 50%;
  286. }
  287. .stream-4 .view-container{
  288. width: 50%;
  289. height: 33.3%;
  290. }
  291. .stream-4 .view-container:nth-child(1){
  292. width: 100%;
  293. height: 33.3%;
  294. }
  295. .stream-5 .view-container {
  296. width: 50%;
  297. height: 33.3%;
  298. }
  299. .stream-6 .view-container{
  300. width: 33.3%;
  301. height: 33.3%;
  302. }
  303. .stream-6 .view-container:nth-child(1){
  304. width: 100%;
  305. height: 33.3%;
  306. }
  307. .stream-7 .view-container{
  308. width: 33.3%;
  309. height: 33.3%;
  310. }
  311. .stream-7 .view-container:nth-child(1){
  312. width: 50%;
  313. height: 33.3%;
  314. }
  315. .stream-7 .view-container:nth-child(2){
  316. width: 50%;
  317. height: 33.3%;
  318. }
  319. .stream-8 .view-container{
  320. width: 33.3%;
  321. height: 33.3%;
  322. }
  323. .stream-even .view-container{
  324. width: 50%;
  325. height: 50%;
  326. }
  327. .stream-odd .view-container{
  328. width: 50%;
  329. height: 50%;
  330. }
  331. .stream-odd .view-container:last-child{
  332. width: 100%;
  333. height: 50%;
  334. }
  335. .template-grid .operation-bar {
  336. position: absolute;
  337. bottom: 6rpx;
  338. width: 100%;
  339. display: flex;
  340. flex-direction: row;
  341. justify-content: center;
  342. }
  343. .operation-bar .operation-item-container {
  344. width: auto;
  345. display: flex;
  346. flex-direction: row;
  347. justify-content: center;
  348. background: rgb(0, 0, 0, .3);
  349. border-radius: 10rpx;
  350. }
  351. .template-grid .operation-bar .operation-item {
  352. width: 64rpx;
  353. height: 64rpx;
  354. /* flex-grow: 1; */
  355. display: flex;
  356. flex-direction: column;
  357. justify-content: center;
  358. align-items: center;
  359. text-align: center;
  360. }
  361. .operation-item .item-image{
  362. width: 36rpx;
  363. height: 36rpx;
  364. }
  365. .template-grid .volume-progress {
  366. width: 100%;
  367. position: absolute;
  368. bottom: 0;
  369. }
  370. .template-grid .btn-normal {
  371. width: 64rpx;
  372. height: 64rpx;
  373. margin: 0 6rpx;
  374. box-sizing: border-box;
  375. display: flex;
  376. background: rgba(255, 255, 255, 1);
  377. justify-content: center;
  378. align-items: center;
  379. border-radius: 50%;
  380. }
  381. .template-grid .btn-normal .btn-image{
  382. width: 36rpx;
  383. height: 36rpx;
  384. }
  385. .template-grid .btn-hangup {
  386. background: #f75c45;
  387. }
  388. .template-grid .panel{
  389. position: absolute;
  390. background: rgba(0, 0, 0, 0.8);
  391. width: 90vw;
  392. height: auto;
  393. z-index: 999;
  394. top: 50vh;
  395. left: 50vw;
  396. transform: translate(-50%, -50%);
  397. color: white;
  398. display: flex;
  399. flex-direction: column;
  400. padding: 20rpx 0;
  401. border-radius: 10rpx;
  402. box-sizing: border-box;
  403. font-size: 14px;
  404. }
  405. .panel .close-btn {
  406. position: absolute;
  407. top: 0;
  408. right: 0;
  409. padding: 5px 10px;
  410. }
  411. .panel .panel-header{
  412. text-align: center;
  413. padding-bottom: 20rpx;
  414. }
  415. .panel .panel-tips {
  416. color: #999;
  417. text-align: center;
  418. }
  419. .panel .panel-body{
  420. flex: 1;
  421. max-height: 50vh;
  422. }
  423. .panel .panel-body .scroll-container{
  424. width: 100%;
  425. height: 100%;
  426. box-sizing: border-box;
  427. }
  428. .memberlist-panel .panel-body{
  429. height: 50vh;
  430. }
  431. .memberlist-panel .member-item {
  432. display: flex;
  433. /* border-bottom: 1px solid #999; */
  434. margin: 16rpx 16rpx 16rpx 32rpx;
  435. }
  436. .memberlist-panel .member-id {
  437. width: 30%;
  438. font-size: 12px;
  439. line-height: 64rpx;
  440. }
  441. .memberlist-panel .member-btns{
  442. width: 70%;
  443. display: flex;
  444. justify-content: flex-end;
  445. }
  446. .memberlist-panel .member-btns .btn-normal{
  447. margin-left: 0;
  448. }
  449. .memberlist-panel .member-btns .btn{
  450. margin-right: 0;
  451. }
  452. .setting-panel .panel-body{
  453. height: 50vh;
  454. }
  455. .setting-panel .setting-option{
  456. display: flex;
  457. justify-content: space-between;
  458. margin: 16rpx 16rpx 16rpx 32rpx;
  459. /* box-sizing: border-box;
  460. padding: 12rpx 16rpx 12rpx 32rpx; */
  461. }
  462. .setting-panel .setting-option .label{
  463. /* line-height: 64rpx; */
  464. display: flex;
  465. flex-direction: column;
  466. justify-content: center;
  467. align-items: center;
  468. }
  469. .setting-panel .setting-switch {
  470. transform:scale(0.8);
  471. margin-right: -12rpx;
  472. }
  473. .bgm-panel .panel-body{
  474. height: auto;
  475. }
  476. .bgm-panel .setting-option{
  477. height: 60rpx;
  478. display: flex;
  479. flex-direction: row;
  480. margin: 16rpx 16rpx 16rpx 32rpx;
  481. }
  482. .bgm-panel .setting-option .label{
  483. width: 140rpx;
  484. line-height: 60rpx;
  485. }
  486. .bgm-panel .setting-option .slider-content{
  487. flex: 1;
  488. line-height: 60rpx;
  489. }
  490. .bgm-panel .setting-option .slider-content slider{
  491. transform:scale(0.9);
  492. margin: 0;
  493. }
  494. .bgm-panel .setting-option .slider-content progress{
  495. transform:scale(0.9);
  496. margin-top: 28rpx;
  497. }
  498. .bgm-panel .menu {
  499. padding: 16rpx 32rpx 16rpx 32rpx;
  500. box-sizing: border-box;
  501. }
  502. .bgm-panel .menu .menu-item{
  503. height: 80rpx;
  504. background-color: #333;
  505. }
  506. .template-grid .masker{
  507. position: absolute;
  508. top: 0;
  509. width: 100vw;
  510. height: 100vh;
  511. background: rgba(0, 0, 0, 0.4);
  512. }
  513. .template-grid .no-stream,
  514. .template-grid .no-video{
  515. position: absolute;
  516. top: 0;
  517. left: 0;
  518. width: 100%;
  519. height: 100%;
  520. display: flex;
  521. flex-direction: column;
  522. align-items: center;
  523. justify-content: center;
  524. box-sizing: border-box;
  525. color:#fff;
  526. background-color: rgba(0, 0, 0, 0.4);
  527. font-size: 12px;
  528. }
  529. .template-grid .audio-volume,
  530. .template-grid .no-audio{
  531. position: absolute;
  532. bottom: 20rpx;
  533. left: 20rpx;
  534. width: 36rpx;
  535. height: 36rpx;
  536. }
  537. .no-stream .image,
  538. .no-video .image{
  539. width: 60rpx;
  540. height: 60rpx;
  541. }
  542. .audio-volume .image,
  543. .no-audio .image{
  544. width: 36rpx;
  545. height: 36rpx;
  546. position: absolute; /*android 的bug ,image absolute后会向上漂移几个像素,如果要对其必须都设置absolute*/
  547. }
  548. .audio-active {
  549. position: absolute;
  550. left: 0;
  551. bottom: 0;
  552. width: 100%;
  553. height: 0;
  554. overflow: hidden;
  555. }
  556. .audio-active .image{
  557. bottom: 0;
  558. }
  559. .slide-up-tips {
  560. position: absolute;
  561. bottom: -100rpx;
  562. left: 50%;
  563. transform: translate(-50%, 0);
  564. width: 200rpx;
  565. height: auto;
  566. display: flex;
  567. flex-direction: column;
  568. align-items: center;
  569. justify-content: center;
  570. box-sizing: border-box;
  571. font-size: 12px;
  572. color: #fff;
  573. background-color: rgba(0, 0, 0, 0.4);
  574. box-sizing: border-box;
  575. padding: 20rpx;
  576. border-radius: 10rpx;
  577. opacity: 0;
  578. }
  579. .slide-up-tips .image {
  580. width: 100rpx;
  581. height: 100rpx;
  582. }
  583. .player-placeholder {
  584. display: flex;
  585. flex-direction: column;
  586. align-items: center;
  587. justify-content: center;
  588. }
  589. .player-placeholder .image {
  590. width: 100rpx;
  591. height: 100rpx;
  592. }
  593. .pages-container {
  594. width: auto;
  595. left: 50%;
  596. transform: translate(-50%, 0);
  597. height: 20rpx;
  598. position: absolute;
  599. bottom: 12%;
  600. display: flex;
  601. flex-direction: row;
  602. align-items: center;
  603. justify-content: center;
  604. }
  605. .pages-container .page-item {
  606. width: 20rpx;
  607. height: 20rpx;
  608. border-radius: 50%;
  609. margin: 0 8rpx;
  610. background-color: rgb(99, 99, 99, .5);
  611. }
  612. .pages-container .page-item.current {
  613. background-color: #fff;
  614. }
  615. .radio-group-no-box {
  616. display: inline-block;
  617. color: #006eff;
  618. background-color: #ffffff;
  619. border: 1px solid #006eff;
  620. border-radius: 4px;
  621. margin-left: 180rpx;
  622. font-size: 12px;
  623. }
  624. .radio-group-no-box .radio-item{
  625. padding: 5px 8px;
  626. text-align: center;
  627. border-right: 1px solid #006eff;
  628. display: inline-block;
  629. }
  630. .radio-group-no-box .radio-item:last-child{
  631. border-right: none;
  632. }
  633. .radio-group-no-box .radio-item.selected{
  634. color: #ffffff;
  635. background-color: #006eff;
  636. }
  637. .radio-group-no-box radio{
  638. display: none;
  639. }
  640. .picker-label{
  641. display: inline-block;
  642. color: #006eff;
  643. background-color: #ffffff;
  644. border: 1px solid #006eff;
  645. border-radius: 4px;
  646. padding: 5px 8px;
  647. text-align: center;
  648. font-size: 12px;
  649. }
  650. </style>