forked from Open-CT/openbrain
LabelTable can seek player.
This commit is contained in:
parent
8ca78492c1
commit
af7f9971f8
|
@ -69,6 +69,13 @@ class LabelTable extends React.Component {
|
|||
key: 'no',
|
||||
width: '70px',
|
||||
render: (text, record, index) => {
|
||||
return (
|
||||
<Button type={"text"} style={{width: "50px"}} onClick={() => {
|
||||
this.props.player.seek(record.timestamp);
|
||||
}} >
|
||||
{index + 1}
|
||||
</Button>
|
||||
)
|
||||
return (index + 1);
|
||||
}
|
||||
},
|
||||
|
|
|
@ -91,6 +91,8 @@ class Video extends React.Component {
|
|||
width: myWidth,
|
||||
height: myHeight,
|
||||
});
|
||||
|
||||
this.props.onCreatePlayer(player);
|
||||
}
|
||||
|
||||
onTimeUpdate(player) {
|
||||
|
|
|
@ -14,6 +14,7 @@ class VideoEditPage extends React.Component {
|
|||
classes: props,
|
||||
videoName: props.match.params.videoName,
|
||||
video: null,
|
||||
player: null,
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -70,7 +71,7 @@ class VideoEditPage extends React.Component {
|
|||
<Affix offsetTop={100}>
|
||||
<div style={{marginTop: "10px"}}>
|
||||
<div className="screen" style={{position: "absolute", zIndex: 100, pointerEvents: "none", width: '440px', height: '472px', marginLeft: '200px', marginRight: '200px', backgroundColor: "rgba(255,0,0,0)" }}></div>
|
||||
<Video task={task} labels={this.state.video.labels} onUpdateTime={(time) => {this.setState({currentTime: time})}} />
|
||||
<Video task={task} labels={this.state.video.labels} onUpdateTime={(time) => {this.setState({currentTime: time})}} onCreatePlayer={(player) => {this.setState({player: player})}} />
|
||||
<div style={{fontSize: 20, marginTop: "10px"}}>
|
||||
{i18next.t("video:Current time (second)")}: {" "}
|
||||
{
|
||||
|
@ -163,6 +164,7 @@ class VideoEditPage extends React.Component {
|
|||
title={i18next.t("video:Labels")}
|
||||
table={this.state.video.labels}
|
||||
currentTime={this.state.currentTime}
|
||||
player={this.state.player}
|
||||
onUpdateTable={(value) => {this.updateVideoField('labels', value)}}
|
||||
/>
|
||||
</Col>
|
||||
|
|
Loading…
Reference in New Issue