react-native-youtube-iframe icon indicating copy to clipboard operation
react-native-youtube-iframe copied to clipboard

How to disable share and watch later options?

Open vineelk8 opened this issue 3 years ago • 6 comments

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

vineelk8 avatar May 27 '21 12:05 vineelk8

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

how exactly do you do this?

LonelyCpp avatar May 27 '21 12:05 LonelyCpp

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?

vineelk8 avatar May 27 '21 12:05 vineelk8

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)

LonelyCpp avatar May 27 '21 13:05 LonelyCpp

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

adelbeke avatar Jun 01 '21 12:06 adelbeke

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
        />

t-chatoyan avatar Apr 22 '22 14:04 t-chatoyan

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.

staticGuru avatar Oct 30 '22 09:10 staticGuru