@x-edu/live-player 0.0.7 → 0.0.8

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.
@@ -3,7 +3,7 @@ import React, { useState, useEffect } from 'react'
3
3
  import { Icon } from 'fish'
4
4
  import dayjs from 'dayjs'
5
5
  import classNames from 'classnames'
6
- import Empty from '@/component/Empty'
6
+ // import Empty from '@/component/Empty'
7
7
  import {
8
8
  getOpenClassLive
9
9
  // getServerTime
@@ -40,6 +40,8 @@ export default function PublicLiveDetail({
40
40
  infoClassName,
41
41
  playerClassName,
42
42
  descriptionClassName,
43
+ errorCover, // 当直播不存在或者错误时候的封面展示
44
+ errorText,
43
45
  replay: propRelay,
44
46
  liveId: propLiveId,
45
47
  sdpAppId: propSdpAppId,
@@ -258,7 +260,24 @@ export default function PublicLiveDetail({
258
260
 
259
261
  if (!isExist) {
260
262
  return (
261
- <Empty hideBack tip="内容已失效" className={style['live-empty']} />
263
+ <div
264
+ className={classNames(
265
+ style['public-live-detail-wrapper'],
266
+ style['live-empty'],
267
+ containerClassName
268
+ )}
269
+ style={{
270
+ backgroundImage: 'url(https://ndcs-pre.101.com/preproduction_content_x_live/%E5%BE%AE%E4%BF%A1%E5%9B%BE%E7%89%87_20230526205119_1685361330548.png)'
271
+ }}
272
+ >
273
+ <div className={style['empty-marker']} />
274
+ <div className={style['empty-content']}>
275
+ {/* eslint-disable-next-line max-len */}
276
+ <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADYAAAA2CAYAAACMRWrdAAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAALOSURBVHgB7VqLbeMwDGVugctt4BEygje4bFBv0G5y2SC5Rc4jpBNEneDaLtBXCVIA16asL50U8AMEA7ZF6pG0PqSJVqxYIYkNCQHAVl8a3Xa6/dTt1+Dxs25v5rrZbN7o3qHJtLoddDsjHmfXp6V7gvGMbo+JZHxQuj3QraEHsXeDqQ11E4JaaaNbD3kcjS5aAlrRDmEvmefmu+lgjbAd9N86GXv3ToysHUlCK3hA2MItJcIRPQVky4RmgFSPCiED693TYuScRX14osowMnV79eirE5bOimqG2JEEMKNX1YgOQjj2b0GupxLAzmqxkCJnPgMuLPeUC4+1TPyfFib3xOhSGCwjKcK6uYHfgFzP6EqfuMB7qxm9sxg52O9tjHOqkDZ2sAuT43S1KQIOjIBdosLq5DwGP6QIGB9BVESfpcipkfy4cITdpGZZZQly4KMpPDt63P2bIiFNDvxsHd5mwR4n0jt+lSFGDvzs2I3f+8H05Ui8UAJ0gqbTl7/Mo64COS75MwlFjtgEOZkkKXKeseQRKxhER3KemwVHbGIR5OzJHGqTix1LFDFiXJ2CyuQa5t5kLeOIPTP3WipERXINc++dQkDBAh2D0qUAuQu065y8pUpBCTnkbqlcZ84qLVVEDjnwSaWkTXD0saUEqeRQemxxQrgiQ0OVEUsO/FbqQqkAn2coyw75dQXJed5JT6DCzo6KEVY9QUo0Tw62TFXurYEybqdvUmEiRQLE5TDzvTVS1jNCFYTKO1gqQQvpVDOvc47cpZpe+LOx5p5EUeLRQ+oDtT8DzKe7j6hXRupnSHUkAYRz+ccci8JuCObC778YqcEgUkq1e/f+uFTbOCPFlGovkC7VDgbXIG1qzoEJvX9Yqrg+ImisrlAXhpDxUn6Z6M4IXj1kZsSiE3t1IP+Xoz+ofCyS/knMfPTX6xWvZI/yJgXx8i1+EluxYsUEn1PRdSb/XhDOAAAAAElFTkSuQmCC" alt="" />
277
+ <p>{errorText || '内容已失效'}</p>
278
+ </div>
279
+
280
+ </div>
262
281
  )
263
282
  }
264
283
 
@@ -119,13 +119,38 @@
119
119
  }
120
120
 
121
121
  .live-empty {
122
- > img {
123
- width: 440px;
124
- height: 300px;
122
+ width: 100%;
123
+ height:100%;
124
+ // height: 548px;
125
+ background-repeat: no-repeat;
126
+ background-position: center center;
127
+ position: relative;
128
+ .empty-marker{
129
+ position: absolute;
130
+ top:0;
131
+ left: 0;
132
+ right: 0;
133
+ bottom: 0;
134
+ background-color: rgba(0, 0, 0, 0.50);
125
135
  }
126
- > p {
127
- font-size: 18px;
136
+ .empty-content{
137
+ position: absolute;
138
+ top: 50%;
139
+ left: 50%;
140
+ transform: translate(-50%, -50%);
141
+ text-align: center;
142
+ p {
143
+ color: #FFFFFF;
144
+ font-size: 24px;
145
+ }
146
+
147
+ img {
148
+ width: 54px;
149
+ height: 54px;
150
+ margin-bottom: 8px;
151
+ }
128
152
  }
153
+
129
154
  }
130
155
 
131
156
  .live-wrap {
Binary file
Binary file
Binary file
Binary file