fix: не работал плеер для фильмов
This commit is contained in:
@@ -213,7 +213,11 @@ const KSPlayer = function(containerId, data) {
|
|||||||
titleElement.innerText = text;
|
titleElement.innerText = text;
|
||||||
|
|
||||||
if (!isShowTitle) {
|
if (!isShowTitle) {
|
||||||
|
if (videoElement.parentElement !== null) {
|
||||||
containerElement.insertBefore(titleElement, videoElement);
|
containerElement.insertBefore(titleElement, videoElement);
|
||||||
|
} else {
|
||||||
|
containerElement.appendChild(titleElement);
|
||||||
|
}
|
||||||
isShowTitle = true;
|
isShowTitle = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -238,10 +242,12 @@ const KSPlayer = function(containerId, data) {
|
|||||||
let videoElement = createVideoElement();
|
let videoElement = createVideoElement();
|
||||||
|
|
||||||
if (data.hasOwnProperty('title')) {
|
if (data.hasOwnProperty('title')) {
|
||||||
this.setTitle(data.title);
|
setTitle(data.title);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data.type === 'simple_serial') {
|
if (data.type === 'one_film') {
|
||||||
|
setSource(data.file);
|
||||||
|
} else if (data.type === 'simple_serial') {
|
||||||
let serialMenu = createSerialMenuElement(data.serials);
|
let serialMenu = createSerialMenuElement(data.serials);
|
||||||
containerElement.appendChild(serialMenu);
|
containerElement.appendChild(serialMenu);
|
||||||
containerElement.appendChild(document.createElement('br'));
|
containerElement.appendChild(document.createElement('br'));
|
||||||
|
|||||||
Reference in New Issue
Block a user