tags: string[]
thumbnailPath: string
thumbnailUrl: string
+ previewPath: string
+ previewUrl: string
views: number
likes: number
dislikes: number
podHost: string,
tags: string[],
thumbnailPath: string,
+ previewPath: string,
views: number,
likes: number,
dislikes: number,
this.tags = hash.tags
this.thumbnailPath = hash.thumbnailPath
this.thumbnailUrl = API_URL + hash.thumbnailPath
+ this.previewPath = hash.previewPath
+ this.previewUrl = API_URL + hash.previewPath
this.views = hash.views
this.likes = hash.likes
this.dislikes = hash.dislikes
loadVideoInfos(videoId, function (videoInfos) {
var magnetUri = videoInfos.magnetUri
- // FIXME: use poster?
- // var videoContainer = document.getElementById('video-container')
- // var thumbnailUrl = 'http://' + videoInfos.podUrl + videoInfos.thumbnailPath
- // videoContainer.poster = thumbnailUrl
+ var videoContainer = document.getElementById('video-container')
+ var previewUrl = window.location.protocol + '//' + videoInfos.podHost + videoInfos.previewPath
+ videoContainer.poster = previewUrl
videojs('video-container', { controls: true, autoplay: false }, function () {
var player = this