Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could this support providing start/end times on videos? #8

Open
ElixirMike opened this issue Aug 9, 2019 · 5 comments
Open

Could this support providing start/end times on videos? #8

ElixirMike opened this issue Aug 9, 2019 · 5 comments
Labels
good first issue Good for newcomers

Comments

@ElixirMike
Copy link

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?

@yjose
Copy link
Member

yjose commented Aug 9, 2019

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:

  • Step1: Export the function to the native side like the following :
//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);
  • Step2: Use 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.

@yjose yjose added the good first issue Good for newcomers label Aug 9, 2019
@ElixirMike
Copy link
Author

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 :)

@yjose
Copy link
Member

yjose commented Aug 25, 2019

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.

@hitesh25kumar
Copy link

I also wanted this feature it would be helpful to see that soon

@Anusha-Gurajapu
Copy link

Any positive update on this feature ? I also want this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

5 participants
@yjose @hitesh25kumar @ElixirMike @Anusha-Gurajapu and others