1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
{#
/*
* Spring Signage Ltd - http://www.springsignage.com
* Copyright (C) 2015 Spring Signage Ltd
* (${FILE_NAME})
*/
#}
{% extends "form-base.twig" %}
{% import "forms.twig" as forms %}
{% block formTitle %}
{% trans "Add Local Video" %}
{% endblock %}
{% block formButtons %}
{% trans "Help" %}, XiboHelpRender("{{ help }}")
{% trans "Cancel" %}, XiboDialogClose()
{% trans "Save" %}, $("#localVideoAddForm").submit()
{% endblock %}
{% block formFieldActions %}
[{
"field": "useDuration",
"trigger": "init",
"value": false,
"operation": "is:checked",
"actions": {
".duration-fields": { "display": "none" }
}
},{
"field": "useDuration",
"trigger": "change",
"value": false,
"operation": "is:checked",
"actions": {
".duration-fields": { "display": "none" }
}
},{
"field": "useDuration",
"trigger": "init",
"value": true,
"operation": "is:checked",
"actions": {
".duration-fields": { "display": "block" }
}
},{
"field": "useDuration",
"trigger": "change",
"value": true,
"operation": "is:checked",
"actions": {
".duration-fields": { "display": "block" }
}
}]
{% endblock %}
{% block formHtml %}
<div class="row">
<div class="col-md-12">
<form id="localVideoAddForm" class="XiboForm form-horizontal" method="post" action="{{ urlFor("module.widget.add", {type: module.widget.type, id: playlist.playlistId}) }}">
{% set title %}{% trans "Video Path" %}{% endset %}
{% set helpText %}{% trans "A local file path or URL to the video. This can be a RTSP stream." %}{% endset %}
{{ forms.input("uri", title, "", helpText, "", "required") }}
{% set title %}{% trans "Set a duration?" %}{% endset %}
{% set helpText %}{% trans "Select to provide a specific duration for this Widget" %}{% endset %}
{{ forms.checkbox("useDuration", title, 0, helpText) }}
{% set title %}{% trans "Duration" %}{% endset %}
{% set helpText %}{% trans "The duration in seconds this should be displayed" %}{% endset %}
{{ forms.number("duration", title, module.getModule().defaultDuration, helpText, "duration-fields", "required") }}
{% set title %}{% trans "Scale type" %}{% endset %}
{% set helpText %}{% trans "How should this video be scaled?" %}{% endset %}
{% set aspect %}{% trans "Aspect" %}{% endset %}
{% set stretch %}{% trans "Stretch" %}{% endset %}
{% set options = [
{ scaleTypeId: "aspect", scaleType: aspect },
{ scaleTypeId: "stretch", scaleType: stretch }
] %}
{{ forms.dropdown("scaleTypeId", "single", title, module.getOption("scaleType"), options, "scaleTypeId", "scaleType", helpText) }}
{% set title %}{% trans "Mute?" %}{% endset %}
{% set helpText %}{% trans "Should the video be muted?" %}{% endset %}
{{ forms.checkbox("mute", title, 0, helpText, "mute-fields") }}
<div class="alert alert-info">
{% set message %}{% trans "Please note that video scaling and video streaming via RTSP is only supported by Xibo for Android at the current time. The HLS streaming Widget can be used to show compatible video streams on Windows." %}{% endset %}
{{ forms.message(message) }}
</div>
</form>
</div>
</div>
{% endblock %}
|