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