diff --git a/VANA-php/resources/css/app.css b/VANA-php/resources/css/app.css index 76c5bbf..9401612 100644 --- a/VANA-php/resources/css/app.css +++ b/VANA-php/resources/css/app.css @@ -187,6 +187,9 @@ input[type="radio"] + label:hover { margin-right: 1em; } +.vjs-title-bar{ + display: none !important; +} /* Layout */ @@ -218,6 +221,13 @@ main { height: 2em; margin-left: 20em; background: #aaa; + display: flex; + justify-content: space-between; +} + +#timeline-bar>span{ + display: inline-flex; + align-items: center; } #timeline-bar-ctrl{ diff --git a/VANA-php/resources/js/app.js b/VANA-php/resources/js/app.js index 63e0a9f..b69b974 100644 --- a/VANA-php/resources/js/app.js +++ b/VANA-php/resources/js/app.js @@ -132,15 +132,12 @@ const timelineIndicator = document.getElementById('timeline-bar-ctrl'); - // Play / Pause video video.addEventListener('click', _ => { player.paused() ? player.play() : player.pause(); + timelineTimelabels(); }) - - - // Transcript const transcript = document.getElementById('transcript'); const transcript_cues = transcript.querySelectorAll('[data-start]'); @@ -148,6 +145,7 @@ const transcript_cues = transcript.querySelectorAll('[data-start]'); transcript_cues.forEach(c => { c.addEventListener('click', (e) => { player.currentTime(e.target.getAttribute('data-start')); + player.play(); }); }); @@ -160,6 +158,25 @@ const status = { timelineIndicatorIsDragged: false } +function timelineTimelabels(){ + let duration = player.duration() + let step = duration / 10; + let html = '00:00:00' + + for(let i = 1; i <= 10; i++){ + html += `${secondsToTimecode(i * step)}`; + } + + document.querySelector('#timeline-bar').insertAdjacentHTML('beforeend', html); + + console.log(html) + + + +} + + + /** * calcCurrenttimeByPosition * Calculate time to seek to, based on the position of the timelineIndicator. diff --git a/VANA-php/resources/views/detail.blade.php b/VANA-php/resources/views/detail.blade.php index 0b6ce64..1974f69 100644 --- a/VANA-php/resources/views/detail.blade.php +++ b/VANA-php/resources/views/detail.blade.php @@ -54,13 +54,7 @@ @foreach($subtitles['cues'] as $cue)
- Bla bla bla... all about terms... -
-- -
-- A link to a page with more infos about terms! -
-- Maybe even some form element where you can enter a name for your terms: -
+