WP plugin, automatically play next song

时间:2018-05-06 17:13:41

标签: javascript php wordpress

Audio player does not play next song automatically when the current song is finished. Can we fix it? It would be great if a second song starts to play when a first song reaches the end.

php code:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>

<svg width="100%" height="100%" viewBox="400 0 500 320" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">

<path id="estonia" fill="#F5F5F5" d="M517.8,143.7l-5.6-0.2l-3.5,2.2l0,1.6l2.3,2.2l7.2,1.2L517.8,143.7L517.8,143.7z
M506.8,147.6l-1.5-0.1l-0.9,0.9l0.6,1l1.5,0.1l0.8-1.2L506.8,147.6L506.8,147.6z
M506.6,151.7l-1.5-0.1l-2.7,3.2v1.5l0.9,0.4l1.8,0.1l2.9-2.4l0.4-0.8L506.6,151.7L506.6,151.7z"/>

<path id="sweden" fill="#F5F5F5" d="M497.7,104.6l2,1.8h3.7l2,3.9l0.5,6.7l-5,3.5v3.5l-3.5,4.8l-2,0.2l-2.8,4.6l0.2,4.4l4.8,3.5l-0.4,2l-1.8,2.8
	l-2.8,2.4l0.2,7.9l-4.2,1.5l-1.5,3.1h-2l-1.1-5.5l-4.6-7l3.8-6.3l0.3-15.6l2.6-1.4l0.6-8.9l7.4-10.6L497.7,104.6L497.7,104.6z
	M498.5,150.2l-2.1,1.7l1.1,2.4l1.9-1.8L498.5,150.2L498.5,150.2z"/>

<path id="finland" fill="#F5F5F5" d="M506.8,116.9l2.1,0.9l1.3,2.4l-1.3,1.7l-6.4,7l-1.1,3.7l1.5,5.4l5,3.7l6.6-3.1l5.3-0.7l5-7.9l-3.7-8.7
	l-3.5-8.3l0.5-5.4l-2.2-0.4l-0.6-3.9l-3-4.8l-3.3,2.3l-1.3,5.3l-3.5-2.1l-4.8-1.2l-1.1,1.3l1.9,1.7l3.4-0.1l2.7,4.4L506.8,116.9
	L506.8,116.9z"/>

<path id="norway" fill="#F5F5F5" d="M515.5,102.1l2-1.5l-0.2-1.7l-1.3-0.7l0.2-2h1.1v-1.1l-4.8-1.3l-7.1,0.7l-0.7,3.1l-1.6-0.5l-1.1-1.8l-3.5,0.2
	L498,99l-1.6,0.7l-0.9-1.8l-7.3,5.9l1.5,1.7l-2.8,1.3l-6.2,12.4l-2.2,1.5l0.2,1.1l2.2,1.1l-0.5,2.4l-3.7-0.2l-1.1-1.3l-2.4,2.8
	l-1.5,1.1l-0.4,2.6L470,131l-3.3,0.7l-1.6,5.2l1.1,8.5l1.3,3.9l1.5,1.5l3.3-0.2l4.8-4.6l1.8-3.1l0.5,4.6l3.1-5.5l0.2-15.5l2.5-1.6
	l0.8-8.6l7.7-11.1l3.7-1.3l1.6-2l5.5,1.3l2.8,1.7l0.9-4.6l4.6-2.8L515.5,102.1L515.5,102.1z
M488.3,54l-1.6-1.7l-3.7,1.8h-6.7l-1.1,3.9l3.8,3.3l1.6-0.2l2.4-4l2,1.4l-1.4,2.8l-0.7,4.2l1.6,2.6l3.5-5.9l4.6-5.6l-1.8-1.5L488.3,54L488.3,54z
	M490.3,46.8l-3,2.7l1.8,2.7h3.2l1.3,1.8l3.9,2l4.5-2.6l3.1-2.6l-1.1-2.1l-3.1-1.8l-2.2,2l-1.5-1.9l-1.2,0.1l-1.5,3.3l-2.2-2.3l-0.2-1.5L490.3,46.8L490.3,46.8z
	M497,59.1l-2.4,2.1l-2,1.5l0.9,1.7l1.9,0.6l3.1-1.4l1.4-1.8l-1.3-2.1L497,59.1L497,59.1z"/>

</svg>

javascript code:

class JobOffer
  include DataMapper::Resource

  property :id, Serial
  property :title, String
  property :location, String
  property :experience, Numeric, :default => 0
  property :description, String
  property :created_on, Date
  property :updated_on, Date
  property :is_active, Boolean, :default => true
  belongs_to :user

  validates_presence_of :title
  validates_numericality_of :experience => {
      :greater_than_or_equal_to => 0,
      :less_than_or_equal_to    => 16
  }
end

0 个答案:

没有答案