working on video embed

This commit is contained in:
Ray 2023-03-13 09:58:17 -04:00
parent db0c3d3e1e
commit 43b67364f2
2 changed files with 5 additions and 4 deletions

View file

@ -175,13 +175,14 @@ class Embedfiles extends Controller
case "video/mp4":
case "video/webm":
case "video/ogg":
break;
$url = z_root() . '/cloud/' . $channel['channel_address'] . '/' . $_POST['display_path'];
$output .= "\n\n" . '[zvideo]' . $url . '[/zvideo]' . "\n\n";
break;
default:
return '';
}
$output .= "\n\n" . '[attachment]' . $_POST['hash'] . ',' . $_POST['revision'] . '[/attachment]' . "\n";
return $output;
}
return '';

View file

@ -798,9 +798,9 @@ let postSaveTimer = null;
case "video/mp4":
case "video/webm":
case "video/ogg":
let sendmp4 = `[video]/cloud/${address}/${result.display_path}[/video]`;
// let sendmp4 = `[video]/cloud/${address}/${result.display_path}[/video]`;
let sendmp4_id = `embedFiles_${result.id}`;
$( document ).ready(function() { document.getElementById(sendmp4_id).addEventListener("click", function() { setEmbedFiles(sendmp4); }); });
$( document ).ready(function() { document.getElementById(sendmp4_id).addEventListener("click", function() { setEmbedFiles2(result); }); });
return `<li class="border rounded my-1 p-2" ><h4 id = "${sendmp4_id}" data-bs-dismiss="modal" >${result.filename}<i class="float-end">{{$clicktitle}}</i></h4><video controls="controls" preload="metadata" src="/cloud/${address}/${result.display_path}" style="width:100%;" /></li>`;
case "audio/mpeg":
case "audio/wav":