Skip to content

Commit

Permalink
fix greentext bug
Browse files Browse the repository at this point in the history
  • Loading branch information
swimmadude66 committed Nov 3, 2017
1 parent 008d736 commit 45d3a6b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/client/services/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export class PlayerService {
}

onPlayerStateChange(event, that) {
if (event.data === 2) {
if (!this.novid && event.data === 2) {
that.player.playVideo();
} else {
that.playerEvents.next({Event: 'stateChange', Data: event.data});
Expand All @@ -73,11 +73,9 @@ export class PlayerService {
playVideo(video, startSeconds) {
if (video) {
this.novid = false;
if (this.player && this.player.clearVideo && this.player.playVideo) {
this.player.clearVideo();
this.player.cueVideoById(video.Info.ID, startSeconds || 0);
if (this.player && this.player.loadVideoById) {
this.playerInfo.start = startSeconds || 0;
this.player.playVideo();
this.player.loadVideoById(video.Info.ID, startSeconds || 0);
} else {
this.playerInfo.start = startSeconds || 0;
this.playerInfo.VideoId = video.Info.ID;
Expand Down

0 comments on commit 45d3a6b

Please sign in to comment.