Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion desktop/modal/camera.displayImage.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@
if (strpos(init('src'), 'camera') === false) {
throw new Exception('{{401 - Accès non autorisé}}');
}
echo '<center><img class="img-responsive" src="' . init('src') . '" /></center>';
echo '<center><img class="img-responsive" src="core/php/downloadFile.php?plugin=camera&pathfile=' . init('src') . '" /></center>';
2 changes: 1 addition & 1 deletion desktop/modal/camera.displayVideo.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@
throw new Exception('{{401 - Accès non autorisé}}');
}
echo '<video width="1180" height="664" controls autoplay loop>
<source src="' . init('src') . '">
<source src="core/php/downloadFile.php?plugin=camera&pathfile=' . init('src') . '">
Your browser does not support the video tag.
</video>';
10 changes: 5 additions & 5 deletions desktop/modal/camera.history.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@
echo '<div class="cameraDisplayCard" style="padding:5px;height:170px !important;">';
echo '<center><i class="fas ' . $fontType . ' pull-right" style="padding-top:3px;"></i> ' . str_replace('-', ':', $time) . '</center>';
if (strpos($filename, '.mp4')) {
echo '<video class="displayVideo" width="150" height="100" controls loop data-src="core/php/downloadFile.php?pathfile=' . urlencode($dir . '/' . $filename) . '" style="cursor:pointer"><source src="core/php/downloadFile.php?pathfile=' . urlencode($dir . '/' . $filename) . '">Your browser does not support the video tag.</video>';
echo '<video class="displayVideo" width="150" height="100" controls loop data-src="' . urlencode($dir . '/' . $filename) . '" style="cursor:pointer"><source src="core/php/downloadFile.php?plugin=camera&pathfile=' . urlencode($dir . '/' . $filename) . '">Your browser does not support the video tag.</video>';
} else {
echo '<center><img class="img-responsive cursor displayImage" src="core/php/downloadFile.php?pathfile=' . urlencode($dir . '/' . $filename) . '" width="150" style="max-height:80px;"/></center>';
echo '<center><img class="img-responsive cursor displayImage" data-src="' . urlencode($dir . '/' . $filename) . '" src="core/php/downloadFile.php?plugin=camera&pathfile=' . urlencode($dir . '/' . $filename) . '" width="150" style="max-height:80px;"/></center>';
}
echo '<center style="margin-top:5px;">';
echo '<a target="_blank" href="core/php/downloadFile.php?pathfile=' . urlencode($dir . '/' . $filename) . '" class="btn btn-success btn-xs" style="color : white"><i class="fas fa-download"></i></a>';
echo '<a target="_blank" href="core/php/downloadFile.php?plugin=camera&pathfile=' . urlencode($dir . '/' . $filename) . '" class="btn btn-success btn-xs" style="color : white"><i class="fas fa-download"></i></a>';
echo ' <a class="btn btn-danger bt_removeCameraFile btn-xs" style="color : white" data-filename="' . $camera->getId() . '/' . $filename . '"><i class="fas fa-trash"></i></a>';
if (strpos($filename, '.mp4')) {
echo ' <a class="btn btn-info displayVideo btn-xs" style="color : white" data-src="core/php/downloadFile.php?pathfile=' . urlencode($dir . '/' . $filename) . '"><i class="icon far fa-window-maximize"></i></a>';
echo ' <a class="btn btn-info displayVideo btn-xs" style="color : white" data-src="' . urlencode($dir . '/' . $filename) . '"><i class="icon far fa-window-maximize"></i></a>';
}
echo '</center>';
echo '</div>';
Expand All @@ -83,7 +83,7 @@
$('#md_modal2').dialog({
title: "Image"
});
$('#md_modal2').load('index.php?v=d&plugin=camera&modal=camera.displayImage&src=' + $(this).attr('src')).dialog('open');
$('#md_modal2').load('index.php?v=d&plugin=camera&modal=camera.displayImage&src=' + $(this).attr('data-src')).dialog('open');
});
$('.displayVideo').on('click', function() {
$('#md_modal2').dialog({
Expand Down
3 changes: 2 additions & 1 deletion plugin_info/info.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
"mobile": "panel",
"hasOwnDeamon": true,
"hasDependency": true,
"whiteListFolders": ["data\/records"],
"changelog": "https:\/\/doc.jeedom.com\/#language#\/plugins\/security\/camera\/changelog",
"documentation": "https:\/\/doc.jeedom.com\/#language#\/plugins\/security\/camera\/",
"language": [
Expand All @@ -47,4 +48,4 @@
],
"changelog_beta": "https:\/\/doc.jeedom.com\/#language#\/plugins\/security\/camera\/beta\/changelog",
"documentation_beta": "https:\/\/doc.jeedom.com\/#language#\/plugins\/security\/camera\/beta"
}
}
Loading