StreamingPlaylistsCommand,
VideosCommand,
VideoStudioCommand,
+ VideoTokenCommand,
ViewsCommand
} from '../videos'
import { CommentsCommand } from '../videos/comments-command'
videoStats?: VideoStatsCommand
views?: ViewsCommand
twoFactor?: TwoFactorCommand
+ videoToken?: VideoTokenCommand
constructor (options: { serverNumber: number } | { url: string }) {
if ((options as any).url) {
this.rtmpsPort = this.parallel ? this.randomRTMP() : 1937
this.port = 9000 + this.internalServerNumber
- this.url = `http://localhost:${this.port}`
- this.host = `localhost:${this.port}`
- this.hostname = 'localhost'
+ this.url = `http://127.0.0.1:${this.port}`
+ this.host = `127.0.0.1:${this.port}`
+ this.hostname = '127.0.0.1'
}
setUrl (url: string) {
const onPeerTubeExit = () => rej(new Error('Process exited:\n' + aggregatedLogs))
const onParentExit = () => {
- if (!this.app || !this.app.pid) return
+ if (!this.app?.pid) return
try {
process.kill(self.app.pid)
this.videoStats = new VideoStatsCommand(this)
this.views = new ViewsCommand(this)
this.twoFactor = new TwoFactorCommand(this)
+ this.videoToken = new VideoTokenCommand(this)
}
}