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