嗨,我正在尝试在我的反应本机项目上运行'yarn android'.并且遇到以下错误:
yarn android v0.27.5
$ react-native-scripts android
10:37:45 AM: Starting packager...
10:39:34 AM: Starting Android...
10:39:37 AM: Packager started!
To view your app with live reloading, point the Expo app to this QR code.
You'll find the QR scanner on the Projects tab of the app.
<QR CODE>
Or enter this address in the Expo app's search bar:
exp://172.19.29.31:19000
Your phone will need to be on the same local network as this computer.
For links to install the Expo …Run Code Online (Sandbox Code Playgroud) 例如,如果我有组件:
import React, { Component } from 'react';
import { Video } from 'expo';
let styles = require('../stylesheet.js');
export default class Player extends Component {
render(){
return(
<Video
ref={this._handleVideoRef}
source={require(//file)}
rate={1.0}
volume={1.0}
muted={false}
useNativeControls
resizeMode="cover"
shouldPlay
style={styles.player} />
)
}
}
Run Code Online (Sandbox Code Playgroud)
我在文档(https://docs.expo.io/versions/latest/sdk/av.html)中看到使用“playbackstatus.didJustFinish”和 onPlaybackStatusUpdate 但他们的例子对我来说没有多大意义。谁能告诉我如何使用我的代码确定视频是否已结束?