Skip to content

Commit

Permalink
up Play_PreStart
Browse files Browse the repository at this point in the history
related to #277
  • Loading branch information
fgl27 committed Dec 1, 2023
1 parent 8f4de59 commit 4956dbc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions app/specific/Play.js
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ function Play_PreStart() {
avplay.setAttribute('type', 'application/avplayer');
avplay.setAttribute('style', 'width:100%; height:100%; position: absolute;');
document.getElementById('scene2').appendChild(avplay);
Play_avplay = (window.tizen && window.webapis.avplay) || {};
Play_avplay = webapis.avplay;
Play_TizenVersion = tizen.systeminfo.getCapability('http://tizen.org/feature/platform.version');
}

Expand Down Expand Up @@ -1350,13 +1350,14 @@ function Play_isIdleOrPlaying() {
try {
state = Play_avplay.getState();
} catch (error) {
console.error('Play_isIdleOrPlaying', error);

try {
Play_avplay.close();
} catch (e) {
console.log('Play_isIdleOrPlaying close', e);
}

console.error(error);
//on error reset all player status and restart the player
state = 'ERROR';
Play_PlayerCheckRun = false;
Expand Down

0 comments on commit 4956dbc

Please sign in to comment.