blob: b8cea6f7ba5cfc0718c74285b7cca174849f3934 (
plain)
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
|
<%pre>
#include <vdr/channels.h>
#include <vdr/i18n.h>
#include <vdr/keys.h>
#include "setup.h"
#include "tools.h"
using namespace std;
using namespace vdrlive;
</%pre>
<%args>
tChannelID channel;
string async;
</%args>
<%session scope="global">
bool logged_in(false);
</%session>
<%request scope="page">
cChannel* Channel;
</%request>
<%include>page_init.eh</%include>
<%cpp>
if (!logged_in && LiveSetup().UseAuth()) return reply.redirect("login.html");
pageTitle = tr("VLC: live video stream");
bool asyncReq = !async.empty() && (lexical_cast<int>(async) != 0);
ReadLock channelsLock(Channels);
if (!channelsLock) {
throw HtmlError(tr("Couldn't aquire access to channels, please try again later."));
}
Channel = Channels.GetByChannelID(channel);
if (Channel == 0) {
throw HtmlError( tr("Couldn't find channel or no channels available. Maybe you mistyped your request?") );
}
</%cpp>
<& pageelems.doc_type &>
<html>
<head>
<title>VDR-Live - <$ pageTitle $></title>
<& pageelems.stylesheets &>
<%cpp>
if (!asyncReq) {
</%cpp>
<& pageelems.ajax_js &>
<%cpp>
}
</%cpp>
</head>
<body>
<%cpp>
if (!asyncReq) {
</%cpp>
<& pageelems.logo &>
<& menu active="vlc" &>
<%cpp>
}
</%cpp>
<div class="inhalt">
<%cpp>
if ( Channel != 0 ) {
int streamdevPort = LiveSetup().GetStreamdevPort();
// string videourl = string("http://") + "192.168.96.30" + ":" + lexical_cast<string,int>(streamdevPort) + "/TS/" + *Channel->GetChannelID().ToString();
string videourl = string("http://") + request.getServerIp() + ":" + lexical_cast<string,int>(streamdevPort) + "/TS/" + *Channel->GetChannelID().ToString();
</%cpp>
<embed type="application/x-vlc-plugin" name="video1" autoplay="yes" loop="yes" width="720" height="576" target="<$ videourl $>" />
<& vlc.channel_selection &>
<!-- <p><$ videourl $></p> -->
<%cpp>
}
</%cpp>
</div>
</body>
</html>
<%include>page_exit.eh</%include>
<%def channel_selection>
<div>
<input type="button" value="Play" onclick="document.video1.play();" />
<input type="button" value="Pause" onclick="document.video1.pause();" />
<input type="button" value="Stop" onclick="document.video1.stop();" />
<input type="button" value="Mute" onclick="document.video1.mute();" />
<input type="button" value="Fullscreen" onclick="document.video1.fullscreen();" />
</div>
</%def>
|