Skip to content

Commit

Permalink
Merge pull request #20 from BluPoint-io/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Hakkı Can authored Jul 19, 2019
2 parents 9c1ba3c + 72a2a08 commit c9a1c97
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/player/player.js
Original file line number Diff line number Diff line change
Expand Up @@ -846,17 +846,11 @@ class Player {
const { tizen, webapis } = window;
try {
if (tizen && webapis) {
let tryCount = 0;
const interval = setInterval(() => {
tryCount += 1;
const playerState = webapis.avplay.getState();
if (['READY', 'PAUSED', 'PLAYING'].indexOf(playerState) > -1) {
webapis.avplay.play();
Logger.addLog('Player', 'info', 'Video is playing...');
clearInterval(interval);
}
if (tryCount > 5) clearInterval(interval);
}, 500);
const playerState = webapis.avplay.getState();
if (['READY', 'PAUSED', 'PLAYING'].indexOf(playerState) > -1) {
webapis.avplay.play();
Logger.addLog('Player', 'info', 'Video is playing...');
}
} else if (this.videoElement) {
this.videoElement.play();
} else if (this.objectPlayer) {
Expand Down

0 comments on commit c9a1c97

Please sign in to comment.