1.0.4 • Published 2 years ago

live-clv v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

使用

js调用

const ybSdk = require("live-clv")

// 支持回调函数及Promise两种方式, 当传入回调时,不触发Promise
ybSdk.enterRoom({
  type: 'link',
  value: 'short link'
}, (url) => {
  this.setDate({
    ybSrc: url
  })
})
// or
ybSdk.enterRoom({
  type: 'liveId',
  value: 'xxxxxid'
}, (url) => {
  this.setDate({
    ybSrc: url
  })
})
<web-view src="{{ybSrc}}"></web-view>
方法参数
enterRoomparams, success, failed

params

当 type 值为liveId时, value 为直播间Id

字段类型
valuestring
type'link'、'liveId'

组件调用

"usingComponents": {
  "live-clv": "/node_modules/live-clv/components/live-clv/live-clv"
}
<live-clv src="{{ybSrc}}"></live-clv>

属性

当 type 值为liveId时, value 为直播间Id

当为短链接时,确保配置业务域名

属性描述
src短链接或直播Id
type'link'、'liveId' 默认link

事件

事件描述
bindmessage网页向小程序 postMessage 时,会在特定时机(小程序后退、组件销毁、分享)触发并收到消息。
bindload网页加载成功时候触发此事件。
binderror网页加载失败的时候触发此事件。

业务域名

// http
https://cast.263live.net
https://logcollect.263cv.net:8099
https://cclocation.263cv.net:18080
https://live.263cv.net
https://cclogin.263cv.net:18081
https://cvac.263cv.net
https://appserver.263.net:7777/

// ws
wss:ccbroker.263cv.net:18043
1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago