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

Move "copy link" icon -- drop the nocookie bit #80

Open
AnmolChhabra98 opened this issue Apr 14, 2021 · 9 comments
Open

Move "copy link" icon -- drop the nocookie bit #80

AnmolChhabra98 opened this issue Apr 14, 2021 · 9 comments

Comments

@AnmolChhabra98
Copy link

I need to move copy link icon to left so that my menu bar buttons don't override the copy link icon. Is it possible to do so ?
because I am unable to do it my making changes in LiteEmbed.css.

I am using the (npm install react-lite-youtube-embed -S) and taking refrence from https://www.npmjs.com/package/react-lite-youtube-embed.

@Garbee
Copy link
Contributor

Garbee commented Apr 14, 2021

This repo is not for that module.

As far as moving icons in the embed though, you'd need to be able to inject stylings into the iframe. Which since this is always cross-origin I don't believe is possible. Perhaps there is an API config that can turn off the link button completely? Then you could provide an action for that in your own interface.

@AnmolChhabra98
Copy link
Author

AnmolChhabra98 commented Apr 15, 2021

Thanks Garbee , Yes when I tried to move the Copy link it gives me the cross-origin error . Can you please guide me how can I hide the copy link button ?

@Garbee
Copy link
Contributor

Garbee commented Apr 15, 2021

It can't be hidden. If enhanced privacy is used for the embed (nocookie on the URL) it shows the copy link button. If that is off, it is replaced with a Share and another button.

Without access to Google's origin (so getting a job there, working on the YT team, and fixing this internally) you can't modify the embed outside of the configuration options they provide.

@paulirish
Copy link
Owner

paulirish commented Apr 15, 2021

If enhanced privacy is used for the embed (nocookie on the URL) it shows the copy link button.

TBH, I never realized the Copy Link thing was added in the nocookie case. That's a downside... hmm.

We could add an option to NOT use nocookie. And then folks can make that choice.

@AnmolChhabra98
Copy link
Author

Ok, So we have to work with either copy link or other buttons .

Is there any way to identify if any of the video is playing on the page ? so that I can close my menu bar buttons by getting this info.

@Garbee
Copy link
Contributor

Garbee commented Apr 16, 2021

https://developers.google.com/youtube/iframe_api_reference

Yes, the embed API is available to tell those kinds of things.

As far as option to opt-out of enhanced privacy, it won't solve the root issue. As "Copy LInk" is just replaced with "Share" and another button. Copy Link is in place of "Share" since sharing goes through Google's system attached to your account. Copy Link is not tied to the account, it just puts the link in the clipboard for you to share as you desire.

I think it's valid to say that should be configurable. Some content is only visible if subscribed now, among other paywalls. If those are able to be embedded then the account link is required so our default isn't usable. Default should remain our current, privacy-focused, approach and an attribute should opt an embed into reduced privacy.

I'll file a new issue for that addition since it isn't related to this core solution.

@AnmolChhabra98
Copy link
Author

AnmolChhabra98 commented Apr 17, 2021

Thanks Garbee , but identifying a video is playing on webpage is also possible for this package (LiteYouTubeEmbed) ?

@Garbee
Copy link
Contributor

Garbee commented Apr 17, 2021

Yes, it's the same API. There is no Shadow DOM here, you have full access to the iframe to call the API on it.

@AnmolChhabra98
Copy link
Author

@Garbee, I have tried to do that but that was so confusing for me to identify for my all videos. so I was thinking to use onClick event on my each video and tried to do that also. but didn't got any success my function got triggered when my video page is loaded and I was supposed to do it when my particular video is clicked. Can you please help me out in this ?

@paulirish paulirish changed the title How to move copy link icon to some other place. Move "copy link" icon -- drop the nocookie bit Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants