jplayer

Play song at specific time position from a playlist

不想你离开。 提交于 2021-01-28 02:16:23
问题 I am using jPlayer plugin. In example there are 13 songs in playlist. I want to set a start time (currentTime) for each song like : 1st song starts from 2 sec, 2nd song start from 3 sec and 5th song start from 4 sec. Here is an example jsFiddle. In this example I added var tag = $('.audio-tag audio')[0]; to find current playing song globally but it is out of jPlayer plugin. How to get current audio tag & number to set currentTime for each song of jPlayer playlist? 回答1: SOLUTION var $jp = $('

Trouble with continuous play on html5 audio player with pages loaded from Infinite Scroll

こ雲淡風輕ζ 提交于 2020-01-14 06:21:06
问题 I am building a site with 20 single song audio players on each page. The code I have is meant to play the next visible song at the end of each song. It works fine on the initial page, but once Paul Irish's infinite scroll loads new pages, the code does not work properly. Instead of playing the next song, it plays a random song on the page. I have noticed a pattern of it often playing a song 9 songs behind. The player is: https://github.com/pupunzi/jquery.mb.miniAudioPlayer The code I am using

Trying to implement jPlayer using jQuery Mobile - player stops when launching dialog

寵の児 提交于 2020-01-14 04:32:28
问题 I am trying to design a page for mobile devices using jQuery Mobile that has jPlayer on the main page, and other content loaded either in tabs or another page or a dialog, such that the audio in jPlayer keeps playing. I am not sure how to implement tabs using jQuery Mobile, but I have tried adapting the 2 page example from the demos, and also a single page with a dialog which contains extra content, and using both methods the playback in jPlayer stops. I am not sure why this is happening. In

How can I get the current time of the song playing in jPlayer? [closed]

时光总嘲笑我的痴心妄想 提交于 2020-01-14 02:35:07
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . I used a jPlayer control to play a music part and songs. I want to get the specific time during the jPlayer play, but i can't. How can i get the current time of the song playing? 回答1: Take this: $("#yourPlayer")

jPlayer 2.0 Elapsed/Remaining Time

僤鯓⒐⒋嵵緔 提交于 2020-01-13 08:54:32
问题 I'm working with jPlayer 2.0 I've got it playing, pausing, etc...but how do I grab the elapsed/remaining time attributes from the jquery object? I've tried the event handlers and even provided HTML elements with the default selectors, but none of that appears to work. Thanks in advance! 回答1: I did it this way: self.update_timer = function (event) { var status = event.jPlayer.status; $('.jtimer').text($.jPlayer.convertTime(status.duration - status.currentTime)); }; $('.jplayer') .jPlayer(

Multiple Jplayer audio players from Laravel DB

烈酒焚心 提交于 2020-01-05 08:36:15
问题 I'm trying to create multiple instances of Jplayers that each play a different audio file from my Laravel Database (table called archives) and i'm stuck at the point the jQuery code meets the Laravel code. So far the audio players play but they play the same file. also i have trouble when i navigate deeper into the website. ex: with mydomain.com/segments/ the audio player adds "segments" to the url instead of just the public directory. I know a similar issue can be solved with the URL:asset

jQuery jPlayer change media not working

試著忘記壹切 提交于 2020-01-03 10:56:08
问题 I am trying to change the song on jQuery, using the developers guide, i have come up with this function: <script type="text/javascript"> $(document).ready(function(){ $('.embedinfo').click(function() { $("#jquery_jplayer_1").jPlayer( "clearMedia" ); $("#jquery_jplayer_1").jPlayer({ ready: function () { $(this).jPlayer("setMedia", { mp3:"/audio/<?php echo $audioarray[0]['audio']; ?>" }).jPlayer("<?php if(empty($auto)){ echo "pause"; } elseif($auto==1){ echo "play"; } ?>"); }, swfPath: "/js

How can i make circle jPlayer autoplay?

夙愿已清 提交于 2019-12-30 08:15:29
问题 Can anyone tell me how to make this autoplay? $(document).ready(function(){ var myCirclePlayer = new CirclePlayer("#jquery_jplayer_1", { m4a:"x.mp3", oga: "x.ogg" }, { cssSelectorAncestor: "#cp_container_1" }); }); 回答1: Try this (documentation here) after you have created your player: $('#jquery_jplayer_1').jPlayer("play"); Alternatively instantiate the player like this: $(document).ready(function () { $("#jquery_jplayer_1").jPlayer({ ready: function () { $(this).jPlayer("setMedia", { m4a:"x

Protect audio file from being downloaded while still being playable through JQuery JPlayer

自闭症网瘾萝莉.ら 提交于 2019-12-28 18:28:11
问题 I have audio files saved in a folder on my server. They are called by JQuery JPlayer to be played. However if a person looks at the source of the page, they can find the location of the file and simply download it. I want to protect the files from being downloadable, but still allow JPlayer to play them. Is this possible? I have tried denying the folder with .htaccess as well as password protecting the folder, but this prevents JPlayer from being able to play the files. 回答1: It's impossible

How to save current playing song in cookie?

天涯浪子 提交于 2019-12-25 19:37:10
问题 I am using jPlayer plugin. Here is an example link [ jsfiddle ]. I save the current playing track number in a cookie. After a browser reload it starts playing from the track number loaded from the cookie. This works but the problem is, after the current track ends, it starts to play from the first track of the playlist. I want it to continue to the next track. Example of current situation: playlist have 10 songs clicked on number 3 song cookie saved number 3 song browser reload start playing