Skip to content

Commit

Permalink
Use index keys for FilePlayer source array
Browse files Browse the repository at this point in the history
Fixes #276
  • Loading branch information
cookpete committed Nov 15, 2017
1 parent 7abc1b1 commit 61db28e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/players/FilePlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,12 @@ export default class FilePlayer extends Component {
if (this.player.buffered.length === 0) return 0
return this.player.buffered.end(0)
}
renderSource = source => {
renderSource = (source, index) => {
if (typeof source === 'string') {
return <source key={source} src={source} />
return <source key={index} src={source} />
}
const { src, type } = source
return <source key={src} src={src} type={type} />
return <source key={index} src={src} type={type} />
}
renderTrack = (track, index) => {
return <track key={index} {...track} />
Expand Down

0 comments on commit 61db28e

Please sign in to comment.