[8.1.x] Video can't be played if video file is placed inside parent folder #42

michaelstingl opened this Issue Mar 15, 2016 · 9 comments


None yet

4 participants


I can't play a video file "BigBuckBunny_320x180.mp4" in a subfolder, for example the folder "MovieProblems".


This is what I can see in the DOM:

<div class="mejs-mediaelement">
  <video width="640" height="480" id="media_element" class="video-js vjs-default-skin" preload="none" src="https://oc.example.com/remote.php/webdav/MovieProblemsBigBuckBunny_320x180.mp4">
    <source type="video/mp4" src="https://oc.example.com/remote.php/webdav/MovieProblemsBigBuckBunny_320x180.mp4">

It is always the slash missing between the foldername and the filename.

This don't happen if I place the file in the root of my account.

This don't happen with 8.2.3.

@LukasReschke Could this fix be backported to 8.1.x? /cc @MorrisJobke

00005026 [blue-ticket]


@LukasReschke It looks like something is missing?

This is the code I already have in 8.1.6:

    onView : function(file, data) {
        videoViewer.file = file;
        videoViewer.dir = data.dir;
        if ($('#isPublic').length){
            // No seek for public videos atm, sorry
            videoViewer.location = data.fileList.getDownloadUrl(file, videoViewer.dir);
        } else {
            videoViewer.location = OC.linkToRemote('webdav') + videoViewer.dir + file;
        videoViewer.mime = data.$file.attr('data-mime');

        OC.addScript('files_videoviewer','mediaelement-and-player', function(){
            OC.addScript('files_videoviewer','mep-extra', videoViewer.showPlayer);

I modified line 61 according your code:

videoViewer.location = OC.linkToRemote('webdav') + OC.joinPaths(videoViewer.dir, file);

But then I get a new error:
movieproblems_-_files_-_owncloud_enterprise_edition_and_viewer_js_and_kaleidoscope_ _ var_videovie ___ var_videovie _2


Ah. Yes… 🙈

OC.joinPaths is also only available since 8.2 as per owncloud/core#17559


@karlitschek Your call whether we want to backport https://github.com/owncloud/core/blob/fbc03b43b900d8657a865e447a471687342c4ce7/core/js/js.js#L328-L368 and owncloud/apps@fee9c82 to 8.1.

Risk should be minimal. The js.js change in core will only be used by this method.


i think a backport should be safe 👍


@michaelstingl Please test owncloud/core#23301 in combination with owncloud/apps#2160


@michaelstingl Please test owncloud/core#23301 in combination with owncloud/apps#2160

Tested and works


Fix is merged into 8.1.7

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment