0

fix: не работал плеер для фильмов

This commit is contained in:
2018-01-03 01:20:13 +03:00
parent 140baacb6e
commit dee307afe2

View File

@@ -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'));