Issue #333 media switch fix #348

Merged
akinwale merged 2 commits from issue333 into master 2017-07-12 23:19:00 +02:00
akinwale commented 2017-07-12 14:45:11 +02:00 (Migrated from github.com)

Fix for switching between audio and video media types after playback has started.

I had to set the state's isPlaying property directly in the componentWillReceiveProps method, since I tried to make use of setState which resulted in a no-op error: Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op.

Fix for switching between audio and video media types after playback has started. I had to set the state's `isPlaying` property directly in the `componentWillReceiveProps` method, since I tried to make use of `setState` which resulted in a no-op error: `Can only update a mounted or mounting component. This usually means you called setState() on an unmounted component. This is a no-op.`
kauffj commented 2017-07-12 22:29:27 +02:00 (Migrated from github.com)

@akinwale I believe this should check if the deterministic property (fileInfo.download_path? fileInfo.outpoint?) has changed before setting the state. Theoretically this component could re-render without the file changing.

@akinwale I believe this should check if the deterministic property (fileInfo.download_path? fileInfo.outpoint?) has changed before setting the state. Theoretically this component could re-render without the file changing.
kauffj (Migrated from github.com) requested changes 2017-07-12 22:31:10 +02:00
kauffj (Migrated from github.com) left a comment

(see comments on the PR made directly)

(see comments on the PR made directly)
akinwale commented 2017-07-12 23:00:45 +02:00 (Migrated from github.com)

@kauffj Pushed a new commit to address this. Made use of outpoint since this is guaranteed to not change.

@kauffj Pushed a new commit to address this. Made use of outpoint since this is guaranteed to not change.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#348
No description provided.