+ getCurrentVideoFile () {
+ return this.currentVideoFile
+ }
+
+ getTorrent () {
+ return this.torrent
+ }
+
+ private tryToPlay (done?: Function) {
+ if (!done) done = function () { /* empty */ }
+
+ const playPromise = this.player.play()
+ if (playPromise !== undefined) {
+ return playPromise.then(done)
+ .catch(err => {
+ console.error(err)
+ this.player.pause()
+ this.player.posterImage.show()
+ this.player.removeClass('vjs-has-autoplay')
+ this.player.removeClass('vjs-has-big-play-button-clicked')
+
+ return done()
+ })
+ }
+
+ return done()
+ }
+
+ private seek (time: number) {
+ this.player.currentTime(time)
+ this.player.handleTechSeeked_()
+ }
+