使用自定义按钮控制Soundcloud HTML5 Widget Player
Controlling Soundcloud HTML5 Widget Player with custom buttons
我想做一些类似于我在SoundClouds HTML5 Widget API PLayground页面上看到的事情,在那里他们有控制播放器的外部按钮:http://w.soundcloud.com/player/api_playground.html
最终,我将隐藏播放器小部件本身,并使用这些按钮作为音乐控制器。
任何建议或提示都会很棒,我把它发布在这里:http://jsfiddle.net/alexsethalex/qcKed/1/
您是否查看了Widget API文档?
这里有一个超级简单的例子:
<!doctype html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="http://w.soundcloud.com/player/api.js"></script>
<script>
$(document).ready(function() {
var widget = SC.Widget(document.getElementById('soundcloud_widget'));
widget.bind(SC.Widget.Events.READY, function() {
console.log('Ready...');
});
$('button').click(function() {
widget.toggle();
});
});
</script>
</head>
<body>
<iframe id="soundcloud_widget"
src="http://w.soundcloud.com/player/?url=https://api.soundcloud.com/tracks/39804767&show_artwork=false&liking=false&sharing=false&auto_play=true"
width="420"
height="120"
frameborder="no"></iframe>
<button>Play / Pause</button>
</body>
</html>
相关文章:
- CKEditor Widget-阻止编辑可编辑元素本身
- Canvas Html5绘图应用程序,移动画布会导致重大问题
- 如何使用phaser使html5游戏在移动设备浏览器上运行
- HTML5音频加载和播放获胜'我不能在iPad上工作
- HTML5页面底部棒
- Google/html5语音识别JavaScript SDK Chrome网络工具包SpeechRecognition
- Is onfling available for html, html5
- 为什么HTML5拖放的目标是孩子?(可排序列表)
- 安卓平台上的QWebView HTML5地理位置
- HTML5在画布中加载较小的图像并保存实际大小的图像
- 如何检查用户在html5视频播放器中观看了完整的视频
- 使用具有内联样式的tidy-html5
- 从所有元素中删除HTML5验证
- javascript:将数据库中的数据插入到html5文本字段中
- html5视频中的Youtube类型注释
- JavaScript HTML5画布未显示
- 是否可以为HTML5输入滑块触发oninput事件
- 如何使用HTML5与UDP套接字通信
- 使用自定义按钮控制Soundcloud HTML5 Widget Player
- Soundcloud HTML5 Widget 停止随机加载