2018-01-07 17:40:03 +00:00
|
|
|
<% content_for "header" do %>
|
2018-03-07 22:48:26 +00:00
|
|
|
<meta name="thumbnail" content="<%= thumbnail %>">
|
2018-07-31 16:33:25 +00:00
|
|
|
<meta name="description" content="<%= description %>">
|
|
|
|
<meta name="keywords" content="<%= video.info["keywords"] %>">
|
2018-07-23 01:02:49 +00:00
|
|
|
<meta property="og:site_name" content="Invidious">
|
2018-08-01 15:45:45 +00:00
|
|
|
<meta property="og:url" content="<%= host_url %>/watch?v=<%= video.id %>">
|
2018-08-01 21:07:47 +00:00
|
|
|
<meta property="og:title" content="<%= HTML.escape(video.title) %>">
|
2018-07-24 22:05:02 +00:00
|
|
|
<meta property="og:image" content="https://i.ytimg.com/vi/<%= video.id %>/hqdefault.jpg">
|
2018-07-23 13:07:24 +00:00
|
|
|
<meta property="og:description" content="<%= description %>">
|
2018-07-23 01:02:49 +00:00
|
|
|
<meta property="og:type" content="video.other">
|
2018-08-01 15:45:45 +00:00
|
|
|
<meta property="og:video:url" content="<%= host_url %>/embed/<%= video.id %>">
|
|
|
|
<meta property="og:video:secure_url" content="<%= host_url %>/embed/<%= video.id %>">
|
2018-07-23 01:02:49 +00:00
|
|
|
<meta property="og:video:type" content="text/html">
|
|
|
|
<meta property="og:video:width" content="1280">
|
|
|
|
<meta property="og:video:height" content="720">
|
|
|
|
<meta name="twitter:card" content="player">
|
|
|
|
<meta name="twitter:site" content="@omarroth">
|
2018-08-01 15:45:45 +00:00
|
|
|
<meta name="twitter:url" content="<%= host_url %>/watch?v=<%= video.id %>">
|
2018-08-01 21:07:47 +00:00
|
|
|
<meta name="twitter:title" content="<%= HTML.escape(video.title) %>">
|
2018-07-23 13:07:24 +00:00
|
|
|
<meta name="twitter:description" content="<%= description %>">
|
2018-08-04 14:50:24 +00:00
|
|
|
<meta name="twitter:image" content="<%= thumbnail %>">
|
2018-08-01 15:45:45 +00:00
|
|
|
<meta name="twitter:player" content="<%= host_url %>/embed/<%= video.id %>">
|
2018-07-23 04:20:49 +00:00
|
|
|
<meta name="twitter:player:width" content="1280">
|
|
|
|
<meta name="twitter:player:height" content="720">
|
2018-07-09 17:17:57 +00:00
|
|
|
<link rel="stylesheet" href="https://unpkg.com/video.js@6.10.3/dist/video-js.min.css">
|
|
|
|
<link rel="stylesheet" href="https://unpkg.com/silvermine-videojs-quality-selector@1.1.2/dist/css/quality-selector.css">
|
2018-07-31 18:19:38 +00:00
|
|
|
<link rel="stylesheet" href="https://unpkg.com/videojs-markers@1.0.1/dist/videojs.markers.min.css">
|
2018-07-31 18:40:26 +00:00
|
|
|
<link rel="stylesheet" href="https://unpkg.com/videojs-share@1.1.0/dist/videojs-share.css">
|
2018-07-09 17:17:57 +00:00
|
|
|
<script src="https://unpkg.com/video.js@6.10.3/dist/video.min.js"></script>
|
|
|
|
<script src="https://unpkg.com/videojs-hotkeys@0.2.21/videojs.hotkeys.min.js"></script>
|
|
|
|
<script src="https://unpkg.com/silvermine-videojs-quality-selector@1.1.2/dist/js/silvermine-videojs-quality-selector.min.js"></script>
|
2018-07-31 18:19:38 +00:00
|
|
|
<script src="https://unpkg.com/videojs-markers@1.0.1/dist/videojs-markers.min.js"></script>
|
2018-07-31 18:40:26 +00:00
|
|
|
<script src="https://unpkg.com/videojs-share@1.1.0/dist/videojs-share.min.js"></script>
|
2018-08-01 21:07:47 +00:00
|
|
|
<title><%= HTML.escape(video.title) %> - Invidious</title>
|
2018-01-07 17:40:03 +00:00
|
|
|
<% end %>
|
2018-01-15 03:16:09 +00:00
|
|
|
|
2018-07-27 23:25:58 +00:00
|
|
|
<% if hlsvp %>
|
|
|
|
<script src="https://unpkg.com/videojs-contrib-hls@5.14.1/dist/videojs-contrib-hls.min.js"></script>
|
|
|
|
<% end %>
|
|
|
|
|
2018-03-12 23:37:01 +00:00
|
|
|
<div class="h-box">
|
2018-07-19 15:30:54 +00:00
|
|
|
<video style="width:100%" playsinline poster="<%= thumbnail %>" title="<%= HTML.escape(video.title) %>"
|
2018-08-04 00:51:29 +00:00
|
|
|
id="player" class="video-js"
|
2018-07-20 20:14:15 +00:00
|
|
|
<% if autoplay %>autoplay<% end %>
|
|
|
|
<% if video_loop %>loop<% end %>
|
2018-07-19 15:30:54 +00:00
|
|
|
controls>
|
2018-07-27 23:25:58 +00:00
|
|
|
<% if hlsvp %>
|
|
|
|
<source src="<%= hlsvp %>" type="application/x-mpegURL">
|
2018-06-08 19:38:59 +00:00
|
|
|
<% else %>
|
2018-07-27 23:25:58 +00:00
|
|
|
<% if listen %>
|
|
|
|
<% audio_streams.each_with_index do |fmt, i| %>
|
2018-08-05 01:27:53 +00:00
|
|
|
<source src="<%= fmt["url"] %>" type='<%= fmt["type"] %>' label="<%= fmt["bitrate"] %>k" selected="<%= i == 0 ? true : false %>">
|
2018-07-27 23:25:58 +00:00
|
|
|
<% end %>
|
|
|
|
<% else %>
|
|
|
|
<% fmt_stream.each_with_index do |fmt, i| %>
|
|
|
|
<% if preferences %>
|
2018-08-05 01:27:53 +00:00
|
|
|
<source src="<%= fmt["url"] %>" type='<%= fmt["type"] %>' label="<%= fmt["label"] %>" selected="<%= preferences.quality == fmt["label"].split(" - ")[0] %>">
|
2018-07-27 23:25:58 +00:00
|
|
|
<% else %>
|
2018-08-05 01:27:53 +00:00
|
|
|
<source src="<%= fmt["url"] %>" type='<%= fmt["type"] %>' label="<%= fmt["label"] %>" selected="<%= i == 0 ? true : false %>">
|
2018-07-27 23:25:58 +00:00
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% captions.each do |caption| %>
|
|
|
|
<track kind="captions" src="/api/v1/captions/<%= video.id %>?label=<%= caption["name"]["simpleText"] %>"
|
|
|
|
srclang="<%= caption["languageCode"] %>" label="<%= caption["name"]["simpleText"]%> ">
|
2018-07-16 16:24:24 +00:00
|
|
|
<% end %>
|
2018-07-22 16:09:43 +00:00
|
|
|
<% end %>
|
2018-06-08 19:38:59 +00:00
|
|
|
<% end %>
|
|
|
|
</video>
|
2018-03-11 17:05:56 +00:00
|
|
|
</div>
|
2018-01-16 19:58:08 +00:00
|
|
|
|
|
|
|
<script>
|
|
|
|
var options = {
|
2018-08-05 13:58:03 +00:00
|
|
|
aspectRatio: '16:9',
|
|
|
|
preload: 'auto',
|
|
|
|
playbackRates: [0.5, 1, 1.5, 2],
|
|
|
|
controlBar: {
|
|
|
|
children: [
|
|
|
|
'playToggle',
|
|
|
|
'volumePanel',
|
|
|
|
'currentTimeDisplay',
|
|
|
|
'timeDivider',
|
|
|
|
'durationDisplay',
|
|
|
|
'progressControl',
|
|
|
|
'remainingTimeDisplay',
|
|
|
|
'captionsButton',
|
|
|
|
'qualitySelector',
|
|
|
|
'playbackRateMenuButton',
|
|
|
|
'fullscreenToggle'
|
|
|
|
]
|
|
|
|
}
|
2018-01-16 19:58:08 +00:00
|
|
|
};
|
2018-07-20 19:50:55 +00:00
|
|
|
|
2018-07-31 18:40:26 +00:00
|
|
|
var shareOptions = {
|
|
|
|
socials: ["fb", "tw", "reddit", "mail"],
|
|
|
|
|
|
|
|
url: "<%= host_url %>/<%= video.id %>?<%= host_params %>",
|
2018-08-01 21:17:34 +00:00
|
|
|
title: "<%= video.title.dump_unquoted %>",
|
2018-07-31 18:40:26 +00:00
|
|
|
description: "<%= description %>",
|
2018-08-01 15:45:45 +00:00
|
|
|
image: '<%= thumbnail %>',
|
|
|
|
embedCode: `<iframe id='ivplayer' type='text/html' width='640' height='360'
|
2018-08-05 13:58:03 +00:00
|
|
|
src='<%= host_url %>/embed/<%= video.id %>?<%= host_params %>' frameborder='0'></iframe>`
|
2018-07-31 18:40:26 +00:00
|
|
|
};
|
|
|
|
|
2018-01-16 19:58:08 +00:00
|
|
|
var player = videojs('player', options, function() {
|
2018-08-04 00:51:29 +00:00
|
|
|
this.hotkeys({
|
2018-01-16 19:58:08 +00:00
|
|
|
volumeStep: 0.1,
|
|
|
|
seekStep: 5,
|
2018-02-06 00:36:16 +00:00
|
|
|
enableModifiersForNumbers: false,
|
|
|
|
customKeys: {
|
|
|
|
play: {
|
|
|
|
key: function(e) {
|
|
|
|
// Toggle play with K Key
|
|
|
|
return (e.which === 75);
|
|
|
|
},
|
|
|
|
handler: function(player, options, e) {
|
|
|
|
if (player.paused()) {
|
|
|
|
player.play();
|
|
|
|
} else {
|
|
|
|
player.pause();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
backward: {
|
|
|
|
key: function(e) {
|
|
|
|
// Go backward 5 seconds
|
|
|
|
return (e.which === 74);
|
|
|
|
},
|
|
|
|
handler: function(player, options, e) {
|
|
|
|
player.currentTime(player.currentTime() - 5);
|
|
|
|
}
|
|
|
|
},
|
|
|
|
forward: {
|
|
|
|
key: function(e) {
|
|
|
|
// Go forward 5 seconds
|
|
|
|
return (e.which === 76);
|
|
|
|
},
|
|
|
|
handler: function(player, options, e) {
|
|
|
|
player.currentTime(player.currentTime() + 5);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2018-01-16 19:58:08 +00:00
|
|
|
});
|
2018-08-05 12:38:43 +00:00
|
|
|
});
|
2018-07-31 18:40:26 +00:00
|
|
|
|
2018-08-05 12:38:43 +00:00
|
|
|
player.share(shareOptions);
|
2018-03-03 21:06:14 +00:00
|
|
|
|
2018-08-05 12:38:43 +00:00
|
|
|
<% if video_start > 0 || video_end > 0 %>
|
|
|
|
player.markers({
|
|
|
|
onMarkerReached: function(marker) {
|
|
|
|
if (marker.text === 'End') {
|
|
|
|
if (player.loop()) {
|
|
|
|
player.markers.prev('Start');
|
|
|
|
} else {
|
|
|
|
player.pause();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
markers: [
|
|
|
|
{time: <%= video_start %>, text: 'Start'},
|
|
|
|
<% if video_end < 0 %>
|
|
|
|
{time: <%= video.info["length_seconds"].to_f - 0.5 %>, text: 'End'}
|
|
|
|
<% else %>
|
|
|
|
{time: <%= video_end %>, text: 'End'}
|
|
|
|
<% end %>
|
|
|
|
]
|
|
|
|
});
|
2018-07-31 18:19:38 +00:00
|
|
|
|
2018-08-05 12:38:43 +00:00
|
|
|
player.currentTime(<%= video_start %>);
|
|
|
|
<% end %>
|
2018-04-11 02:49:10 +00:00
|
|
|
|
2018-08-05 12:38:43 +00:00
|
|
|
<% if !listen %>
|
|
|
|
var currentSources = player.currentSources();
|
|
|
|
for ( var i = 0; i < currentSources.length; i++ ) {
|
|
|
|
if (player.canPlayType(currentSources[i]['type'].split(';')[0]) === '') {
|
|
|
|
currentSources.splice(i);
|
|
|
|
i--;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
player.src(currentSources);
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<% if preferences %>
|
|
|
|
player.volume(<%= preferences.volume.to_f / 100 %>);
|
|
|
|
player.playbackRate(<%= preferences.speed %>);
|
|
|
|
<% end %>
|
2018-07-20 19:36:23 +00:00
|
|
|
|
2018-07-28 14:49:58 +00:00
|
|
|
function toggle(target) {
|
|
|
|
body = target.parentNode.parentNode.children[1];
|
2018-07-30 23:13:26 +00:00
|
|
|
if (body.style.display === null || body.style.display === '') {
|
|
|
|
target.innerHTML = '[ + ]';
|
|
|
|
body.style.display = 'none';
|
2018-07-28 14:49:58 +00:00
|
|
|
} else {
|
2018-07-30 23:13:26 +00:00
|
|
|
target.innerHTML = '[ - ]';
|
|
|
|
body.style.display = '';
|
2018-07-28 14:49:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function toggle_comments(target) {
|
|
|
|
body = target.parentNode.parentNode.parentNode.children[1];
|
2018-07-30 23:13:26 +00:00
|
|
|
if (body.style.display === null || body.style.display === '') {
|
|
|
|
target.innerHTML = '[ + ]';
|
|
|
|
body.style.display = 'none';
|
2018-07-28 14:49:58 +00:00
|
|
|
} else {
|
2018-07-30 23:13:26 +00:00
|
|
|
target.innerHTML = '[ - ]';
|
|
|
|
body.style.display = '';
|
2018-07-28 14:49:58 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function load_comments(target) {
|
2018-07-30 23:13:26 +00:00
|
|
|
var continuation = target.getAttribute('data-continuation');
|
2018-07-28 14:49:58 +00:00
|
|
|
|
|
|
|
var body = target.parentNode.parentNode;
|
|
|
|
var fallback = body.innerHTML;
|
|
|
|
body.innerHTML =
|
2018-07-30 23:38:55 +00:00
|
|
|
'<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>';
|
2018-07-28 14:49:58 +00:00
|
|
|
|
2018-08-04 19:39:41 +00:00
|
|
|
var url = '/api/v1/comments/<%= video.id %>?format=html&continuation=' + continuation;
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
|
xhr.responseType = 'json';
|
|
|
|
xhr.timeout = 10000;
|
|
|
|
xhr.open("GET", url, true);
|
|
|
|
xhr.send();
|
|
|
|
|
|
|
|
xhr.onreadystatechange = function() {
|
|
|
|
if(xhr.readyState == 4 && xhr.status == 200) {
|
|
|
|
body.innerHTML = xhr.response.content_html;
|
|
|
|
} else {
|
|
|
|
body.innerHTML = fallback;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
xhr.ontimeout = function() {
|
2018-07-28 14:49:58 +00:00
|
|
|
body.innerHTML = fallback;
|
2018-08-04 19:39:41 +00:00
|
|
|
}
|
2018-07-28 14:49:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function get_reddit_comments() {
|
2018-08-04 19:39:41 +00:00
|
|
|
var url = '/api/v1/comments/<%= video.id %>?source=reddit';
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
|
xhr.responseType = 'json';
|
|
|
|
xhr.timeout = 10000;
|
|
|
|
xhr.open("GET", url, true);
|
|
|
|
xhr.send();
|
2018-07-20 19:36:23 +00:00
|
|
|
|
2018-08-04 19:39:41 +00:00
|
|
|
xhr.onreadystatechange = function() {
|
|
|
|
if(xhr.readyState == 4 && xhr.status == 200) {
|
|
|
|
comments = document.getElementById('comments');
|
|
|
|
comments.innerHTML = `
|
|
|
|
<div>
|
|
|
|
<h3>
|
|
|
|
<a href="javascript:void(0)" onclick="toggle_comments(this)">[ - ]</a>
|
|
|
|
{title}
|
|
|
|
</h3>
|
|
|
|
<b>
|
|
|
|
<a target="_blank" href="https://reddit.com{permalink}">View more comments on Reddit</a>
|
|
|
|
</b>
|
|
|
|
</div>
|
|
|
|
<div>{content_html}</div>
|
|
|
|
|
2018-08-05 23:03:38 +00:00
|
|
|
<hr>`.supplant({
|
2018-08-04 19:39:41 +00:00
|
|
|
title: xhr.response.title,
|
|
|
|
permalink: xhr.response.permalink,
|
|
|
|
content_html: xhr.response.content_html
|
|
|
|
});
|
|
|
|
} else {
|
|
|
|
get_youtube_comments();
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
xhr.ontimeout = function() {
|
|
|
|
get_reddit_comments();
|
|
|
|
}
|
2018-07-28 14:49:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function get_youtube_comments() {
|
2018-08-04 19:39:41 +00:00
|
|
|
var url = '/api/v1/comments/<%= video.id %>?format=html';
|
|
|
|
var xhr = new XMLHttpRequest();
|
|
|
|
xhr.responseType = 'json';
|
|
|
|
xhr.timeout = 10000;
|
|
|
|
xhr.open("GET", url, true);
|
|
|
|
xhr.send();
|
|
|
|
|
|
|
|
xhr.onreadystatechange = function() {
|
|
|
|
if(xhr.readyState == 4 && xhr.status == 200) {
|
2018-07-30 23:13:26 +00:00
|
|
|
comments = document.getElementById('comments');
|
2018-07-28 14:49:58 +00:00
|
|
|
comments.innerHTML = `
|
2018-08-04 14:36:05 +00:00
|
|
|
<div>
|
|
|
|
<h3>
|
|
|
|
<a href="javascript:void(0)" onclick="toggle_comments(this)">[ - ]</a>
|
|
|
|
<a target="_blank" href="https://www.youtube.com/watch?v=<%= video.id %>">View more comments on YouTube</a>
|
|
|
|
</h3>
|
|
|
|
</div>
|
2018-07-28 14:49:58 +00:00
|
|
|
<div>{content_html}</div>
|
2018-08-05 23:03:38 +00:00
|
|
|
<hr>`.supplant({
|
2018-08-04 19:39:41 +00:00
|
|
|
content_html: xhr.response.content_html
|
2018-07-28 14:49:58 +00:00
|
|
|
});
|
2018-08-04 19:39:41 +00:00
|
|
|
} else {
|
|
|
|
comments = document.getElementById('comments');
|
|
|
|
comments.innerHTML = '';
|
2018-07-28 14:49:58 +00:00
|
|
|
}
|
2018-08-04 19:39:41 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
xhr.ontimeout = function () {
|
|
|
|
get_youtube_comments();
|
|
|
|
}
|
2018-07-28 14:49:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
String.prototype.supplant = function(o) {
|
|
|
|
return this.replace(/{([^{}]*)}/g, function(a, b) {
|
|
|
|
var r = o[b];
|
2018-07-30 23:13:26 +00:00
|
|
|
return typeof r === 'string' || typeof r === 'number' ? r : a;
|
2018-07-28 14:49:58 +00:00
|
|
|
});
|
2018-07-20 19:36:23 +00:00
|
|
|
};
|
|
|
|
|
2018-07-28 14:49:58 +00:00
|
|
|
<% if preferences && preferences.comments == "reddit" %>
|
|
|
|
get_reddit_comments();
|
|
|
|
<% else %>
|
|
|
|
get_youtube_comments();
|
|
|
|
<% end %>
|
|
|
|
|
2018-01-16 19:58:08 +00:00
|
|
|
</script>
|
2018-01-16 02:30:57 +00:00
|
|
|
|
2018-03-12 23:37:01 +00:00
|
|
|
<div class="h-box">
|
2018-01-16 19:58:08 +00:00
|
|
|
<h1>
|
2018-08-01 21:07:47 +00:00
|
|
|
<%= HTML.escape(video.title) %>
|
2018-02-11 23:01:32 +00:00
|
|
|
<% if listen %>
|
2018-03-07 04:03:45 +00:00
|
|
|
<a href="/watch?<%= env.params.query %>">
|
2018-08-03 19:23:48 +00:00
|
|
|
<i class="icon ion-ios-videocam"></i>
|
2018-01-16 19:58:08 +00:00
|
|
|
</a>
|
|
|
|
<% else %>
|
2018-08-05 01:27:53 +00:00
|
|
|
<a href="/watch?<%= env.params.query %>&listen=1">
|
2018-08-03 19:23:48 +00:00
|
|
|
<i class="icon ion-ios-volume-high"></i>
|
2018-01-16 19:58:08 +00:00
|
|
|
</a>
|
|
|
|
<% end %>
|
|
|
|
</h1>
|
2018-03-11 17:05:56 +00:00
|
|
|
</div>
|
2018-01-16 02:30:57 +00:00
|
|
|
|
2018-01-16 19:58:08 +00:00
|
|
|
<div class="pure-g">
|
|
|
|
<div class="pure-u-1 pure-u-md-1-5">
|
2018-04-17 20:53:12 +00:00
|
|
|
<div class="h-box">
|
2018-08-04 14:52:10 +00:00
|
|
|
<p><a href="https://www.youtube.com/watch?v=<%= video.id %>">Watch video on YouTube</a></p>
|
2018-08-03 19:23:48 +00:00
|
|
|
<p><i class="icon ion-ios-eye"></i> <%= number_with_separator(video.views) %></p>
|
|
|
|
<p><i class="icon ion-ios-thumbs-up"></i> <%= number_with_separator(video.likes) %></p>
|
|
|
|
<p><i class="icon ion-ios-thumbs-down"></i> <%= number_with_separator(video.dislikes) %></p>
|
2018-07-26 19:24:45 +00:00
|
|
|
<p id="Genre">Genre : <%= video.genre %></p>
|
|
|
|
<p id="FamilyFriendly">Family Friendly? <%= video.is_family_friendly %></p>
|
2018-04-01 03:14:33 +00:00
|
|
|
<p id="Wilson">Wilson Score : <%= video.wilson_score.round(4) %></p>
|
|
|
|
<p id="Rating">Rating : <%= rating.round(4) %> / 5</p>
|
|
|
|
<p id="Engagement">Engagement : <%= engagement.round(2) %>%</p>
|
2018-04-08 01:09:20 +00:00
|
|
|
<% if ad_slots %>
|
2018-04-11 02:09:31 +00:00
|
|
|
<p id="Slots">Ad Slots : <%= ad_slots %></p>
|
2018-04-08 01:09:20 +00:00
|
|
|
<% end %>
|
|
|
|
<% if engage_types %>
|
2018-04-11 02:09:31 +00:00
|
|
|
<p id="Engage">Engage Types : <%= engage_types %></p>
|
2018-04-08 01:09:20 +00:00
|
|
|
<% end %>
|
|
|
|
<% if ad_tag %>
|
2018-04-11 02:09:31 +00:00
|
|
|
<p id="Category">Ad Category : <%= ad_category %></p>
|
|
|
|
<p id="Tags">Ad Tags(?) : <%= k2 %></p>
|
2018-04-08 01:09:20 +00:00
|
|
|
<% end %>
|
2018-03-16 17:14:40 +00:00
|
|
|
</div>
|
2018-03-11 17:05:56 +00:00
|
|
|
</div>
|
2018-01-16 02:30:57 +00:00
|
|
|
|
2018-01-16 19:58:08 +00:00
|
|
|
<div class="pure-u-1 pure-u-md-3-5">
|
2018-04-17 20:53:12 +00:00
|
|
|
<div class="h-box">
|
2018-03-16 17:14:40 +00:00
|
|
|
<p>
|
2018-06-03 03:15:15 +00:00
|
|
|
<a href="/channel/<%= video.ucid %>">
|
|
|
|
<h3><%= video.author %></h3>
|
2018-03-16 17:14:40 +00:00
|
|
|
</a>
|
|
|
|
</p>
|
2018-07-16 16:24:24 +00:00
|
|
|
<% if user %>
|
2018-06-03 03:15:15 +00:00
|
|
|
<% if subscriptions.includes? video.ucid %>
|
2018-03-31 14:51:14 +00:00
|
|
|
<p>
|
2018-06-03 03:15:15 +00:00
|
|
|
<a href="/subscription_ajax?action_remove_subscriptions=1&c=<%= video.ucid %>">
|
|
|
|
<b>Unsubscribe from <%= video.author %></b>
|
2018-03-31 14:51:14 +00:00
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
<% else %>
|
|
|
|
<p>
|
2018-06-03 03:15:15 +00:00
|
|
|
<a href="/subscription_ajax?action_create_subscription_to_channel=1&c=<%= video.ucid %>">
|
|
|
|
<b>Subscribe to <%= video.author %></b>
|
2018-03-31 14:51:14 +00:00
|
|
|
</a>
|
|
|
|
</p>
|
|
|
|
<% end %>
|
2018-05-04 01:36:27 +00:00
|
|
|
<% else %>
|
|
|
|
<p>
|
|
|
|
<a href="/login">
|
2018-06-03 03:15:15 +00:00
|
|
|
<b>Login to subscribe to <%= video.author %></b>
|
2018-05-04 01:36:27 +00:00
|
|
|
</a>
|
|
|
|
</p>
|
2018-03-31 14:51:14 +00:00
|
|
|
<% end %>
|
2018-03-16 17:14:40 +00:00
|
|
|
<p>
|
|
|
|
<b>Shared <%= video.published.to_s("%B %-d, %Y") %></b>
|
|
|
|
</p>
|
2018-04-17 20:53:12 +00:00
|
|
|
<div>
|
2018-03-16 17:14:40 +00:00
|
|
|
<%= video.description %>
|
|
|
|
</div>
|
2018-08-05 23:03:38 +00:00
|
|
|
<hr>
|
2018-07-20 19:36:23 +00:00
|
|
|
<div id="comments">
|
2018-07-30 23:38:55 +00:00
|
|
|
<h3><center class="loading"><i class="icon ion-ios-refresh"></i></center></h3>
|
2018-03-12 23:36:08 +00:00
|
|
|
</div>
|
2018-03-13 23:37:56 +00:00
|
|
|
</div>
|
2018-03-11 17:05:56 +00:00
|
|
|
</div>
|
2018-01-16 19:58:08 +00:00
|
|
|
<div class="pure-u-1 pure-u-md-1-5">
|
2018-04-17 20:53:12 +00:00
|
|
|
<div class="h-box">
|
2018-03-16 17:14:40 +00:00
|
|
|
<% rvs.each do |rv| %>
|
|
|
|
<% if rv.has_key?("id") %>
|
|
|
|
<a href="/watch?v=<%= rv["id"] %>">
|
2018-07-26 17:09:29 +00:00
|
|
|
<% if preferences && preferences.thin_mode %>
|
|
|
|
<% else %>
|
|
|
|
<img style="width:100%;" src="<%= rv["iurlmq"] %>">
|
|
|
|
<% end %>
|
2018-03-16 17:14:40 +00:00
|
|
|
<p style="width:100%"><%= rv["title"] %></p>
|
|
|
|
<p>
|
|
|
|
<b style="width: 100%"><%= rv["author"] %></b>
|
|
|
|
</p>
|
|
|
|
</a>
|
|
|
|
<% end %>
|
2018-01-15 03:16:09 +00:00
|
|
|
<% end %>
|
2018-03-16 17:14:40 +00:00
|
|
|
</div>
|
2018-01-07 17:50:04 +00:00
|
|
|
</div>
|
2018-01-16 19:58:08 +00:00
|
|
|
</div>
|