hypothesis / via

Proxies third-party PDF files and HTML pages with the Hypothesis client embedded, so you can annotate them
https://via.hypothes.is/
BSD 2-Clause "Simplified" License
19 stars 7 forks source link

Youtube for everyone #1181

Closed dwhly closed 11 months ago

dwhly commented 11 months ago

What will it take for us to implement Youtube annotation for everyone through... .via?

seanh commented 11 months ago

You can test this out now at https://qa-via.hypothes.is/, just paste in a YouTube URL. All we have to do to enable it on production is flip the switch

robertknight commented 11 months ago

It was also necessary to provision an API key for this. For future reference API keys are managed under the lms-youtube project in the Google API console.

I have provisioned a key for "Via production" in the same project, using the same settings as the API keys. I did a quick test of flipping the switch, specifically the YOUTUBE_TRANSCRIPTS feature flag in the via-prod Elastic Beanstalk environment, this morning and verified that it works. On a technical level to enable this in Via all we need to do is change this value to true.

robertknight commented 11 months ago

Some considerations we might want to think about:

  1. The inconsistency of experience between the browser extension and Via when you use a YouTube video URL. In the browser extension you annotate the page. In Via you annotate the transcript.
  2. How should the bouncer service handle annotations on YouTube videos?

A suggestion @dwhly had re (1) is that the browser extension would show a banner when you attempted to annotate a YouTube video URL using the extension, and that banner would offer to redirect to Via.

A possible solution for (2) is that we check if the annotation was made on the transcript, and redirect to Via if it was. This can be done by checking for the MediaTimeSelector selector in the annotation's target[0].selector field, and if so always redirect to Via. For Page Notes there is currently nothing on the annotation which indicates whether the annotation was made on the original page or the transcript.

robertknight commented 11 months ago

Following a discussion on today's dev sync, YouTube video annotation has now been turned on in the public Via instance. We haven't done any kind of announcement for this yet, so it is a soft launch.

Example: https://via.hypothes.is/https://www.youtube.com/watch?v=QqsLTNkzvaY