LonelyCpp / react-native-youtube-iframe

A wrapper of the Youtube-iframe API built for react native.
https://lonelycpp.github.io/react-native-youtube-iframe/
MIT License
609 stars 155 forks source link

How to disable share and watch later options? #145

Open vineelk8 opened 3 years ago

vineelk8 commented 3 years ago

I can disable watch later and share options using full youtube URL with embed cookies. But how can I disable share and watch later options when using this component (react-native-youtube-iframe)?

LonelyCpp commented 3 years ago

I can disable watch later and share options using full youtube URL with embed cookies

how exactly do you do this?

vineelk8 commented 3 years ago

I can disable watch later and share options using full youtube URL with embed cookies

how exactly do you do this?

https://www.youtube-nocookie.com/embed/ur6I5m2nTvk

Please check the above link I have disabled watch later and share option. In the same way, how can I disable using this package?

LonelyCpp commented 3 years ago

I don't think there's a way to do this with the default setup.

you can see the source code of the web player here if you want to experiment

(you'll have to host the modified source somewhere and point the player to your html with the baseUrlOverride prop)

adelbeke commented 3 years ago

The case when the video is in PiP and we go back to the video is handled or not ?

We still have access to the share button event with the tricks, tricky case !

image

t-chatoyan commented 2 years ago

This solution helped me.
https://lonelycpp.github.io/react-native-youtube-iframe/component-props

        <YoutubePlayer
            height={220}
            play={false}
            videoId={videoId}
            initialPlayerParams={{ controls: false }}   <-- add this line
        />
staticGuru commented 1 year ago

YouTube's default UI elements can be hidden, related videos can be hidden, and ads can be removed from YouTube videos in react native.

It may help you to meet your requirements if you use the below-mentioned package: https://www.npmjs.com/package/react_native_youtube_streamer

Besides being open source, the package is scalable as well. It is also possible for you to contribute to that project.