Update video placeholder image processing in js.
This commit is contained in:
parent
c12fc92f71
commit
39b37b5f56
@ -19,7 +19,6 @@
|
||||
var CssDarkURL = "{{ .Data.CSSDarkURL }}"
|
||||
var SunImageURL = "{{ .Data.SunImageLocation }}"
|
||||
var MoonImageURL = "{{ .Data.MoonImageLocation }}"
|
||||
var PlayImageURL = "{{ .Data.PlayVideoImageLocation }}"
|
||||
</script>
|
||||
<script type="application/javascript" src="{{ .Data.JScriptURL }}"></script>
|
||||
</head>
|
||||
@ -155,7 +154,7 @@
|
||||
<div class="item-table-360">
|
||||
<div id="video-{{ $c }}">
|
||||
{{ if eq .VideoLocation "" }}
|
||||
<img src="{{.GetVideoThumbnail $.Data.NoVideoImageLocation }}" alt="No Video" width="360px">
|
||||
<img src="{{ .GetVideoThumbnail $.Data.NoVideoImageLocation }}" alt="No Video" width="360px">
|
||||
{{ else }}
|
||||
{{ if .IsVideoLink }}
|
||||
<a href="{{ .VideoLocation }}">
|
||||
@ -163,7 +162,7 @@
|
||||
</a>
|
||||
{{ else }}
|
||||
<script type="application/javascript">
|
||||
CreateVideoPlaceholder({{ $c }})
|
||||
CreateVideoPlaceholder({{ $c }}, "{{ .GetVideoThumbnail $.Data.PlayVideoImageLocation }}")
|
||||
</script>
|
||||
<noscript>
|
||||
<video controls width="360px">
|
||||
|
4
index.js
4
index.js
@ -26,9 +26,9 @@ function CreateEntry(id, name, videourl, videotype, start, end, duration) {
|
||||
duration : parseInt(duration, 10)
|
||||
};
|
||||
}
|
||||
function CreateVideoPlaceholder(id) {
|
||||
function CreateVideoPlaceholder(id,phImageURL) {
|
||||
var imgPH = document.createElement("img")
|
||||
imgPH.src = PlayImageURL
|
||||
imgPH.src = phImageURL
|
||||
imgPH.id = "play-"+id
|
||||
imgPH.alt = "Play Video"
|
||||
imgPH.title = "Play"
|
||||
|
Loading…
Reference in New Issue
Block a user