Skip to content

Video files not playing on Safari and iOS devices #523

@S66D

Description

@S66D

Hello Jooby Teem,
I am relay glad of what Jooby have become, it is on fire, anyway I have came across a daring challenge and I have been drained out thoughts, I don't know exactly where could the issues be, so I will try to mimic the problem as best as possible:
working directory structure:
image

Main.java

package com.mycompany;
import org.jooby.Jooby;
public class Main extends Jooby {
    {
        assets("/index.html");
        assets("/video.mp4");
        assets("/audio.mp3");
    }
    public static void main(String[] args) {
        run(Main::new, args);
    }
}

index.html

<!DOCTYPE html>
<html>
    <body>
        <video controls>
            <source src="video.mp4" type="video/mp4">
        </video>
        <audio controls>
            <source src="audio.mp3" type="audio/mp3">
        </audio>
    </body>
</html>

and of course to include the video and audio files NOW what is bugging me is that why all major browsers plays the video and audio files perfectly except for Safari on mac and iOS devises to play only audio files.
I don't think this is a file format issue I have uploaded the files on other servers and have not inconter any issue of this kind.
I searched more deep on this mater and found several issues withe Safari and one of these issues was Safari strict byte-range on media files
http://stackoverflow.com/questions/36579176/safari-9-mp4-video-issues
http://stackoverflow.com/questions/32996396/safari-9-0-can-not-play-mp4-video-on-the-storage-server

I made a small test responding to a byte-range request and it seems we manged to make a connection with Safari and it was Jooby lack of byte-range responses.

I hope this is clear for this issue.
Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions