I have problem when i'm trying to access by this
keyword. I need to access run
function inside updateTime
export class PlayerService {
createPlayer(): void {
return new window['YT'].Player(this.youtube.playerId, {
height: this.youtube.playerHeight,
width: this.youtube.playerWidth,
events: {
'onStateChange': (event) => {
function updateTime() {
//////I need to access | run function | from here
};
this.timeupdater = setInterval(updateTime, 100);
}
}
});
}
run (){
//some codes
}
}
I'm working on ionic 2