Safari Issue (also on iOS): Is it confusing webm and mp4 when switching resolution?

  • Hi,

    I have the following set up in my XML:

    videourl.ios="videos/beard-1024x512.mp4"

    videourl.no-ios="videos/beard-1920x960.webm|videos/beard-1920x960.mp4"

    and


    videointerface_addmenuitem(configmenu, q1, 'Extreme', false, change_video_file(q1, 'videos/beard-4096x2048.webm|videos/beard-4096x2048.mp4'); );
    videointerface_addmenuitem(configmenu, q2, 'High', false, change_video_file(q2, 'videos/beard-1920x960.webm|videos/beard-1920x960.mp4'); );
    videointerface_addmenuitem(configmenu, q3, 'Medium', false, change_video_file(q3, 'videos/beard-1024x512.webm|videos/beard-1024x512.mp4'); );

    As you can see, I have put the webm first, so that chrome and firefox favours webm. Mp4 is there as a fall back for safari.

    I have tested all the combinations, so I know that it works the way it should (with webm being favoured over mp4, except where webm doesn't work, then mp4, etc).

    When I use Chrome or Firefox, the first video play is fine. Selecting different resolutions is fine. Both the webm and the mp4s play fine, and I have tested that the correct file is being called.

    However, in Safari - when I load the page, it works fine! Playing back the mp4 fallback as expected. Great. Until I click on a different resolution. Then the player stops and will not load the next video.

    Further to this, on iOS, I get the same issue. In Chrome (iOS) and Safari (iOS) - the first play works fine, but selecting an alternative angle does not - I get the error: "ERROR: videos/beard-1024x512.mp4 - loading video failed!"

    My krpano is up to date (1.18.4) but I also had the same issue with 1.18.3.

    I know the MP4 files are fine, because they play on the first load without issue. It is just selecting the new files, and only in Safari / iOS. It's as if, for some reason, Safari and iOS are trying to load the webm in place of the mp4 (perhaps because I have it listed first?)

    Any thoughts?

  • Errr.... okay I think I'm getting closer, but could still do with some help, if anyone is out there :)

    My original issue seems to be to do with the different ways the plugin handles relative url paths for video files. I can't work out if there is a difference between the way Chrome and Safari handle the paths, or a difference between the way MP4 and WebM file links are handled OR a difference between the way the plugin handles paths for the INITIAL video, and any subsequent videos (I think it might be that - but it's only affecting my MP4s and not my WebMs!).

    Secondly, there seem to be some major problems with compatibility with Safari. Loading new videos feels very buggy, with playback freezing or the image freezing and the audio continuing, Sometimes I can rectify this by skipping back to the start of the video file -- could it be something to do with the code used to set the playback position when changing files? The first play seems to stall and restart as well...

    Does ANYONE have any idea what's going on? :p

    You can have a look at my project here: http://www.explore360.space/projects/project-4/

    Vince

  • Think I've worked it out a bit more...
    The line in my XML that change the video includes this:


    plugin[video].playvideo('%CURRENTXML%/%2', null, get(plugin[video].ispaused), get(plugin[video].time));


    For some reason, this isn't playing the same across all browsers. For a start, the '%CURRENTXML% seems to return different for MP4 and Webm, I think.


    Also, get(plugin[video].time doesn't work in Safari the way it should.


    I'll leave the rest to you, my eyes hurt! :p

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!