Skip to content

Commit

Permalink
add setVolume and getVolume commands per https://developers.google.co…
Browse files Browse the repository at this point in the history
  • Loading branch information
dtran320 committed May 15, 2020
1 parent 1d0f617 commit 413ee48
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions YouTubePlayer/YouTubePlayer/YouTubePlayer.swift
Expand Up @@ -202,6 +202,14 @@ open class YouTubePlayerView: UIView, UIWebViewDelegate {
return evaluatePlayerCommand("getCurrentTime()")
}

open func setVolume(_ volume: Int) {
evaluatePlayerCommand("setVolume(\(volume)")
}

open func getVolume() -> String {
return evaluatePlayerCommand("getVolume()")!
}

// MARK: Playlist controls

open func previousVideo() {
Expand Down

0 comments on commit 413ee48

Please sign in to comment.