Open ElixirMike opened 4 years ago
Hi @ElixirMike,
You can add any Youtube Iframe function and should work correctly using react-native-webview-invoke
check this example of how you can add ChangeQuality
:
//src/web/index.js
....
const createPlayer = () => {
....
}
invoke.define("createPlayer", createPlayer);
const changeQuality = (opts) => {
//https://developers.google.com/youtube/iframe_api_reference#Playback_quality
player.setPlaybackQuality(opts)
}
invoke.define("changeQuality", changeQuality);
changeQuality
on Native-side//src/mobile/YTWebView.tsx
....
export default class YTWebView extends Component<YTWebViewProps> {
...
_createPlayer = this.invoke.bind("createPlayer");
_changeQuality = this.invoke.bind("changeQuality");
}
lets me know if you need more help to implement a start/end time for the video.
Thanks yjose, just getting back to this. I'm sure how to process this.....could use your help? Or could you add start/end time parameters to the player? That would be ideal :)
Not sure if I can do it in the upcoming weeks because I don't have enough time to do it for now, but for sure I will try to make it ASAP.
I also wanted this feature it would be helpful to see that soon
Any positive update on this feature ? I also want this feature.
I'm looking at implementing this, as I've had the issue with react-native-youtube freezing due to overlay problem with react-native-navigation. Hoping this solution might solve it.
In regards to this API, would it support providing a start/end time for the video, as youtube URL's support this?