<component name="ChangeListManager">
<list default="true" id="352ce63a-b52a-41a2-979b-becda7920939" name="Default" comment=".">
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/config/media.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/media.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/config/lit.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/lit.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/config/sdb.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/sdb.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/config/tv.php" beforeDir="false" afterPath="$PROJECT_DIR$/config/tv.php" afterDir="false" />
<change beforePath="$PROJECT_DIR$/js/home.js" beforeDir="false" afterPath="$PROJECT_DIR$/js/home.js" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/scripts/cron/cron.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/cron/cron.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/lib.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/lib.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/lib/mediarasp.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/lib/mediarasp.php" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/scripts/mediarasp.php" beforeDir="false" afterPath="$PROJECT_DIR$/scripts/mediarasp.php" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<workItem from="1583403852883" duration="5927000" />
<workItem from="1583566881341" duration="3483000" />
<workItem from="1583911211830" duration="1508000" />
- <workItem from="1584000517438" duration="1448000" />
- </task>
- <task id="LOCAL-00265" summary=".">
- <created>1578040991600</created>
- <option name="number" value="00265" />
- <option name="presentableId" value="LOCAL-00265" />
- <option name="project" value="LOCAL" />
- <updated>1578040991600</updated>
+ <workItem from="1584000517438" duration="2051000" />
+ <workItem from="1584004039571" duration="881000" />
+ <workItem from="1584286469208" duration="9323000" />
</task>
<task id="LOCAL-00266" summary=".">
<created>1578043868577</created>
<option name="project" value="LOCAL" />
<updated>1583689851384</updated>
</task>
- <option name="localTasksCounter" value="314" />
+ <task id="LOCAL-00314" summary=".">
+ <created>1584002002804</created>
+ <option name="number" value="00314" />
+ <option name="presentableId" value="LOCAL-00314" />
+ <option name="project" value="LOCAL" />
+ <updated>1584002002805</updated>
+ </task>
+ <option name="localTasksCounter" value="315" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="92" y="92" width="2376" height="856" key="DiffContextDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1580377344165" />
- <state x="1114" y="443" key="NewPhpFileDialog" timestamp="1578038647334">
+ <state x="1114" y="443" key="NewPhpFileDialog" timestamp="1584290302981">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="836" y="443" key="NewPhpFileDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577363498855" />
- <state x="1114" y="443" key="NewPhpFileDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1578038647334" />
+ <state x="1114" y="443" key="NewPhpFileDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1584290302981" />
<state x="872" y="242" key="Vcs.Push.Dialog.v2" timestamp="1583689982170">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="872" y="242" key="Vcs.Push.Dialog.v2/0.0.2560.1040@0.0.2560.1040" timestamp="1583689982170" />
- <state x="980" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1584000517418">
+ <state x="980" y="343" key="com.intellij.ide.util.TipDialog" timestamp="1584286471205">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="732" y="343" key="com.intellij.ide.util.TipDialog/0.0.1920.1040@0.0.1920.1040" timestamp="1577380394903" />
<state x="732" y="383" key="com.intellij.ide.util.TipDialog/0.0.1920.1160@0.0.1920.1160" timestamp="1582201881167" />
- <state x="980" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1584000517418" />
- <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1583911655372">
+ <state x="980" y="343" key="com.intellij.ide.util.TipDialog/0.0.2560.1040@0.0.2560.1040" timestamp="1584286471205" />
+ <state x="977" y="257" width="607" height="536" key="find.popup" timestamp="1584293196498">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="732" y="257" width="607" height="536" key="find.popup/0.0.1920.1040@0.0.1920.1040" timestamp="1577380471547" />
<state x="733" y="287" width="607" height="598" key="find.popup/0.0.1920.1160@0.0.1920.1160" timestamp="1582125776502" />
- <state x="977" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1583911655372" />
+ <state x="977" y="257" width="607" height="536" key="find.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1584293196498" />
<state x="936" y="240" key="run.anything.popup" timestamp="1578386519646">
<screen x="0" y="0" width="2560" height="1040" />
</state>
<state x="936" y="240" key="run.anything.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1578386519646" />
+ <state x="943" y="225" width="672" height="678" key="search.everywhere.popup" timestamp="1584289936754">
+ <screen x="0" y="0" width="2560" height="1040" />
+ </state>
+ <state x="943" y="225" width="672" height="678" key="search.everywhere.popup/0.0.2560.1040@0.0.2560.1040" timestamp="1584289936754" />
</component>
<component name="antWorkspaceConfiguration">
<option name="IS_AUTOSCROLL_TO_SOURCE" value="false" />
<?php
config('ROOM_NAME', 'Lit');
config('ROOM', 'chambre');
-config('VIDEOPLAYER', 'mediarasp');
-config('TVPLAYER', 'mediarasp');
+config('VIDEOPLAYER', 'mediarasp-small');
+config('TVPLAYER', 'mediarasp-small');
config('HIDEMASK_TIMEOUT', 250);
if (DISPLAYINTERFACE) {
config('SCREENSAVER_BRIGHTNESS', 100);
config('SLEEPTYPE', 'screensaver');
config('SCREENSAVER','weatherstation');
-config('VIDEOPLAYER', 'mediarasp');
-config('TVPLAYER', 'mediarasp');
+config('VIDEOPLAYER', 'mediarasp-small');
+config('TVPLAYER', 'mediarasp-small');
config('VOLUME', 60);
config('VOLUME_DEVICE', 'RaspberryPi');
config('HIDEMASK_TIMEOUT',250);
<?php
-//$mapdvb = connectRedis()->igbget('dvbchannels');
-//if (!$mapdvb) {
-// $mapdvb = array();
-// $m3u = getUrlContent('http://192.168.13.60:9981/playlist/channels', 30);
-// $lines = explode("\n", $m3u);
-// $name = '';
-// foreach ($lines as $line) {
-// $line = trim($line);
-// if (strpos($line, '#EXTINF:') === 0) {
-// $e = explode(',', $line);
-// $name = array_pop($e);
-// } else if (strpos($line, 'http') === 0) {
-// $mapdvb[$name] = $line;
-// }
-// }
-// connectRedis()->igbsetex('dvbchannels', 3600, $mapdvb);
-//}
+$mapdvb = connectRedis()->igbget('dvbchannels');
+if (!$mapdvb) {
+ $mapdvb = array();
+ $m3u = getUrlContent('http://192.168.13.60:9981/playlist/channels', 30);
+ $lines = explode("\n", $m3u);
+ $name = '';
+ foreach ($lines as $line) {
+ $line = trim($line);
+ if (strpos($line, '#EXTINF:') === 0) {
+ $e = explode(',', $line);
+ $name = array_pop($e);
+ } else if (strpos($line, 'http') === 0) {
+ $mapdvb[$name] = $line;
+ }
+ }
+ connectRedis()->igbsetex('dvbchannels', 3600, $mapdvb);
+}
$tv = array(
'Replay' => array('freebox' => 'replay'),
if (is_numeric($name)) {
$shortcuts['sub-tv'][] = array('type' => 'separator', 'label' => $service);
} else {
- if ($tvplayer == 'omxplayer' || $tvplayer == 'mediarasp' || $tvplayer == 'vlciframe') {
+ if ($tvplayer == 'freebox') {
+ if (isset($service['channel'])) {
+ $shortcuts['sub-tv'][] = array('type' => 'freebox', 'url' => 'scripts/freeboxchannel.php?channel=' . $service['channel'], 'label' => $name);
+ } else {
+ $shortcuts['sub-tv'][] = array('type' => 'freebox', 'url' => 'scripts/freeboxchannel.php?menu=' . $service['freebox'], 'label' => $name);
+ }
+ } else {
$e = explode(':', $service['stream'], 3);
$protocol = $e[0];
$id = $e[1];
}
}
- $type = $tvplayer == 'vlciframe' ? 'vlciframe' : 'omx';
-
if ($protocol == 'fbx') {
- $shortcuts['sub-tv'][] = array('type' => $type, 'url' => 'rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=' . $id . $definition, 'label' => $name);
+ $shortcuts['sub-tv'][] = array('type' => 'media', 'url' => 'rtsp://mafreebox.freebox.fr/fbxtv_pub/stream?namespace=1&service=' . $id . $definition, 'label' => $name);
} else {
if (isset($mapdvb[$id])) {
- $shortcuts['sub-tv'][] = array('type' => $type, 'url' => $mapdvb[$id], 'label' => $name);
+ $shortcuts['sub-tv'][] = array('type' => 'media', 'url' => $mapdvb[$id], 'label' => $name);
}
}
- } elseif ($tvplayer == 'freebox') {
- if (isset($service['channel'])) {
- $shortcuts['sub-tv'][] = array('type' => 'freebox', 'url' => 'scripts/freeboxchannel.php?channel=' . $service['channel'], 'label' => $name);
- } else {
- $shortcuts['sub-tv'][] = array('type' => 'freebox', 'url' => 'scripts/freeboxchannel.php?menu=' . $service['freebox'], 'label' => $name);
- }
}
}
}
});
$(document).on(clickevent, '.media', function () {
- if (CONFIG.VIDEOPLAYER === 'omxplayer') {
- var path = '/mnt/share' + $(this).attr('href');
- omxplayer(path, false);
- return false;
- } else if (CONFIG.VIDEOPLAYER === 'mediarasp') {
- displayLoader($(this));
- $.get('/scripts/mediarasp.php?action=play&device=' + CONFIG.VIDEOPLAYER_DEVICE + '&file=' + encodeURIComponent('/nas' + $(this).attr('href')), function () {
- window.location = '#/section/remote';
- hideLoader();
- });
- return false;
+ displayLoader($(this));
+ if (CONFIG.VIDEOPLAYER === 'mediarasp-small') {
+ stopSqueeze();
+ screenOn(true);
+ resize();
+ videoPlaying = true;
+ $("#scrollholder").scrollLeft(0);
+ screenOn(true);
+ }
+
+ var href = $(this).attr('href');
+ var attr;
+ if (href.indexOf('://') === -1) {
+ attr = '&file=' + encodeURIComponent('/nas' + href);
+ } else {
+ attr = '&url=' + encodeURIComponent(href);
+ }
+ if (CONFIG.VIDEOPLAYER === 'mediarasp-small') {
+ attr += '&small=1';
}
+
+ $.get('/scripts/mediarasp.php?action=play&device=' + CONFIG.VIDEOPLAYER_DEVICE + attr, function () {
+ window.location = '#/section/remote';
+ hideLoader();
+ });
+ return false;
});
$(document).on(clickevent, '.harmonyactivity', function () {
return false;
});
- $(document).on(clickevent, 'a.omx', function () {
- var $this = this;
- omxplayer($(this).attr('href'), true);
- return false;
- });
-
$(document).on(clickevent, '[data-screenoff]', function () {
screenOff();
return true;
}
}
-function omxplayer(url, live) {
- stopSqueeze();
- screenOn(true);
- var videoHeight = (videoWidth / 16) * 9;
- var videoTop = Math.round(($(window).outerHeight() - videoHeight) / 2);
- var videoBottom = Math.round(videoTop + videoHeight);
- // if (CONFIG.DEVICE === 'sdb') {
- // $.get('/scripts/light.php?scene=sdb/ampli/on');
- // }
- // var cmd = '/bin/echo "/usr/bin/omxplayer --win \'' + videoLeft + ' ' + videoTop + ' 800 ' + videoBottom + '\' -o local --vol -1350 --display 0 \\"' + url + '\\"" | /usr/bin/at now';
- //sshCommand(cmd, true);
-
- $.get('/scripts/mediarasp.php?url=' + encodeURIComponent(url) + '&action=play');
-
- resize();
- videoPlaying = true;
- $("#scrollholder").scrollLeft(0);
- screenOn(true);
-}
-
function runSSHQueue() {
if (sshQueue.length == 0) {
return;
$attrs['href'] = 'scripts/phonetask.php?phone=' . $s['phone'] . '&task=' . trim(base64_encode($s['task']), "=");
$attrs['class'] = 'ajax';
} elseif ($s['type'] == 'media') {
- $attrs['href'] = $s['path'];
+ $attrs['href'] = isset($s['path']) ? $s['path'] : $s['url'];
$attrs['class'] = 'media';
} elseif ($s['type'] == 'freebox') {
$attrs['href'] = $s['url'];
return sshCommand('DISPLAY=:0 xdotool getactivewindow' . $keys, $device, true, false);
}
+function moveVLC($fullscreen = true, $device = null)
+{
+ if ($fullscreen) {
+ $e = '0,0,800,480';
+ } else {
+ $e = '163,128,414,224';
+ }
+ return sshCommand('DISPLAY=:0 wmctrl -r "VLC" -e 0,' . $e . ';DISPLAY=:0 wmctrl -i -r "VLC" -b add,above;DISPLAY=:0 /usr/local/bin/removeallborders', $device, true, false);
+}
+
function remoteCmdSalonMusique($cmd)
{
switch ($cmd) {
$cacheFile = ROOT . '/cache/seen.json';
if (!count($seen)) {
- $seen = json_decode(file_get_contents($cacheFile),true);
+ $seen = json_decode(file_get_contents($cacheFile), true);
}
$seen[str_replace('/nas/', '/volume1/Share/', $movie)] = true;
mediaRaspPlayCast($_GET['cast'], $_GET['device']);
}
echo getPlaying($_GET['device']);
+}
+
+if ($_GET['small'] == 1) {
+ sleep(3);
+ moveVLC(false);
}
\ No newline at end of file