我尝试在普通的HTML表格中添加默认的WordPress音频播放器。我想在同一行显示所有三个div,即使在移动设备中也是如此。任何可能做这样或任何选项只显示音频播放器中的播放按钮或使用html5音频播放器。
var urlstr = "https://maps.googleapis.com/maps/api/place/nearbysearch/json?key=AIzaSyC4BR5rZLNkeGChLr8N00BHZqBYqPdrgjg&location=43.690578,-79.342348&radius=400&types=cafe|bakery"
var escapedString = urlstr.stringByAddingPercentEscapesUsingEncoding(NSUTF8StringEncoding)
let reposURL = NSURL(string: escapedString!)
// 2
if let JSONData = NSData(contentsOfURL: reposURL!) {
// 3
do {
if let json = try NSJSONSerialization.JSONObjectWithData(JSONData, options: []) as? NSDictionary {
// 4
print(json)
if let reposArray = json["results"] as? [NSDictionary] {
// 5
for item in reposArray {
print(item)// You will get particular items
}
}
}
} catch let error as NSError {
print(error.localizedDescription)
}
}
答案 0 :(得分:0)
替换你的DIV
<div>[audio src="http://www.website.com/123.mp3"]</div>
使用此HTML5标记
<audio controls>
<source src="http://www.website.com/your_file.mp3" type="audio/mpeg">
</audio>