-
-
Notifications
You must be signed in to change notification settings - Fork 201
/
Copy pathlivestreamer.html.hbs
86 lines (86 loc) · 3.78 KB
/
livestreamer.html.hbs
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
{{#modal-dialog class="modal-livestreamer"}}
{{#unless error}}
{{#unless active}}
{{#modal-header}}Preparing{{/modal-header}}
{{#modal-body}}Please wait...{{/modal-body}}
{{#modal-footer}}
{{#form-button action="abort" class="btn-danger" icon="fa-times"}}Close{{/form-button}}
{{/modal-footer}}
{{else}}
{{#unless active.success}}
{{#modal-header}}
Launching: {{active.channel.display_name}}
{{/modal-header}}
{{#modal-body class="launching"}}Waiting for Livestreamer to launch the stream...{{/modal-body}}
{{modal-log class="launching" log=active.log}}
{{else}}
{{#modal-header}}
Watching: {{active.channel.display_name}}
{{/modal-header}}
{{#modal-body}}
{{#if active.stream.game}}<div class="game"><i class="fa fa-gamepad"></i> {{active.stream.game}}</div>{{/if}}
{{stats-row stream=active.stream withFlag=false}}
{{#unless active.showLog}}
{{embedded-links tagName="section" class="content" text=active.channel.status}}
{{else}}
{{modal-log log=active.log}}
{{/unless}}
{{/modal-body}}
{{/unless}}
{{#modal-footer}}
<div>
{{form-button action="close" class="btn-primary" icon="fa-arrow-left" title="Continue"}}
{{form-button action="shutdown" class="btn-danger" icon="fa-times" title="Close stream"}}
{{form-button
action="toggleLog"
classNameBindings=":btn-log active.warning:btn-danger:btn-info active.success::invisible"
icon=(if active.warning "fa-exclamation" "fa-ellipsis-v")
title=(if active.showLog "Show stream title" (if active.warning "Show livestreamer warning" "Show livestreamer log"))
}}
</div>
<div>
{{open-chat channel=active.channel}}
{{share-channel channel=active.channel}}
{{subscribe-channel channel=active.channel}}
{{follow-channel channel=active.channel}}
</div>
{{drop-down value=active.quality content=settings.content.constructor.qualities class="modalqualityselect"}}
{{/modal-footer}}
{{/unless}}
{{else}}
{{#if (is-equal error.name "NotFoundError")}}
{{#modal-header}}Error: Livestreamer could not be found{{/modal-header}}
{{#modal-body class="error"}}Please check your settings and/or (re)install Livestreamer.{{/modal-body}}
{{else if (is-equal error.name "VersionError")}}
{{#modal-header}}Error: Invalid Livestreamer version{{/modal-header}}
{{#modal-body class="error"}}
Your version v{{error.version}} doesn't match the min. requirements (v{{metadata.config.livestreamer-version-min}}).
{{/modal-body}}
{{else if (is-equal error.name "UnableToOpenError")}}
{{#modal-header}}Error: Unable to open stream{{/modal-header}}
{{#modal-body class="error"}}Livestreamer was unable to open the stream.{{/modal-body}}
{{else if (is-equal error.name "NoStreamsFoundError")}}
{{#modal-header}}Error: No streams found{{/modal-header}}
{{#modal-body class="error"}}Livestreamer was unable to find the stream.{{/modal-body}}
{{else if (is-equal error.name "NoPlayerError")}}
{{#modal-header}}Error: Invalid player{{/modal-header}}
{{#modal-body class="error"}}Please check your player configuration.{{/modal-body}}
{{else}}
{{#modal-header}}Error: Couldn't launch the stream{{/modal-header}}
{{#modal-body class="error"}}
{{#if error.message}}
{{error.message}}
{{else}}
Internal error
{{/if}}
{{/modal-body}}
{{/if}}
{{modal-log class="error" log=active.log}}
{{#modal-footer}}
{{#form-button action="close" class="btn-danger" icon="fa-times"}}Close{{/form-button}}
{{#if (bool-or (is-equal error.name "NotFoundError") (is-equal error.name "VersionError"))}}
{{#form-button action="download" class="btn-success" icon="fa-download" iconanim=true}}Download{{/form-button}}
{{/if}}
{{/modal-footer}}
{{/unless}}
{{/modal-dialog}}