gilesvangruisen/Swift-YouTube-Player

Need to add playback speed control

Opened this issue · 1 comments

Hi, I tried to add speed control by adding the following functions in your YouTubePlayer.
"func getPlaybackRate()" "
"func getAvailablePlaybackRates(completion: )"
"func setPlaybackRate(suggestedRate:Double)"
The functions "getPlaybackRate" and "getAvailablePlaybackRates" worked fine but "setPlaybackRate" caused the error.
Is there any way to control playback speed?

The error observed by "setPlaybackRate" is as follows.
Error Domain=WKErrorDomain Code=4 "A JavaScript exception occurred" UserInfo={WKJavaScriptExceptionLineNumber=1, WKJavaScriptExceptionMessage=SyntaxError: Unexpected token ':', WKJavaScriptExceptionColumnNumber=0, WKJavaScriptExceptionSourceURL=about:blank, NSLocalizedDescription=A JavaScript exception occurred}
["[YouTubePlayer]", "Error executing javascript"]
Thank you,

Hi @ymatt345 Where you able to achieve this?