import { NgModule } from '@angular/core'
import { RouterModule, Routes } from '@angular/router'
import { PageNotFoundComponent } from './page-not-found.component'
+import { MetaGuard } from '@ngx-meta/core'
const pageNotFoundRoutes: Routes = [
{
path: '',
- component: PageNotFoundComponent
+ component: PageNotFoundComponent,
+ canActivate: [ MetaGuard ],
+ data: {
+ meta: {
+ title: 'Not found'
+ }
+ }
}
]
height: 100%;
width: 100%;
text-align: center;
- margin-top: 50px;
+ margin-top: 150px;
font-size: 32px;
}
\ No newline at end of file
<div class="row">
<!-- We need the video container for videojs so we just hide it -->
- <div [hidden]="videoNotFound" id="video-element-wrapper">
+ <div id="video-element-wrapper">
</div>
- <div i18n *ngIf="videoNotFound" id="video-not-found">Video not found :'(</div>
-
<!-- Video information -->
<div *ngIf="video" class="margin-content video-bottom">
<div class="video-info">
playerElement: HTMLVideoElement
userRating: UserVideoRateType = null
video: VideoDetails = null
- videoNotFound = false
descriptionLoading = false
completeDescriptionShown = false
const startTime = this.route.snapshot.queryParams.start
this.onVideoFetched(video, startTime)
.catch(err => this.handleError(err))
- },
-
- error => {
- this.videoNotFound = true
- console.error(error)
}
)
})
this.torrent = webtorrent.add(magnetOrTorrentUrl, torrentOptions, torrent => {
console.log('Added ' + magnetOrTorrentUrl + '.')
- // Pause the old torrent
if (oldTorrent) {
+ // Pause the old torrent
oldTorrent.pause()
// Pause does not remove actual peers (in particular the webseed peer)
oldTorrent.removePeer(oldTorrent['ws'])
// We use a fake renderer so we download correct pieces of the next file
- // This way we'll be able to
if (options.delay) {
const fakeVideoElem = document.createElement('video')
renderVideo(torrent.files[0], fakeVideoElem, { autoplay: false, controls: false }, (err, renderer) => {
fakeRenderer = renderer
- if (err) {
- console.error('Cannot render new torrent in fake video element.', err)
- }
+ if (err) console.error('Cannot render new torrent in fake video element.', err)
// Load the future file at the correct time
fakeVideoElem.currentTime = this.player.currentTime() + (options.delay / 2000)