2
A
回答
-1
看到jQuery Youtube Plugin完整規格和下載。
將有可能宣佈一個球員像這樣:
jQuery("#youtube-player-container").tubeplayer({
width: 600, // the width of the player
height: 450, // the height of the player
allowFullScreen: "true", // true by default, allow user to go full screen
initialVideo: "DkoeNLuMbcI", // the video that is loaded into the player
preferredQuality: "default",// preferred quality: default, small, medium, large, hd720
onPlay: function(id){}, // after the play method is called
onPause: function(){}, // after the pause method is called
onStop: function(){}, // after the player is stopped
onSeek: function(time){}, // after the video has been seeked to a defined point
onMute: function(){}, // after the player is muted
onUnMute: function(){} // after the player is unmuted
});
Then just add a link with the desired function:
<a href="#" onClick='jQuery("#youtube-player-container").tubeplayer("mute")'>
Mute player
+0
有無需使用任何外部插件,因爲youtube api已經爲您提供'player.mute()'和'player.unMute()'來切換聲音並且'player.isMuted()'檢查聲道的狀態。這個解決方案是過度編碼,當你可以使用一個簡單的JavaScript點擊事件... – easwee 2014-07-09 09:44:33
相關問題
- 1. Youtube API和Web音頻API
- 2. AppleScript的音量開關
- 3. Youtube相關影片使用Youtube V3 API
- 4. youtube播放器api開始自動靜音
- 5. Youtube API依賴關係
- 6. 如何爲無鉻的YouTube API設置音量?
- 7. YouTube的Javascript API來創建音頻欄
- 8. youtube api僅限音樂過濾器
- 9. 使用Youtube API播放音頻
- 10. 的Youtube API,靜音視頻(I幀)
- 11. Youtube API - 僅搜索音樂視頻
- 12. YouTube通過Web Audio API提取音頻
- 13. Google開發者API密鑰和YouTube API
- 14. Spotify - 音量 - AppleScript API
- 15. Google的雲語音API語音音量
- 16. YouTube API:「未關聯YouTube帳戶」與YouTube商家帳戶
- 17. 的iOS5 OpenAL的靜音開關和音量控制
- 18. jQuery UI滑塊控制YouTube音量
- 19. 如何使MPMoviePlayerController忽略靜音開關
- 20. 自定義靜音/取消靜音按鈕的Youtube API
- 21. 流音頻(YouTube)
- 22. 關於谷歌語音API
- 23. YouTube API android應用程序開發
- 24. Youtube API自動開始播放歌曲
- 25. Fancybox打開空白頁與YouTube的API
- 26. YouTube的API開始的活動
- 27. PlaySystemSound與靜音開關
- 28. 打開/關閉聲音(IOS)
- 29. Tokbox切換音頻開/關
- 30. 打開/關閉聲音
參見[這](http://www.tikku.com/jquery-youtube-tubeplayer-plugin#tubeplayer_tutorial_1) – CosminO 2012-04-10 13:51:25