название видео в заголовке и над плеером
This commit is contained in:
@@ -89,7 +89,8 @@ public class Onlinelife implements KinoWarez {
|
||||
|
||||
if (jsonObj.has("file")) {
|
||||
String fileMp4 = jsonObj.get("file").getAsString().substring("http://".length());
|
||||
return "{\"file\":\"/proxy/onlinelife/" + fileMp4 + "\"}";
|
||||
String title = jsonObj.get("comment").getAsString();
|
||||
return "{\"file\":\"/proxy/onlinelife/" + fileMp4 + "\",\"title\":\"" + title + "\"}";
|
||||
} else if (jsonObj.has("pl")) {
|
||||
browser.setEncoding("utf-8");
|
||||
return replaceToProxy(browser.get(jsonObj.get("pl").getAsString()));
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
var video_data = ${json};
|
||||
var player;
|
||||
var videotime = 0;
|
||||
var origDocTitle;
|
||||
|
||||
function msToTime(ms) {
|
||||
function addZ(n) { return (n<10? '0':'') + n; }
|
||||
@@ -22,12 +23,25 @@
|
||||
};
|
||||
}
|
||||
|
||||
function setTitle(text) {
|
||||
document.title = text + " :: " + origDocTitle;
|
||||
$('#title').text(text);
|
||||
$('#title').show();
|
||||
}
|
||||
|
||||
$(function(){
|
||||
player = $('#player');
|
||||
origDocTitle = document.title;
|
||||
if (typeof(video_data.title) !== 'undefined') {
|
||||
setTitle(video_data.title);
|
||||
} else {
|
||||
$('#title').hide();
|
||||
}
|
||||
|
||||
// set video
|
||||
if (typeof(video_data.file) !== 'undefined') {
|
||||
player.attr('src', '${basedir}'+video_data.file);
|
||||
$('#plbr').hide();
|
||||
} else if (typeof(video_data.playlist) !== 'undefined') {
|
||||
$('#pl-season').removeClass('hide');
|
||||
menu = $('#pl-season-menu');
|
||||
@@ -52,6 +66,7 @@
|
||||
smenu.find('a').bind('click', function(){
|
||||
$('#dropdownSerial').html(this.text + ' <span class="caret"></span>');
|
||||
player.attr('src', '${basedir}'+this.attributes['data-file'].value);
|
||||
setTitle(this.text);
|
||||
});
|
||||
|
||||
$('#pl-serial').removeClass('hide');
|
||||
@@ -126,7 +141,11 @@
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<br><br>
|
||||
<br id="plbr">
|
||||
|
||||
<h2 id="title"></h2>
|
||||
|
||||
<br>
|
||||
|
||||
<video id="player" class="center-block" controls="controls" preload="none"></video>
|
||||
<br>
|
||||
|
||||
Reference in New Issue
Block a user