mirror of
https://codeberg.org/streams/streams.git
synced 2024-09-19 23:55:19 +00:00
working on video embed
This commit is contained in:
parent
db0c3d3e1e
commit
43b67364f2
2 changed files with 5 additions and 4 deletions
|
@ -175,13 +175,14 @@ class Embedfiles extends Controller
|
||||||
case "video/mp4":
|
case "video/mp4":
|
||||||
case "video/webm":
|
case "video/webm":
|
||||||
case "video/ogg":
|
case "video/ogg":
|
||||||
break;
|
$url = z_root() . '/cloud/' . $channel['channel_address'] . '/' . $_POST['display_path'];
|
||||||
|
$output .= "\n\n" . '[zvideo]' . $url . '[/zvideo]' . "\n\n";
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
return '';
|
return '';
|
||||||
}
|
}
|
||||||
|
|
||||||
$output .= "\n\n" . '[attachment]' . $_POST['hash'] . ',' . $_POST['revision'] . '[/attachment]' . "\n";
|
$output .= "\n\n" . '[attachment]' . $_POST['hash'] . ',' . $_POST['revision'] . '[/attachment]' . "\n";
|
||||||
|
|
||||||
return $output;
|
return $output;
|
||||||
}
|
}
|
||||||
return '';
|
return '';
|
||||||
|
|
|
@ -798,9 +798,9 @@ let postSaveTimer = null;
|
||||||
case "video/mp4":
|
case "video/mp4":
|
||||||
case "video/webm":
|
case "video/webm":
|
||||||
case "video/ogg":
|
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}`;
|
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>`;
|
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/mpeg":
|
||||||
case "audio/wav":
|
case "audio/wav":
|
||||||
|
|
Loading…
Reference in a new issue