Skip to content

Commit

Permalink
fix(FEC -9356): linear without DVR stream has keyboard event for seek…
Browse files Browse the repository at this point in the history
…ing (#441)

Keyboard event that made seek will be prevented
  • Loading branch information
Yuvalke committed Oct 29, 2019
1 parent 49eb8fa commit 4c3fcf4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/keyboard/keyboard.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ class Keyboard extends Component {
}
},
[KeyMap.LEFT]: () => {
if (!(this.props.player.ads && this.props.player.ads.isAdBreak())) {
if (!(this.props.player.ads && this.props.player.ads.isAdBreak()) && !(this.props.player.isLive() && !this.props.player.isDvr())) {
const newTime = this.props.player.currentTime - KEYBOARD_DEFAULT_SEEK_JUMP;
const from = this.props.player.currentTime;
const to = newTime > 0 ? newTime : 0;
Expand All @@ -176,7 +176,7 @@ class Keyboard extends Component {
}
},
[KeyMap.RIGHT]: () => {
if (!(this.props.player.ads && this.props.player.ads.isAdBreak())) {
if (!(this.props.player.ads && this.props.player.ads.isAdBreak()) && !(this.props.player.isLive() && !this.props.player.isDvr())) {
const newTime = this.props.player.currentTime + KEYBOARD_DEFAULT_SEEK_JUMP;
const from = this.props.player.currentTime;
const to = newTime > this.props.player.duration ? this.props.player.duration : newTime;
Expand All @@ -188,7 +188,7 @@ class Keyboard extends Component {
}
},
[KeyMap.HOME]: () => {
if (!(this.props.player.ads && this.props.player.ads.isAdBreak())) {
if (!(this.props.player.ads && this.props.player.ads.isAdBreak()) && !(this.props.player.isLive() && !this.props.player.isDvr())) {
const from = this.props.player.currentTime;
const to = 0;
this.props.logger.debug(`Seek. ${from} => ${to}`);
Expand All @@ -199,7 +199,7 @@ class Keyboard extends Component {
}
},
[KeyMap.END]: () => {
if (!(this.props.player.ads && this.props.player.ads.isAdBreak())) {
if (!(this.props.player.ads && this.props.player.ads.isAdBreak()) && !(this.props.player.isLive() && !this.props.player.isDvr())) {
const from = this.props.player.currentTime;
const to = this.props.player.duration;
this.props.logger.debug(`Seek. ${from} => ${to}`);
Expand Down

0 comments on commit 4c3fcf4

Please sign in to comment.