the method setPlaybackRate seem not to be working on mobile.
Hi, it can be achieved by changing the WebView user agent, i.e. in WebViewYouTubePlayer:
String desktopAgent = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0";
getSettings().setUserAgentString(desktopAgent);
Great lib, thanks for your work!
Hi, interesting! I didn't know that. It's a nice little hack.
The problem with hacks is that they are usually not reliable long term. Therefore not the best solution for a library.
What happens if after a few years Google changes something in WebView or in the IFrame API? that feature (or the entire library) may broke. This will result in every app using the lib being broken.
I will try to find a way to integrate this as an option (not the default implementation), so that who enables it must know what he's doing.
Yeah, make it as an option would be an throughly consideration.
Dude you are so awesome. I will literally send you money @PierfrancescoSoffritti if you implement this.
The problem with this is that if I implement it, it will be a broken feature for everyone not using the hack of changing the user agent. Therefore the YouTubePlayer interface would have to expose a bunch of methods that will work only sometimes. It doesn't look to me like a particularly elegant solution.
Any updates on this issue? Did someone find a workaround to achieve it?
Hi, it can be achieved by changing the WebView user agent, i.e. in
WebViewYouTubePlayer:String desktopAgent = "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:57.0) Gecko/20100101 Firefox/57.0"; getSettings().setUserAgentString(desktopAgent);Great lib, thanks for your work!
Hi, how can I implement it?
This is still not possible without using hacks.
If you want to use the solution suggested by @leavjenn feel free to fork the library and make the change yourself.
This is still not possible without using hacks.
If you want to use the solution suggested by @leavjenn feel free to fork the library and make the change yourself.
Thanks! I implemented it.
Hi guys, any progress on this ?
Waiting for this feature eagerly.
Hi @zanynik unfortunately this is still not possible.
Can I someone guide me on how to change playback speed. I am beginner and I am desparately in need of this of feature.Any Help would be highly appreciated
Plz add playback speed change option .
Really great work
Its April 2020. Still I don't see any api for playback speed. @PierfrancescoSoffritti can you please suggest anything to add playback speed in youtube player view in android?
I think it's still not possible, but haven't tried recently. You're welcome to explore the YouTube IFrame player api and submitting a pull request, in case things changed.
@PierfrancescoSoffritti
Hi, you can use setPlaybackRate in IFrame
This is still not possible without using hacks.
If you want to use the solution suggested by @leavjenn feel free to fork the library and make the change yourself.Thanks! I implemented it.
How? can you explain?? contact mail : [email protected]
Most helpful comment
Thanks! I implemented it.