Skip to content
Snippets Groups Projects
Commit 73e73630 authored by gnaegi's avatar gnaegi
Browse files

OO-2188 show video running time also in metadata segment

parent 3c2ab449
No related branches found
No related tags found
No related merge requests found
......@@ -28,6 +28,7 @@ import org.olat.core.util.Formatter;
import org.olat.core.util.StringHelper;
import org.olat.modules.video.VideoManager;
import org.olat.modules.video.VideoMetadata;
import org.olat.repository.RepositoryEntry;
import org.olat.resource.OLATResource;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -40,11 +41,11 @@ import org.springframework.beans.factory.annotation.Autowired;
public class VideoMetaDataEditFormController extends FormBasicController {
@Autowired
private VideoManager videoManager;
private OLATResource videoResource;
private RepositoryEntry repoEntry;
public VideoMetaDataEditFormController(UserRequest ureq, WindowControl wControl, OLATResource re) {
public VideoMetaDataEditFormController(UserRequest ureq, WindowControl wControl, RepositoryEntry repoEntry) {
super(ureq, wControl);
videoResource = re;
this.repoEntry = repoEntry;
initForm(ureq);
}
......@@ -53,7 +54,11 @@ public class VideoMetaDataEditFormController extends FormBasicController {
UserRequest ureq) {
setFormTitle("tab.video.metaDataConfig");
OLATResource videoResource = repoEntry.getOlatResource();
VideoMetadata videoMetadata = videoManager.readVideoMetadataFile(videoResource);
uifactory.addStaticTextElement("video.config.duration", repoEntry.getExpenditureOfWork(), formLayout);
uifactory.addStaticTextElement("video.config.width", String.valueOf(videoMetadata.getWidth()) + "px", formLayout);
uifactory.addStaticTextElement("video.config.height", String.valueOf(videoMetadata.getHeight()) + "px", formLayout);
......
......@@ -104,7 +104,7 @@ public class VideoSettingsController extends BasicController {
private void doOpenMetaDataConfig(UserRequest ureq) {
if(metaDataController == null) {
metaDataController = new VideoMetaDataEditFormController(ureq, getWindowControl(), entry.getOlatResource());
metaDataController = new VideoMetaDataEditFormController(ureq, getWindowControl(), entry);
listenTo(metaDataController);
}
mainVC.put("segmentCmp", metaDataController.getInitialComponent());
......
......@@ -44,6 +44,7 @@ transcoding.processing=In Bearbeitung
transcoding.waiting=In Warteschlange
video.config.creationDate=Erstellungsdatum
video.config.description=Beschreibung
video.config.duration=L\u00E4nge
video.config.fileSize=Gr\u00F6sse der Videodatei
video.config.filename=Dateinamen
video.config.height=H\u00F6he
......
......@@ -44,6 +44,7 @@ transcoding.processing=Processing
transcoding.waiting=Queuing
video.config.creationDate=Creation Date
video.config.description=Description
video.config.duration=Running time
video.config.fileSize=Size of videofile
video.config.filename=Filename
video.config.height=Height
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment