0.8.3 • Published 4 months ago
live-qjc v0.8.3
QingjiaoCloud RayStreaming Launcher
RayStreaming launcher
Quick start
import { Launcher } from 'live-qjc'
// NOTE: token, signaling address and iceServers were provided by qjcloud
const signaling = 'wss://xxx.xxx.xxx.xxx:xxxx'
const token = 'xxxxxxxxxxxxxxxxxxxxxxxx'
const iceConfig = [
{
urls: 'turn:xxx.xxx.xxx.xxx',
username: 'xxxxxx',
credential: 'xxxxxx',
},
{
urls: 'stun:xxx.xxx.xxx.xxx',
username: 'xxxxxx',
credential: 'xxxxx',
},
]
const container = document.createElement('div')
container.style.width = 'auto'
container.style.height = '100%'
document.body.appendChild(container)
const launcher = new Launcher(`${signaling}/clientWebsocket/${token}`, iceConfig, container)
ShowLoadingContent
launcher.showLoadingContent(text, loadingBgImage)
text
\<string>loadingBgImage
\<string>
HideLoadingContent
launcher.hideLoadingContent()
GetLastFrame
launcher.getLastFrame(accuracy, alpha)
accuracy
\<number>alpha
\<number>
Rivatuner
// NOTE: return an object
const report = launcher.getRivatunerInfo()
console.log(`
FPS: ${fps}
biterate: ${bitrate}kbps
latency: ${latency}ms
averageJitterBufferDelay: ${averageJitterBufferDelay}ms
packetLossRate: ${(packetLossRate * 100).toFixed(3)}%
`)
Disconnetion
launcher.disConnection()
Screenful
launcher.setFullScreen()
launcher.exitFullScreen()
VideoSetting
change framerate
launcher.changeFrameRate(framerate)
framerate
\<number> fps
change bitrate
launcher.changeBitrate(bitrate)
bitrate
\<number> kbps
change resolution
launcher.changeResolution(width, height)
width
\<number>height
\<number>
File Transfer
upload
launcher.uploadSingleFile(file)
download
launcher.sendFileResponse()
change download authority
launcher.setFileAuthority(permission)
permission
\<boolean>
Support Clipboard
0.8.3
4 months ago
0.8.2
4 months ago
0.8.1
4 months ago
0.8.0-alpha-8
8 months ago
0.8.0-alpha-5
8 months ago
0.8.0-alpha-4
8 months ago
0.8.0-alpha-7
8 months ago
0.8.0-alpha-6
8 months ago
0.8.0-alpha-3
8 months ago
0.8.0-alpha-2
8 months ago
0.8.0-alpha
8 months ago
0.8.0
8 months ago
0.7.0
9 months ago
0.6.0
10 months ago
0.5.3
1 year ago
0.5.2
1 year ago
0.5.1
1 year ago
0.4.8
1 year ago
0.4.5
2 years ago
0.4.4
2 years ago
0.4.7
1 year ago
0.4.6
2 years ago
0.5.0
1 year ago
0.4.3
2 years ago
0.4.2
2 years ago
0.3.0
2 years ago
0.2.1
2 years ago
0.4.1
2 years ago
0.4.0
2 years ago
0.3.1
2 years ago
0.1.2
2 years ago
0.2.0
2 years ago
0.1.1
2 years ago
0.1.0
2 years ago