1 diff --git a/plugin/controllers/models/stream.py b/plugin/controllers/models/stream.py
2 index fe4ddd4..71b1eaa 100644
3 --- a/plugin/controllers/models/stream.py
4 +++ b/plugin/controllers/models/stream.py
5 @@ -25,11 +25,21 @@ def getStream(session, request, m3ufile):
6 if "name" in request.args:
7 name = request.args["name"][0]
8 # #EXTINF:-1,%s\n remove not compatiple with old api
11 + if "device" in request.args :
12 + if request.args["device"][0] == "phone" :
15 + portNumber = config.OpenWebif.streamport.value
17 + portNumber = config.OpenWebif.streamport.value
20 progopt="#EXTVLCOPT:program=%d\n" % (int(sRef.split(':')[3],16))
23 - response = "#EXTM3U \n#EXTVLCOPT--http-reconnect=true \n%shttp://%s:%s/%s\n" % (progopt,request.getRequestHostname(),config.OpenWebif.streamport.value, sRef)
24 + response = "#EXTM3U \n#EXTVLCOPT--http-reconnect=true \n%shttp://%s:%s/%s\n" % (progopt,request.getRequestHostname(), portNumber, sRef)
26 request.setHeader('Content-Type', 'application/text')
29 diff --git a/plugin/controllers/views/ajax/channels.tmpl b/plugin/controllers/views/ajax/channels.tmpl
30 index 5975ce8..2915c5b 100755
31 --- a/plugin/controllers/views/ajax/channels.tmpl
32 +++ b/plugin/controllers/views/ajax/channels.tmpl
34 <a href="#" onclick="open_epg_pop('$channel.ref')">
35 <img src="../images/ico_epg.png" title="Show EPG for $channel.name" border="0">
37 - <a target="_blank" href='/web/stream.m3u?ref=$channel.ref&name=$channel.name'>
38 + <a href="#" onclick="jumper8001('$channel.ref', '$channel.name');">
39 <img align="top" src="../images/ico_stream.png" title="Stream $channel.name" border="0">
41 + <a href="#" onclick="jumper8002('$channel.ref', '$channel.name');">
42 + <img align="top" src="../images/ico_stream.png" title="Stream Port 8002 $channel.name" border="0">
46 #if $channel.has_key('now_title')
47 diff --git a/plugin/controllers/views/main.tmpl b/plugin/controllers/views/main.tmpl
48 index 1844226..6dcfb66 100755
49 --- a/plugin/controllers/views/main.tmpl
50 +++ b/plugin/controllers/views/main.tmpl
52 <script type="text/javascript" src="/js/jquery-ui-1.8.18.custom.min.js"></script>
\r
53 <script type="text/javascript" src="/js/openwebif.js"></script>
\r
57 + // VuPlus Port Jumper
\r
60 + function getWinSize(win) {
\r
61 + if(!win) win = window;
\r
64 + if(typeof win.innerWidth != "undefined") {
\r
65 + s.screenWidth = win.screen.width;
\r
66 + s.screenHeight = win.screen.height;
\r
68 + s.screenWidth = 0;
\r
69 + s.screenHeight = 0;
\r
75 + function getDeviceType() {
\r
76 + var ss = getWinSize();
\r
77 + var screenLen = 0;
\r
79 + // alert( ss.screenHeight );
\r
80 + // alert( ss.screenWidth );
\r
82 + if( ss.screenHeight > ss.screenWdith ) {
\r
83 + screenLen = ss.screenHeight;
\r
85 + screenLen = ss.screenWidth;
\r
88 + if( screenLen < 500 ) {
\r
94 + function getOSType() {
\r
95 + var agentStr = navigator.userAgent;
\r
97 + if(agentStr.indexOf("iPod") > -1 || agentStr.indexOf("iPhone") > -1)
\r
99 + else if(agentStr.indexOf("Android") > -1)
\r
100 + return "android";
\r
102 + return "unknown";
\r
105 + function jumper8002( sref, sname ) {
\r
106 + var deviceType = getDeviceType();
\r
108 + document.portForm.ref.value = sref;
\r
109 + document.portForm.name.value = sname;
\r
111 + document.portForm.device.value = "phone";
\r
112 + document.portForm.submit();
\r
115 + function jumper8001( sref, sname ) {
\r
116 + var deviceType = getDeviceType();
\r
118 + document.portForm.ref.value = sref;
\r
119 + document.portForm.name.value = sname;
\r
121 + document.portForm.device.value = "etc";
\r
122 + document.portForm.submit();
\r
128 <title>Open Webif</title>
\r
132 <div id="footer"><h3> <a href="https://github.com/E2OpenPlugins">E2OpenPlugins</a> | <a href="http://www.vuplus-community.net">Black Hole</a> | <a href="http://openpli.org">OpenPli</a> | <a href="http://forum.sifteam.eu">Sif</a> | <a href="http://www.vuplus-support.org">Vti</a></h3></div>
\r
136 + <form name="portForm" action="/web/stream.m3u" method="GET" target="_blank">
\r
137 + <input type="hidden" name="ref">
\r
138 + <input type="hidden" name="name">
\r
139 + <input type="hidden" name="device">
\r