Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Player.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default class Player extends Component {
this.progressTimeout = setTimeout(this.progress, this.props.progressFrequency || this.props.progressInterval)
}

seekTo (amount, type, keepPlaying = false) {
seekTo (amount, type, keepPlaying) {
// When seeking before player is ready, store value and seek later
if (!this.isReady) {
if (amount !== 0) {
Expand Down
5 changes: 4 additions & 1 deletion src/players/DailyMotion.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ export default class DailyMotion extends Component {
// Nothing to do
}

seekTo (seconds) {
seekTo (seconds, keepPlaying = true) {
this.callPlayer('seek', seconds)
if (!keepPlaying) {
this.pause()
}
}

setVolume (fraction) {
Expand Down
5 changes: 4 additions & 1 deletion src/players/Facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,11 @@ export default class Facebook extends Component {
// Nothing to do
}

seekTo (seconds) {
seekTo (seconds, keepPlaying = true) {
this.callPlayer('seek', seconds)
if (!keepPlaying) {
this.pause()
}
}

setVolume (fraction) {
Expand Down
5 changes: 4 additions & 1 deletion src/players/FilePlayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,11 @@ export default class FilePlayer extends Component {
}
}

seekTo (seconds) {
seekTo (seconds, keepPlaying = true) {
this.player.currentTime = seconds
if (!keepPlaying) {
this.pause()
}
}

setVolume (fraction) {
Expand Down
5 changes: 4 additions & 1 deletion src/players/Kaltura.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ export default class Kaltura extends Component {
// Nothing to do
}

seekTo (seconds) {
seekTo (seconds, keepPlaying = true) {
this.callPlayer('setCurrentTime', seconds)
if (!keepPlaying) {
this.pause()
}
}

setVolume (fraction) {
Expand Down
5 changes: 4 additions & 1 deletion src/players/Mixcloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,11 @@ export default class Mixcloud extends Component {
// Nothing to do
}

seekTo (seconds) {
seekTo (seconds, keepPlaying = true) {
this.callPlayer('seek', seconds)
if (!keepPlaying) {
this.pause()
}
}

setVolume (fraction) {
Expand Down
5 changes: 4 additions & 1 deletion src/players/SoundCloud.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,11 @@ export default class SoundCloud extends Component {
// Nothing to do
}

seekTo (seconds) {
seekTo (seconds, keepPlaying = true) {
this.callPlayer('seekTo', seconds * 1000)
if (!keepPlaying) {
this.pause()
}
}

setVolume (fraction) {
Expand Down
5 changes: 4 additions & 1 deletion src/players/Streamable.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,11 @@ export default class Streamable extends Component {
// Nothing to do
}

seekTo (seconds) {
seekTo (seconds, keepPlaying = true) {
this.callPlayer('setCurrentTime', seconds)
if (!keepPlaying) {
this.pause()
}
}

setVolume (fraction) {
Expand Down
5 changes: 4 additions & 1 deletion src/players/Twitch.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ export default class Twitch extends Component {
this.callPlayer('pause')
}

seekTo (seconds) {
seekTo (seconds, keepPlaying = true) {
this.callPlayer('seek', seconds)
if (!keepPlaying) {
this.pause()
}
}

setVolume (fraction) {
Expand Down
5 changes: 4 additions & 1 deletion src/players/Vidyard.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,11 @@ export default class Vidyard extends Component {
window.VidyardV4.api.destroyPlayer(this.player)
}

seekTo (amount) {
seekTo (amount, keepPlaying = true) {
this.callPlayer('seek', amount)
if (!keepPlaying) {
this.pause()
}
}

setVolume (fraction) {
Expand Down
5 changes: 4 additions & 1 deletion src/players/Vimeo.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,11 @@ export default class Vimeo extends Component {
this.callPlayer('unload')
}

seekTo (seconds) {
seekTo (seconds, keepPlaying = true) {
this.callPlayer('setCurrentTime', seconds)
if (!keepPlaying) {
this.pause()
}
}

setVolume (fraction) {
Expand Down
5 changes: 4 additions & 1 deletion src/players/Wistia.js
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,11 @@ export default class Wistia extends Component {
this.callPlayer('remove')
}

seekTo (seconds) {
seekTo (seconds, keepPlaying = true) {
this.callPlayer('time', seconds)
if (!keepPlaying) {
this.pause()
}
}

setVolume (fraction) {
Expand Down
2 changes: 1 addition & 1 deletion src/players/YouTube.js
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default class YouTube extends Component {
this.callPlayer('stopVideo')
}

seekTo (amount, keepPlaying) {
seekTo (amount, keepPlaying = false) {
this.callPlayer('seekTo', amount)
if (!keepPlaying && !this.props.playing) {
this.pause()
Expand Down