jplayer / jPlayer

jPlayer : HTML5 Audio & Video for jQuery
http://jplayer.org/
Other
4.6k stars 1.47k forks source link

not working on iPhone, nor Safari Desktop #430

Closed sova closed 3 years ago

sova commented 3 years ago

Hi, jPlayer is great, the demos work on these mobile devices, but something is not working right in my code...

The play button on Android is working, but on iPhone the jPlayer gui shows 0:00 for the duration even though it ought to be 14:08.

When I press the Play button on the iPhone, in the Console (on the web inspecting mac attached to it) I see

Unhandled Promise Rejection: NotSupportedError: The operation is not supported.
>(anonymous function)
>rejectPromise

(where the >'s are indents)

I'm curious if anyone knows what I have goofed up here?

      <script type="text/javascript">
        $(document).ready(function(){
          $("#jquery_jplayer_1").jPlayer({
            ready: function () {
              $(this).jPlayer("setMedia", {
                title: "Listen Along",
                m4a: "filename.m4a"
              });
            },
            cssSelectorAncestor: "#jp_container_1",
            swfPath: "/js",
            supplied: "m4a",
            useStateClassSkin: true,
            autoBlur: false,
            smoothPlayBar: true,
            keyEnabled: true,
            remainingDuration: true,
            toggleDuration: true
          });
        });
      </script>

Again, it is working on all other platforms except for the iPhone and Desktop Safari.

Any advice would be greatly appreciated

Edit: Hey I think this is related, but I'm not sure how: https://github.com/GoogleChromeLabs/perception-toolkit/issues/148

sova commented 3 years ago

I think it's because my server was not supporting Range Requests correctly.