mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-07 03:22:33 +01:00
Fix preview image missing if workshop item has no gif preview
This commit is contained in:
parent
555680f026
commit
80b6abc81d
@ -8,7 +8,7 @@
|
|||||||
let html = document.getElementsByTagName('html')[0];
|
let html = document.getElementsByTagName('html')[0];
|
||||||
html.setAttribute('style', 'margin: 0px;padding: 0px;overflow: hidden;background:black;');
|
html.setAttribute('style', 'margin: 0px;padding: 0px;overflow: hidden;background:black;');
|
||||||
|
|
||||||
var videoElem = document.createElement('VIDEO');
|
var videoElem = document.createElement('video');
|
||||||
videoElem.setAttribute('width', '100%');
|
videoElem.setAttribute('width', '100%');
|
||||||
videoElem.setAttribute('height', '100%');
|
videoElem.setAttribute('height', '100%');
|
||||||
videoElem.setAttribute('id', 'video');
|
videoElem.setAttribute('id', 'video');
|
||||||
@ -18,4 +18,4 @@
|
|||||||
document.body.appendChild(videoElem);
|
document.body.appendChild(videoElem);
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -127,9 +127,11 @@ Drawer {
|
|||||||
|
|
||||||
function getUpdateVideoCommand() {
|
function getUpdateVideoCommand() {
|
||||||
let src = ""
|
let src = ""
|
||||||
src += "var videoPlayer1 = document.getElementById('video');\n"
|
src += "var video = document.getElementById('video');\n"
|
||||||
src += "videoPlayer1.src = '" + root.videoPreview + "';\n"
|
src += "video.src = '" + root.videoPreview + "';\n"
|
||||||
src += "videoPlayer1.play();\n"
|
// Incase a workshop item has no gif preview
|
||||||
|
src += "video.poster = '" + root.videoPreview + "';\n"
|
||||||
|
src += "video.play();\n"
|
||||||
|
|
||||||
return src
|
return src
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user