Search in sources :

Example 1 with VideoExportMediaResource

use of org.olat.modules.video.manager.VideoExportMediaResource in project openolat by klemens.

the class VideoHandler method getAsMediaResource.

@Override
public MediaResource getAsMediaResource(OLATResourceable res, boolean backwardsCompatible) {
    RepositoryManager repoManager = CoreSpringFactory.getImpl(RepositoryManager.class);
    RepositoryEntry repoEntry = repoManager.lookupRepositoryEntry(res, false);
    if (repoEntry == null) {
        return new NotFoundMediaResource();
    }
    VideoManager videoManager = CoreSpringFactory.getImpl(VideoManager.class);
    VideoExportMediaResource exportResource = videoManager.getVideoExportMediaResource(repoEntry);
    return exportResource;
}
Also used : NotFoundMediaResource(org.olat.core.gui.media.NotFoundMediaResource) VideoExportMediaResource(org.olat.modules.video.manager.VideoExportMediaResource) RepositoryManager(org.olat.repository.RepositoryManager) RepositoryEntry(org.olat.repository.RepositoryEntry) VideoManager(org.olat.modules.video.VideoManager)

Example 2 with VideoExportMediaResource

use of org.olat.modules.video.manager.VideoExportMediaResource in project OpenOLAT by OpenOLAT.

the class VideoHandler method getAsMediaResource.

@Override
public MediaResource getAsMediaResource(OLATResourceable res, boolean backwardsCompatible) {
    RepositoryManager repoManager = CoreSpringFactory.getImpl(RepositoryManager.class);
    RepositoryEntry repoEntry = repoManager.lookupRepositoryEntry(res, false);
    if (repoEntry == null) {
        return new NotFoundMediaResource();
    }
    VideoManager videoManager = CoreSpringFactory.getImpl(VideoManager.class);
    VideoExportMediaResource exportResource = videoManager.getVideoExportMediaResource(repoEntry);
    return exportResource;
}
Also used : NotFoundMediaResource(org.olat.core.gui.media.NotFoundMediaResource) VideoExportMediaResource(org.olat.modules.video.manager.VideoExportMediaResource) RepositoryManager(org.olat.repository.RepositoryManager) RepositoryEntry(org.olat.repository.RepositoryEntry) VideoManager(org.olat.modules.video.VideoManager)

Aggregations

NotFoundMediaResource (org.olat.core.gui.media.NotFoundMediaResource)2 VideoManager (org.olat.modules.video.VideoManager)2 VideoExportMediaResource (org.olat.modules.video.manager.VideoExportMediaResource)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2 RepositoryManager (org.olat.repository.RepositoryManager)2