Question

Here is my code of jplayer. The problem is that it works fine in Chrome, Opera, Firefox, but when browsed in the Safari browser on desktop there is some delay in playback. I don't know why is this happened. Any help or suggestion please.

HTML:

<div id="#jpId1"></div>

JavaScript:

$("#jpId1").jPlayer({
     ready: function () { // The $.jPlayer.event.ready event
        $(this).jPlayer("setMedia", { // Set the media
            wav: "sound/sound1.wav",
        }).jPlayer("stop"); // Attempt to auto play the media
    },
        ended: function () { // The $.jPlayer.event.ended event
            $(this).jPlayer("play"); // Repeat the media
        },
        supplied: "wav"
    }
);
Was it helpful?

Solution

The delay will remain same if you choose jPlayer. An option as replacement is Web Api. You can use Web Api to escape from delays.
Here Is the link: Web Api

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top