Skip to content

A self-hosted media server and file management system

Update video table and add some playlist controls

aminnausin418e623a1bfb
diff --git a/package-lock.json b/package-lock.json
index 9d31d22a..88986e57 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -5,6 +5,7 @@
"packages": {
"": {
"dependencies": {
+ "@headlessui/vue": "^1.7.22",
"@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/forms": "^0.5.7",
"pinia": "^2.1.7",
@@ -550,6 +551,20 @@
"node": "^18.18.0 || ^20.9.0 || >=21.1.0"
}
},
+ "node_modules/@headlessui/vue": {
+ "version": "1.7.22",
+ "resolved": "https://registry.npmjs.org/@headlessui/vue/-/vue-1.7.22.tgz",
+ "integrity": "sha512-Hoffjoolq1rY+LOfJ+B/OvkhuBXXBFgd8oBlN+l1TApma2dB0En0ucFZrwQtb33SmcCqd32EQd0y07oziXWNYg==",
+ "dependencies": {
+ "@tanstack/vue-virtual": "^3.0.0-beta.60"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "peerDependencies": {
+ "vue": "^3.2.0"
+ }
+ },
"node_modules/@humanwhocodes/module-importer": {
"version": "1.0.1",
"resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
@@ -913,6 +928,30 @@
"tailwindcss": ">=3.0.0 || >= 3.0.0-alpha.1"
}
},
+ "node_modules/@tanstack/virtual-core": {
+ "version": "3.8.3",
+ "resolved": "https://registry.npmjs.org/@tanstack/virtual-core/-/virtual-core-3.8.3.tgz",
+ "integrity": "sha512-vd2A2TnM5lbnWZnHi9B+L2gPtkSeOtJOAw358JqokIH1+v2J7vUAzFVPwB/wrye12RFOurffXu33plm4uQ+JBQ==",
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ }
+ },
+ "node_modules/@tanstack/vue-virtual": {
+ "version": "3.8.3",
+ "resolved": "https://registry.npmjs.org/@tanstack/vue-virtual/-/vue-virtual-3.8.3.tgz",
+ "integrity": "sha512-xrFLkOiqLoGwohgr1+Q880hkNdQWqwi19EXzx38iAjVEm1Db3KIAV0aVP57/dnNXU3NO1Vx8wnIHII5J4n1LyA==",
+ "dependencies": {
+ "@tanstack/virtual-core": "3.8.3"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/tannerlinsley"
+ },
+ "peerDependencies": {
+ "vue": "^2.7.0 || ^3.0.0"
+ }
+ },
"node_modules/@types/eslint": {
"version": "8.56.10",
"resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-8.56.10.tgz",
diff --git a/package.json b/package.json
index dbfa853b..2c8cc616 100644
--- a/package.json
+++ b/package.json
@@ -19,6 +19,7 @@
"vite": "^5.0.0"
},
"dependencies": {
+ "@headlessui/vue": "^1.7.22",
"@tailwindcss/aspect-ratio": "^0.4.2",
"@tailwindcss/forms": "^0.5.7",
"pinia": "^2.1.7",
diff --git a/resources/js/components/VideoCard.vue b/resources/js/components/VideoCard.vue
new file mode 100644
index 00000000..4ac36b64
--- /dev/null
+++ b/resources/js/components/VideoCard.vue
@@ -0,0 +1,25 @@
+<script setup>
+ import { toFormattedDate } from '../service/util';
+ const { video, index, currentID = -1 } = defineProps(['video', 'index', 'currentID']);
+ const rawDate = new Date(video.attributes.date + ' GMT');
+ const emit = defineEmits(['playByID']);
+
+ const handlePlay = () => {
+ // console.log(`handlePlay ${currentID} ${video.id}`);
+ // if(currentID.id !== video.id) emit('playByID', video.id);
+ emit('playByID', video.id);
+ }
+</script>
+
+<template>
+ <tr :class="{ 'ring-violet-600/50 ring': (currentID === video.id)}" class="vid-row w-full rounded-md dark:bg-neutral-800 dark:hover:bg-indigo-900 bg-violet-100 hover:bg-violet-300 p-3 flex ring-inset" :data-id="video.id" :data-path="`../${video.attributes.path}`" @click="handlePlay">
+ <td class="flex gap-12 w-full">
+ <span class="vid-row-title truncate">{{ video.attributes.name }}</span>
+ <span class="vid-row-duration truncate">20m 30s</span>
+ </td>
+ <td class="flex gap-12 w-full justify-end">
+ <span class="vid-row-title">{{ currentID === video.id }} {{ index }}</span>
+ <span class="vid-row-date truncate overflow-hidden">{{ toFormattedDate(rawDate) }}</span>
+ </td>
+ </tr>
+</template>
\ No newline at end of file
diff --git a/resources/js/components/VideoPlayer.vue b/resources/js/components/VideoPlayer.vue
index 71a96281..42952643 100644
--- a/resources/js/components/VideoPlayer.vue
+++ b/resources/js/components/VideoPlayer.vue
@@ -1,9 +1,32 @@
<script setup>
- const { URL } = defineProps(['URL'])
+ import { storeToRefs } from 'pinia';
+ import { useContentStore } from '../stores/ContentStore';
+ import { ref, watch } from 'vue';
+
+ const pastFirst = ref(false);
+ const ContentStore = useContentStore();
+ const { stateVideo } = storeToRefs(ContentStore);
+ const { addRecord } = ContentStore;
+
+ const initVideoPlayer = () => {
+ let vidSource = document.getElementById('vid-source');
+ let root = document.getElementById('root');
+
+ root.scrollIntoView();
+
+ if(pastFirst.value === true) vidSource.play();
+ }
+
+ const playVideo = () => {
+ pastFirst.value = true;
+ addRecord(stateVideo.value.id)
+ }
+
+ watch(stateVideo, initVideoPlayer)
</script>
<template>
- <video id="vid-source" width="100%" :src="URL" type="video/mp4" controls class="focus:outline-none aspect-video">
+ <video id="vid-source" width="100%" :src="`../${stateVideo?.attributes?.path}`" type="video/mp4" controls class="focus:outline-none aspect-video" @play="playVideo" :autoplay="pastFirst === true">
<track kind="captions">
</video>
</template>
\ No newline at end of file
diff --git a/resources/js/components/VideoTable.vue b/resources/js/components/VideoTable.vue
new file mode 100644
index 00000000..5c0a01ce
--- /dev/null
+++ b/resources/js/components/VideoTable.vue
@@ -0,0 +1,47 @@
+<script setup>
+ import VideoCard from './VideoCard.vue';
+ import LabelledTextInput from './inputs/LabelledTextInput.vue';
+
+ import { useContentStore } from '../stores/ContentStore';
+ import { storeToRefs } from 'pinia';
+
+
+ const ContentStore = useContentStore();
+ const { searchQuery, stateFilteredPlaylist, stateFolder, stateVideo } = storeToRefs(ContentStore);
+ const { playlistFind } = ContentStore;
+
+ const tableColumnGroups = [
+ [{name: 'Title', colspan: '2', minWidth: 'min-w-16'},
+ {name: 'Length', colspan: '1', minWidth: 'min-w-4'}],
+ [{name: 'Views', colspan: '1', minWidth: 'min-w-4'},
+ {name: 'Title', colspan: '2', minWidth: 'min-w-32'}],
+ ];
+</script>
+
+<template>
+ <table class="w-full overflow-x-hidden flex flex-col gap-2">
+ <section class="folder-header2 flex justify-center sm:justify-start p-2">
+ <!-- <h2 class="text-2xl py-4">Episodes</h2> -->
+ <LabelledTextInput v-model="searchQuery" :text="'Search'"/>
+ </section>
+ <hr>
+ <thead class="w-full flex">
+ <tr class="w-full flex justify-between gap-12">
+ <th class="px-3 flex gap-12 w-full items-center">
+ <span v-for="(column, idx) in tableColumnGroups[0]" :key="idx">{{ column.name }}</span>
+ </th>
+ <th class="px-3 flex gap-12 w-full justify-end items-center">
+ <span v-for="(column, idx) in tableColumnGroups[1]" :key="idx" :class="column.minWidth">{{ column.name }}</span>
+ </th>
+ <!-- <th v-for="(column, index) in tableColumns" :key="index" :class="column.minWidth" class="px-3 flex items-center justify-start">{{ column.name }}</th> -->
+ </tr>
+ </thead>
+ <tbody class="flex w-full flex-wrap gap-2 [&>*:nth-child(odd)]:bg-violet-200 hover:[&>*:nth-child(odd)]:bg-violet-300 dark:[&>*:nth-child(odd)]:bg-zinc-700 dark:hover:[&>*:nth-child(odd)]:bg-indigo-900">
+ <VideoCard v-for="(video, index) in stateFilteredPlaylist" :key="index" :video="video" :index="index" :currentID="stateVideo.id" @playByID="playlistFind"/>
+ </tbody>
+ <hr>
+ <section>
+ {{ `Showing ${stateFilteredPlaylist.length} of ${stateFolder.videos.length} Result${stateFolder.videos.length > 1 ? 's' : ''} ${searchQuery ? '(Filtered)' : ''}` }}
+ </section>
+ </table>
+</template>
\ No newline at end of file
diff --git a/resources/js/stores/ContentStore.js b/resources/js/stores/ContentStore.js
index 690beaa9..efc4bf17 100644
--- a/resources/js/stores/ContentStore.js
+++ b/resources/js/stores/ContentStore.js
@@ -1,4 +1,4 @@
-import { ref } from "vue";
+import { ref, watch } from "vue";
import { defineStore, storeToRefs } from "pinia";
import { useAppStore } from "./AppStore";
import { useAuthStore } from "./AuthStore";
@@ -11,13 +11,20 @@ export const useContentStore = defineStore('Content', () => {
const folders = ref([]);
const videos = ref([]);
const records = ref([]);
-
+
const stateDirectory = ref({id:7, name:'anime', folders: []})
const stateFolder = ref({id:7, name:'ODDTAXI', videos: []})
+ const statePlaylist = ref([]);
+ const stateFilteredPlaylist = ref([]);
+ const stateVideo = ref({});
+
const { pageTitle } = storeToRefs(AppStore);
const { userData } = storeToRefs(AuthStore);
+ const searchQuery = ref('');
+ const filterQuery = ref({search: '', season: -1, tag: ''});
+
async function getRecords(limit){
if(!userData.value) return;
@@ -79,15 +86,17 @@ export const useContentStore = defineStore('Content', () => {
stateDirectory.value = data.data.dir;
stateFolder.value = data.data.folder
folders.value = data.data.dir.folders;
+
+ pageTitle.value = stateFolder.value.name;
+
+ InitPlaylist();
return true;
- //parseFolders();
- //loadVideosAndParse();
}
async function getFolder(nextFolderName) {
const nextFolder = stateDirectory.value.folders?.find((folder) => {return folder.attributes.name === nextFolderName});
- if(!nextFolder.id){
+ if(!nextFolder?.id){
// eslint-disable-next-line no-undef
toastr["error"](`The folder '${nextFolderName}' does not exist.`, "Invalid folder");
return;
@@ -102,16 +111,62 @@ export const useContentStore = defineStore('Content', () => {
console.log(error ?? data?.message);
return Promise.reject(false);
}
+ stateFolder.value = {id: nextFolder.id, name: nextFolder.attributes.name, videos: data.data};
+ pageTitle.value = stateFolder.value.name;
- stateFolder.value = { id: nextFolder.id, name: nextFolder.attributes.name, 'videos': data}
-
+ InitPlaylist();
return Promise.resolve(true);
}
+ //Playlist and Search
+
+ // PlaylistSeek (index) next previous specific
+ function playlistSeek(direction){
+ let nextIndex = stateVideo.value.index + direction;
+ if( nextIndex < 0 || nextIndex > statePlaylist.value.length ) return;
+
+ stateVideo.value = statePlaylist.value[nextIndex];
+ }
+
+ function playlistFind(id){
+ stateVideo.value = statePlaylist.value.find((video) => { return video.id === id});
+ }
+
+ // InitPlaylist (set up playlist with indexes and current video)
+ async function InitPlaylist(){
+ if(!stateFolder.value.id){
+ // eslint-disable-next-line no-undef
+ toastr["error"](`The folder '${stateFolder.value.name}' does not exist.`, "Invalid folder");
+ console.log(stateFolder.value);
+ return;
+ }
+
+ statePlaylist.value = stateFolder.value.videos.map((video, index) => { return {index, ...video}; } );
+ stateVideo.value = statePlaylist.value.length > 0 ? statePlaylist.value[0] : {};
+
+ playlistFilter();
+ }
+
+ const playlistFilter = (query) => {
+ let tempList = query ? statePlaylist.value.filter((video) => {{
+ try {
+ let strRepresentation = [video.attributes.name, video.attributes.date].join(' ');
+ return strRepresentation.includes(query)
+ } catch (error) {
+ console.log(error);
+ return false
+ }
+ }}) : statePlaylist.value;
+ stateFilteredPlaylist.value = tempList;
+ }
+
+ watch(searchQuery, playlistFilter, {immediate: false});
+
return {
folders, videos, records,
- stateDirectory, stateFolder,
+ stateDirectory, stateFolder, stateVideo,
+ searchQuery, filterQuery, stateFilteredPlaylist,
getRecords, addRecord, deleteRecord,
- getCategory, getFolder
+ getCategory, getFolder, playlistSeek, playlistFind
};
});
\ No newline at end of file
diff --git a/resources/js/views/VideoView.vue b/resources/js/views/VideoView.vue
index eb18c2d0..921f67e2 100644
--- a/resources/js/views/VideoView.vue
+++ b/resources/js/views/VideoView.vue
@@ -5,328 +5,95 @@
import { ref, onMounted, watch } from 'vue';
import { useContentStore } from '../stores/ContentStore';
- import { useAuthStore } from '../stores/AuthStore';
import { useAppStore } from '../stores/AppStore';
import { storeToRefs } from 'pinia';
import { useRoute } from 'vue-router'
- import { API } from '../service/api';
+ import VideoTable from '../components/VideoTable.vue';
const route = useRoute();
const appStore = useAppStore();
- const authStore = useAuthStore();
const ContentStore = useContentStore();
- const { userData } = storeToRefs(authStore);
- const { pageTitle, selectedSideBar } = storeToRefs(appStore);
- const { folders, records, stateFolder, stateDirectory} = storeToRefs(ContentStore);
+ const { selectedSideBar } = storeToRefs(appStore);
+ const { stateFolder, stateVideo} = storeToRefs(ContentStore);
+ const { getFolder, getCategory, getRecords, playlistSeek } = ContentStore;
-
- async function parseFolders(data){
- try {
- if(!stateDirectory.value.folders){
- // eslint-disable-next-line no-undef
- toastr["error"](`No valid folders in ${stateDirectory.value.name}`)
- return;
- }
-
- let newFoldersList = [];
-
- stateDirectory.value.folders.forEach(folder => {
- const folder_id = folder.id;
- const folder_name = folder.attributes.name;
- const file_count = folder.attributes.file_count;
-
- newFoldersList.push({folder_id, folder_name, file_count})
- });
-
- folders.value = newFoldersList;
- } catch (error) {
- console.log(data);
- console.log(error);
- }
- }
-
- async function loadVideosAndParse(){
- var folderTemplate = function(folderName, folderCount, fileElements) {
- return `
- <div class="w-full overflow-x-hidden">
- <div class="folder-header flex justify-center sm:justify-start">
- <h2 class="text-2xl py-4 hidden"> ${folderName} </h2>
- <h2 class="text-2xl py-4">Episodes</h2>
- </div>
- <div class="" id="dataTable-${folderCount}-collapse" data-state="1">
- <table class="vid-table hover stripe" id="dataTable-${folderCount}" data-folder="${folderName}">
- <thead>
- <tr>
- <th>Title</th>
- <!-- <th>Length</th> -->
- <th>Date</th>
- </tr>
- </thead>
- <tbody class="">
- ${fileElements}
- </tbody>
- </table>
- </div>
- </div>
- <hr>
- `
- }
- var videoTemplate = function(fileArray){
- const filePath = fileArray.attributes.path;
- const title = fileArray.attributes.name;
- const rawDate = new Date(fileArray.attributes.date + ' GMT');
- const id = fileArray.id;
- const filePrefix = '../';
- return `
- <tr class="vid-row" data-id="${id}" data-path="${filePrefix}${filePath}">
- <td class="vid-row-title">${title}</td>
- <td class="vid-row-date truncate overflow-hidden">${(rawDate.toLocaleString([], {year: 'numeric', month: '2-digit', day:'2-digit', hour:'2-digit', minute:'2-digit', hour12: true})).toLocaleUpperCase().replaceAll('.','')}</td>
- </tr>
- `
- }
-
- pageTitle.value = stateFolder.value.name;
-
- if(!stateFolder.value.id){
- toastr["error"](`The folder '${stateFolder.value.name}' does not exist.`, "Invalid folder");
- console.log(stateFolder.value);
- return;
- }
-
- const files = stateFolder.value.videos;
- // console.log(files);
- let fileElements = files.map(videoTemplate);
- let folderElement = folderTemplate(stateFolder.value.name, 0, fileElements.toString().replaceAll(',',''));
- $('#dataContainer').empty();
- $('#dataContainer').append(folderElement);
-
- initVideos();
- }
-
- function initVideos(){
- let pastFirst = false;
- $('.vid-row').off('click').on('click', function(){
- let file = $(this).data('path');
- let id = $(this).data('id');
- let vidSource = document.getElementById('vid-source');
- let root = document.getElementById('root');
- let folder = $(this).closest('table');
- // let lastID = $(vidSource).data('vid-id');
-
- // if(!isNaN(parseInt(lastID))){
- // addToHistory(lastID);
- // }
-
- try {
- vidSource.pause();
- } catch (error) {
- console.log('No video running. Cannot pause.')
- }
-
- $(vidSource).attr('src', file);
- // $(vidSource).data('vid-id', id);
- vidSource.load();
- if(pastFirst){
- vidSource.play();
- }
- else pastFirst = true;
-
- try {
- root.scrollIntoView();
- } catch (error) {
- console.log(error);
- console.log(root);
- console.log(document.getElementById('root'));
- }
-
- $('#mp4-title').text($(this).find(".vid-row-title").text());
- $('#mp4-title-folder').text($(folder).data('folder'));
- $('#folder-thumbnail').attr('src', `${stateThumbnailDir.value}${stateFolder.value.id}.jpg`);
- addToHistory(id);
- })
-
- $('.vid-row').first().click();
-
- $('.vid-table').each(function(){
- let id = $(this).attr('id');
- let table = new DataTable('#' + id, {
- responsive: true,
- columnDefs: [{ "width": "80%", "targets": 0 }]
- });
-
- document.getElementById(id).style.removeProperty('width');
- });
-
-
- $('.collapse').removeClass('show');
- //$('#dataTable-0-collapse-toggle').trigger('click');
-
- $('.folder-toggle').off('click.main').on('click.main', function(){
- var targetID = $(this).data('bs-target');
-
- if($(targetID).data('state') == 1){
- $(targetID).data('state', 0);
- $(this).empty().append('<i class="bi bi-list"></i> Show Folder');
- }
- else {
- $(targetID).data('state', 1);
- $(this).empty().append('<i class="bi bi-list"></i> Hide Folder');
- }
- });
- }
-
- function cycleSideBar(state){
+ async function cycleSideBar(state){
if(state === "history"){
- loadHistory();
+ getRecords(10);
}
}
- async function loadHistory(limit = 10){
- if(!userData.value) return;
-
- const { data, error } = await API.get(`/records?limit=${limit}`);
-
- if(error || !data?.success){
- console.log(error ?? data?.message);
- return;
- }
-
- parseHistory(data.data);
- }
-
- async function addToHistory(id){
- if(!userData.value) return;
- const { data, error } = await API.post('/records', { 'video_id': id });
-
- if(error || !data?.success){
- console.log(error ?? data?.message);
- return;
- }
-
- parseHistory([data.data], 10, false);
- }
-
- function parseHistory(data, count = 10) {
- let newRecordList = [];
-
- for (let recordCount = 0; recordCount < Math.min(data.length, count); recordCount++) {
- const recordID = data[recordCount].id;
- const videoName = data[recordCount].relationships.video_name;
- const folderName = data[recordCount].relationships.folder_name;
- const rawDate = (new Date(data[recordCount].attributes.created_at.replace(' ', 'T')));
- const rawAge = Date.now() - rawDate.getTime();
-
- const weeks = Math.round(rawAge / (1000 * 3600 * 24 * 7));
- const days = Math.round(rawAge / (1000 * 3600 * 24));
- const hours = Math.round(rawAge / (1000 * 3600));
- const minutes = Math.round(rawAge / (1000 * 60));
- const seconds = Math.round(rawAge / (1000));
-
- const timeSpan = weeks > 0 ? `${weeks} week${weeks > 1 ? 's' : ''} ago` : days > 0 ? `${days} day${days > 1 ? 's' : ''} ago` : hours > 0 ? `${hours} hour${hours > 1 ? 's' : ''} ago` : minutes > 0 ? `${minutes}m ago` : `${seconds}s ago`
-
- newRecordList.push({recordID, videoName, folderName, timeSpan});
- }
-
- records.value = [...newRecordList];
- }
-
async function reload(nextFolderName){
- const nextFolder = stateDirectory.value.folders?.find((folder) => {return folder.attributes.name === nextFolderName});
-
- if(!nextFolder.id){
- // eslint-disable-next-line no-undef
- toastr["error"](`The folder '${nextFolderName}' does not exist.`, "Invalid folder");
- return;
- }
-
- const { data, error } = await API.post('/videos', { folder_id: nextFolder.id});
-
- if(error || !data?.success){
- // eslint-disable-next-line no-undef
- toastr["error"](`The folder '${nextFolderName}' does not exist. ${error?.message}`, "Invalid folder");
- pageTitle.value = 'Folder not Found';
- console.log(error ?? data?.message);
- return;
- }
-
- stateFolder.value = { id: nextFolder.id, name: nextFolder.attributes.name, 'videos': data.data}
- loadVideosAndParse();
+ await getFolder(nextFolderName);
}
- async function initData() {
+ onMounted(async () => {
const URL_CATEGORY = route.params.category;
const URL_FOLDER = route.params.folder;
- const { data, error } = await API.get(`/${URL_CATEGORY} ${URL_FOLDER ? '/' + URL_FOLDER : ''}`)
-
- if(error || !data?.success){
- // eslint-disable-next-line no-undef
- toastr['error'](data?.message ?? 'Unable to load data.');
- pageTitle.value = 'Folder not Found';
- console.log(error ?? data?.message);
- return;
- }
-
- stateDirectory.value = data.data.dir;
- stateFolder.value = data.data.folder
-
- parseFolders();
- loadVideosAndParse();
- }
-
- onMounted(() => {
- initData();
+ getCategory(URL_CATEGORY, URL_FOLDER);
})
watch(() => route.params.folder, reload, {immediate: false});
watch(() => selectedSideBar.value, cycleSideBar, {immediate: false});
- var stateThumbnailDir = ref("https://app.test:8080/storage/thumbnails/folders/");
</script>
<template>
<LayoutBase>
<template v-slot:content>
- <section id="content-video">
- <div id="video-container">
- <VideoPlayer URL=""/>
+ <section id="content-video" class="flex flex-col gap-3">
+ <div id="video-container" class="flex flex-col gap-3">
+ <VideoPlayer URL="" :video="stateVideo"/>
- <hr class="mt-4 mb-3">
+ <!-- <hr class=""> -->
- <div class="p-6 my-4 w-full mx-auto dark:bg-primary-dark-800 bg-primary-800 rounded-xl shadow-lg flex justify-center sm:justify-between gap-4 flex-wrap sm:flex-nowrap">
- <div class="flex items-center space-x-4">
+ <div class="p-6 w-full mx-auto dark:bg-primary-dark-800 bg-primary-800 rounded-xl shadow-lg flex justify-center sm:justify-between gap-4 flex-wrap sm:flex-nowrap">
+ <div id="mp4-description" class="flex items-center gap-4">
<div class="shrink-0">
- <img id="folder-thumbnail" class="h-16 lg:h-24 object-contain rounded-md" src="https://app.test:8080/storage/thumbnails/folders/5.jpg" onerror='this.onerror=null;this.src="https\:\/\/app.test:8080/storage/thumbnails/folders/5.jpg";' alt="Folder Cover Art">
+ <img id="folder-thumbnail" class="h-16 sm:h-28 object-contain rounded-md" src="https://app.test:8080/storage/thumbnails/folders/5.jpg" onerror='this.onerror=null;this.src="https\:\/\/app.test:8080/storage/thumbnails/folders/5.jpg";' alt="Folder Cover Art">
</div>
- <div class="h-full">
- <div id="mp4-title" class="text-xl font-medium"></div>
- <p class="dark:text-slate-400 text-slate-500 line-clamp-2">This episode is about a walrus going for a juice box run at 3am</p>
+ <div class="h-full flex flex-col gap-2">
+ <div id="mp4-title" class="text-xl font-medium">{{ stateVideo?.attributes ? stateVideo.attributes.name : ''}}</div>
+ <p class="dark:text-slate-400 text-slate-400 line-clamp-3 text-sm">After defeating the Demon Lord, Himmel the Hero, priest Heiter, dwarf warrior Eisen, and elf mage Frieren return to the royal capital. After their procession, they view a meteor shower and discuss their future plans. Himmel, Heiter, and Eisen are ready to retire from adventuring after their ten-year quest. Frieren, whose lifespan is much longer, considers the ten years to be trivially short and plans to travel and learn new spells. To her colleagues' amusement, she promises to show them a better site to observe the meteor shower at its next occurrence in 50 years. Frieren keeps her word and returns 50 years later to find that Himmel and Heiter have become elderly, and Eisen is middle-aged. The week-long journey to Frieren's viewing site reminds the party of their past adventures. Himmel the Hero dies of old age shortly after the expedition. At his funeral, Frieren tearfully realizes she did not adequately get to know him and decides to learn as much about humans as possible. 20 years later, she visits Heiter to find that he has adopted a war orphan, nine year old Fern. Heiter, suffering from death anxiety in his advanced age, asks Frieren to research life-extending magic and tutor Fern in magic in her spare time. She agrees after seeing Fern is already remarkably skilled despite her youth.</p>
+ <p class="text-xs">20 Views</p>
</div>
+
+
+ </div>
+ <div id="mp4-details" class="container flex w-auto flex-col justify-between min-w-64" role="group">
+ <section class="flex gap-2 justify-end">
+ <button class="p-2 bg-button-100 dark:bg-button-900 rounded-lg ring-indigo-500 hover:ring-indigo-800 hover:bg-button-200 dark:hover:bg-indigo-400 hover:text-neutral-950 ring-[0.125rem] ring-inset">Edit Details</button>
+ <button class="p-2 bg-button-100 dark:bg-button-900 rounded-lg hover:ring-indigo-500 hover:ring-[0.125rem] ring-inset">s</button>
+ </section>
+ <section class="flex justify-end">
+ <button type="button" class="bg-button-100 dark:bg-button-900 dark:text-white rounded-l-md border-r ring border-indigo-300 py-2 hover:bg-red-700 hover:text-white px-3 shadow-xl" @click="playlistSeek(-1)">
+ <div class="flex flex-row align-middle">
+ <svg class="w-5 mr-2" fill="currentColor" viewBox="0 0 20 20" xmlns="https://www.w3.org/2000/svg">
+ <path fill-rule="evenodd" d="M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z" clip-rule="evenodd"></path>
+ </svg>
+ <p class="ml-2">Prev</p>
+ </div>
+ </button>
+ <button type="button" class="bg-button-100 dark:bg-button-900 dark:text-white rounded-r-md py-2 border-l ring border-indigo-300 hover:bg-red-700 hover:text-white px-3 shadow-xl" @click="playlistSeek(1)">
+ <div class="flex flex-row align-middle">
+ <span class="mr-2">Next</span>
+ <svg class="w-5 ml-2" fill="currentColor" viewBox="0 0 20 20" xmlns="https://www.w3.org/2000/svg">
+ <path fill-rule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd"></path>
+ </svg>
+ </div>
+ </button>
+ </section>
+ <section class="flex gap flex-col items-end text-sm text-slate-400">
+ <p>#atmospheroc #sad #rocky</p>
+ </section>
</div>
- <!-- <div id="mp4-controls" class="my-auto container flex w-auto" role="group">
- <button type="button" class="bg-gray-800 text-white rounded-l-md border-r border-gray-100 py-2 hover:bg-red-700 hover:text-white px-3 shadow-xl">
- <div class="flex flex-row align-middle">
- <svg class="w-5 mr-2" fill="currentColor" viewBox="0 0 20 20" xmlns="https://www.w3.org/2000/svg">
- <path fill-rule="evenodd" d="M7.707 14.707a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414l4-4a1 1 0 011.414 1.414L5.414 9H17a1 1 0 110 2H5.414l2.293 2.293a1 1 0 010 1.414z" clip-rule="evenodd"></path>
- </svg>
- <p class="ml-2">Prev</p>
- </div>
- </button>
- <button type="button" class="bg-gray-800 text-white rounded-r-md py-2 border-l border-gray-200 hover:bg-red-700 hover:text-white px-3 shadow-xl">
- <div class="flex flex-row align-middle">
- <span class="mr-2">Next</span>
- <svg class="w-5 ml-2" fill="currentColor" viewBox="0 0 20 20" xmlns="https://www.w3.org/2000/svg">
- <path fill-rule="evenodd" d="M12.293 5.293a1 1 0 011.414 0l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414-1.414L14.586 11H3a1 1 0 110-2h11.586l-2.293-2.293a1 1 0 010-1.414z" clip-rule="evenodd"></path>
- </svg>
- </div>
- </button>
- </div> -->
</div>
</div>
- <hr id='preData' class="my-4">
+ <!-- <hr id='preData'> -->
- <div id='dataContainer'></div>
+ <VideoTable :folder="stateFolder"/>
</section>
</template>
<template v-slot:sidebar>