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 CssDarkURL = "{{ .Data.CSSDarkURL }}"
|
||||||
var SunImageURL = "{{ .Data.SunImageLocation }}"
|
var SunImageURL = "{{ .Data.SunImageLocation }}"
|
||||||
var MoonImageURL = "{{ .Data.MoonImageLocation }}"
|
var MoonImageURL = "{{ .Data.MoonImageLocation }}"
|
||||||
var PlayImageURL = "{{ .Data.PlayVideoImageLocation }}"
|
|
||||||
</script>
|
</script>
|
||||||
<script type="application/javascript" src="{{ .Data.JScriptURL }}"></script>
|
<script type="application/javascript" src="{{ .Data.JScriptURL }}"></script>
|
||||||
</head>
|
</head>
|
||||||
@ -155,7 +154,7 @@
|
|||||||
<div class="item-table-360">
|
<div class="item-table-360">
|
||||||
<div id="video-{{ $c }}">
|
<div id="video-{{ $c }}">
|
||||||
{{ if eq .VideoLocation "" }}
|
{{ if eq .VideoLocation "" }}
|
||||||
<img src="{{.GetVideoThumbnail $.Data.NoVideoImageLocation }}" alt="No Video" width="360px">
|
<img src="{{ .GetVideoThumbnail $.Data.NoVideoImageLocation }}" alt="No Video" width="360px">
|
||||||
{{ else }}
|
{{ else }}
|
||||||
{{ if .IsVideoLink }}
|
{{ if .IsVideoLink }}
|
||||||
<a href="{{ .VideoLocation }}">
|
<a href="{{ .VideoLocation }}">
|
||||||
@ -163,7 +162,7 @@
|
|||||||
</a>
|
</a>
|
||||||
{{ else }}
|
{{ else }}
|
||||||
<script type="application/javascript">
|
<script type="application/javascript">
|
||||||
CreateVideoPlaceholder({{ $c }})
|
CreateVideoPlaceholder({{ $c }}, "{{ .GetVideoThumbnail $.Data.PlayVideoImageLocation }}")
|
||||||
</script>
|
</script>
|
||||||
<noscript>
|
<noscript>
|
||||||
<video controls width="360px">
|
<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)
|
duration : parseInt(duration, 10)
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
function CreateVideoPlaceholder(id) {
|
function CreateVideoPlaceholder(id,phImageURL) {
|
||||||
var imgPH = document.createElement("img")
|
var imgPH = document.createElement("img")
|
||||||
imgPH.src = PlayImageURL
|
imgPH.src = phImageURL
|
||||||
imgPH.id = "play-"+id
|
imgPH.id = "play-"+id
|
||||||
imgPH.alt = "Play Video"
|
imgPH.alt = "Play Video"
|
||||||
imgPH.title = "Play"
|
imgPH.title = "Play"
|
||||||
|
Loading…
Reference in New Issue
Block a user