import './live-player.scss' import React from 'react' import { View, LivePlayer, Button } from '@tarojs/components' import Taro from '@tarojs/taro' import Header from '../../../components/head/head' import ComponentState from '../../../components/component_state/component_state' export default class PageView extends React.Component { constructor(props) { super(props) this.state = { src: '', srcurl: 'https://hls-xjhsy.sobeylive.com/xjwlmqapp2019/211_q_live170191539951308.flv', isShow: true, minCacheOne: 5, minCacheTwo: -1, minCacheThree: 0.2, minCacheFour: -0.2, maxCacheOne: 8, maxCacheTwo: 3, maxCacheThree: 3, maxCacheFour: 3, maxOne: 3, maxTwo: 3, maxThree: 3, maxFour: 3, iscache: false, } } handleInputChangeSrc = (e) => { this.setState({ src: e.target.value, }) } handleInputChangeMaxOne = (e) => { this.setState({ maxOne: e.target.value, }) } handleInputChangeMaxTwo = (e) => { this.setState({ maxTwo: e.target.value, }) } handleInputChangeMaxThree = (e) => { this.setState({ maxThree: e.target.value, }) } handleInputChangeMaxFour = (e) => { this.setState({ maxFour: e.target.value, }) } handleClickSrc = async () => { let srcurl = this.state.src await this.setState({ srcurl, }) } handleClickMaxOne = async () => { let maxCacheOne = this.state.maxOne await this.setState({ maxCacheOne, }) } handleClickMaxTwo = async () => { let maxCacheTwo = this.state.maxTwo await this.setState({ maxCacheTwo, }) } handleClickMaxThree = async () => { let maxCacheThree = this.state.maxThree await this.setState({ maxCacheThree, }) } handleClickMaxFour = async () => { let maxCacheFour = this.state.maxFour await this.setState({ maxCacheFour, }) } hendleFullScreenChange(e) { console.log('hendleFullScreenChange', e) } updates = async () => { let iscache = !this.state.iscache await this.setState({ iscache, }) } render() { return (
{' '}
live min:5,max:8 {this.state.isShow && ( )} 最大缓冲区(数字类型): {' '} live min:-1,max:3 {this.state.isShow && ( )} 最大缓冲区(数字类型): {' '} RTC min:0.2,max:0.8 {this.state.isShow && ( )} 最大缓冲区(数字类型): {' '} RTC min:-0.2,max:0.8 onFullScreenChange {this.state.isShow && ( )} 最大缓冲区(数字类型): {' '} src: {' '}
) } }