@x-edu/live-player 0.0.4 → 0.0.6

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/doc/develop.md ADDED
@@ -0,0 +1,24 @@
1
+ # 开发指南
2
+
3
+ ## 发布
4
+
5
+ 发布到 npm 官方 registry 上,注意不要发到 npm.sdp.nd 上
6
+
7
+ ```bash
8
+ npm publish
9
+ ```
10
+
11
+ 发布后需要同步版本,依次访问如下地址,进行同步
12
+
13
+ - https://npmmirror.com/sync/@x-edu/live-player
14
+ - http://npm.sdp.nd/sync/@x-edu/live-player
15
+
16
+ 访问 https://npmmirror.com/package/%40x-edu%2Flive-player 查看版本是否正确
17
+
18
+ ## 开发
19
+
20
+ 代码都是由 x-edu-web 项目下的 `src\page\publicLive\detail`
21
+
22
+ 直播相关逻辑代码因为是复用公开直播的,不要轻易更改,只更改强师方面外围接入的的需求
23
+
24
+ 对接人:孙仙钟
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@x-edu/live-player",
3
- "version": "0.0.4",
3
+ "version": "0.0.6",
4
4
  "main": "dist/XEduLivePlayer.common.js",
5
5
  "scripts": {
6
6
  "start": "cross-env SDP_ENV=local gms dev",
@@ -10,7 +10,9 @@
10
10
  "start:ie11-ncet": "cross-env SDP_ENV=ncet-xedu BROWSERSLIST_ENV=production gms dev",
11
11
  "start:prod": "cross-env SDP_ENV=product gms dev",
12
12
  "build": "gms build",
13
- "build:lib": "cross-env SDP_ENV=ncet-xedu gms build --target=lib --excludeReact --formats=commonjs --name XEduLivePlayer",
13
+ "build:lib-ncet": "cross-env SDP_ENV=ncet-xedu gms build --target=lib --excludeReact --formats=commonjs --name XEduLivePlayer",
14
+ "build:lib-pre": "cross-env SDP_ENV=preproduction gms build --target=lib --excludeReact --formats=commonjs --name XEduLivePlayerPre --no-cleanDist",
15
+ "build:lib": "npm run build:lib-ncet && npm run build:lib-pre",
14
16
  "cache:clean": "rimraf node_modules/.cache",
15
17
  "test": "gms test:unit",
16
18
  "test:coverage": "gms test:unit --coverage --collectCoverageFrom='src/**/*.{js,jsx}'",
@@ -32,7 +32,7 @@ import { ShortUrlMap } from './const'
32
32
  import { setUC } from '@/util/auth/func'
33
33
  import config from '@/config/env'
34
34
 
35
- const TrackPageName = 'TCH_webPlatform_publiclive_detail_page'
35
+ const TrackPageName = 'edu_Platform_publiclive_detail_page'
36
36
 
37
37
  export default function PublicLiveDetail({
38
38
  containerClassName,
@@ -242,7 +242,7 @@ export default function PublicLiveDetail({
242
242
  if (loginStatus !== LOGIN_STATUS.WAIT && liveInfo) {
243
243
  onSendSensors({
244
244
  pageName: TrackPageName,
245
- eventName: 'TCH_webPlatform_publiclive_detail_page',
245
+ eventName: 'edu_Platform_publiclive_detail_page',
246
246
  params: {
247
247
  publiclive_id: liveInfo.live_id,
248
248
  publiclive_name: liveInfo.live_name,
@@ -273,7 +273,7 @@ export default function PublicLiveDetail({
273
273
  if (needReport) {
274
274
  onSendSensors({
275
275
  pageName: TrackPageName,
276
- eventName: 'TCH_webPlatform_publiclive_detail_replay_click',
276
+ eventName: 'edu_Platform_publiclive_detail_replay_click',
277
277
  params: {
278
278
  publiclive_id: liveInfo.live_id,
279
279
  publiclive_name: liveInfo.live_name,
@@ -289,7 +289,7 @@ export default function PublicLiveDetail({
289
289
  const handleRequestFullScreen = () => {
290
290
  onSendSensors({
291
291
  pageName: TrackPageName,
292
- eventName: 'TCH_webPlatform_publiclive_detail_fullscreen_click'
292
+ eventName: 'edu_Platform_publiclive_detail_fullscreen_click'
293
293
  })
294
294
  }
295
295
 
@@ -297,7 +297,7 @@ export default function PublicLiveDetail({
297
297
  if (needReport) {
298
298
  onSendSensors({
299
299
  pageName: TrackPageName,
300
- eventName: 'TCH_webPlatform_publiclive_detail_play_click',
300
+ eventName: 'edu_Platform_publiclive_detail_play_click',
301
301
  params: {
302
302
  publiclive_id: liveInfo.live_id,
303
303
  publiclive_name: liveInfo.live_name,
package/src/index.js CHANGED
@@ -1,7 +1,9 @@
1
1
  import React from 'react'
2
2
  import { render } from 'react-dom'
3
3
 
4
- import PublicLiveDetail from './App'
4
+ import PublicLive from './App'
5
+
6
+ const { PublicLiveDetail } = PublicLive
5
7
 
6
8
  // 测试页面内容
7
9
  render(