0.1.3 • Published 2 years ago

live-dayan v0.1.3

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

DayanCloud RayStreaming Launcher

RayStreaming launcher

Quick start

import { Launcher } from 'live-dayan'

// NOTE: token, signaling address and iceServers were provided by qjcloud
let loadingBgImage = './xxx.png'
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,
  loadingBgImage,
)

ShowLoadingContent

launcher.showLoadingContent('xxxx')

HideLoadingContent

launcher.hideLoadingContent()

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()
0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

2 years ago

0.1.0

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.10

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago