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:
Luke Berndt
2021-06-24 21:28:18 -04:00
parent f49aba698c
commit 5f4c4a6372
3 changed files with 61 additions and 97 deletions

View File

@@ -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);