mirror of
https://github.com/openmhz/trunk-server.git
synced 2026-11-21 05:05:49 -05:00
Trying to fix Source ID display
It looks like I had componentUpdate() defined twice in the mediaplayer.js file, so it wasn't getting called
This commit is contained in:
@@ -61,7 +61,6 @@ class CallPlayer extends React.Component {
|
||||
autoPlay: true,
|
||||
callId: false,
|
||||
playTime: 0,
|
||||
sourceIndex: 0,
|
||||
callScroll: false,
|
||||
callSelect: false,
|
||||
urlOptions: false,
|
||||
@@ -259,7 +258,7 @@ class CallPlayer extends React.Component {
|
||||
const nextCall = this.props.callsById[nextCallId];
|
||||
var callUrl = nextCall.url;
|
||||
|
||||
this.setState({ callUrl: callUrl, callId: nextCallId, sourceIndex: 0, isPlaying: true }, () => { audio.playSource(callUrl) }); //scrollToComponent(this.currentCallRef.current);
|
||||
this.setState({ callUrl: callUrl, callId: nextCallId, isPlaying: true }, () => { audio.playSource(callUrl) }); //scrollToComponent(this.currentCallRef.current);
|
||||
if (this.currentCallRef.current) {
|
||||
this.currentCallRef.current.scrollIntoView({
|
||||
behavior: "smooth",
|
||||
@@ -278,7 +277,6 @@ class CallPlayer extends React.Component {
|
||||
this.setState({
|
||||
callUrl: callUrl,
|
||||
callId: data.call._id,
|
||||
sourceIndex: 0,
|
||||
isPlaying: true
|
||||
}, () => { audio.playSource(callUrl); }); //scrollToComponent(this.currentCallRef.current);
|
||||
this.props.callActions.fetchCallInfo(data.call._id);
|
||||
@@ -345,7 +343,6 @@ class CallPlayer extends React.Component {
|
||||
filter.live = false;
|
||||
this.setState({
|
||||
callId: _id,
|
||||
sourceIndex: 0,
|
||||
urlOptions: true,
|
||||
autoPlay: false,
|
||||
callScroll: true,
|
||||
@@ -493,7 +490,6 @@ class CallPlayer extends React.Component {
|
||||
var callUrl = call.url;
|
||||
this.setState({
|
||||
callUrl: callUrl,
|
||||
sourceIndex: 0,
|
||||
isPlaying: true,
|
||||
callSelect: false
|
||||
}, () => { audio.playSource(callUrl); }); //scrollToComponent(this.currentCallRef.current);
|
||||
|
||||
@@ -74,9 +74,6 @@ componentDidUpdate(prevProps) {
|
||||
}
|
||||
|
||||
}
|
||||
componentDidUpdate() {
|
||||
}
|
||||
|
||||
|
||||
render() {
|
||||
var playEnabled = { "disabled": true }
|
||||
@@ -121,35 +118,6 @@ render(){
|
||||
|
||||
</Menu.Item>
|
||||
</Menu.Menu>
|
||||
|
||||
|
||||
/* <Media>
|
||||
{
|
||||
mediaProps => <Menu.Menu>
|
||||
|
||||
<Menu.Item onClick={() => mediaProps.playPause()} {...playEnabled} >
|
||||
<Player src={callUrl} vendor="audio" onEnded={this.props.onEnded} autoPlay={true} onTimeUpdate={this.updatePlayProgress}/>
|
||||
|
||||
{
|
||||
mediaProps.isPlaying
|
||||
? (<Icon name="pause"/>)
|
||||
: (<Icon name="play"/>)
|
||||
}
|
||||
</Menu.Item><Menu.Item>
|
||||
<Progress inverted percent={this.state.playProgress}/>
|
||||
<Label color="black">
|
||||
{this.state.playTime}
|
||||
Sec
|
||||
</Label>
|
||||
<Label color="black" className="desktop-only">
|
||||
{sourceId}
|
||||
</Label>
|
||||
|
||||
</Menu.Item>
|
||||
</Menu.Menu>
|
||||
}
|
||||
</Media>*/
|
||||
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import ListSystemsContainer from "./System/ListSystemsContainer"
|
||||
import CallPlayerContainer from "./Call/CallPlayerContainer"
|
||||
|
||||
ReactGA.initialize(process.env.REACT_APP_GOOGLE_ANALYTICS);
|
||||
console.log(process.env);
|
||||
|
||||
const store = configureStore(/* provide initial state if any */)
|
||||
|
||||
ReactDOM.render(
|
||||
|
||||
Reference in New Issue
Block a user