mozilla / popcorn.webmaker.org

RETIRED
https://blog.mozilla.org/foundation-archive/mozilla-learning/product-update-for-appmaker-and-popcorn-maker/
MIT License
146 stars 116 forks source link

YouTube in makes don't work #611

Closed secretrobotron closed 9 years ago

secretrobotron commented 9 years ago

Some video content in Popcorn makes has stopped working properly (e.g. https://nazareth.makes.org/popcorn/2pue).

@ScottDowne thinks this is due to an API change.

@simonwex can you advise here? What kind of priority should we put behind maintenance like this?

ScottDowne commented 9 years ago

It's YouTube v2 data API being deprecated. Not new to my radar, happened awhile ago.

It's a two part problem, because we use the v2 API in two areas, and both require different things to properly fix it.

  1. Existing projects with YouTube videos don't work because we get the clip's duration via the data API vs setting up a whole buffered video embed. This is a bug in popcorn and not popcorn maker.
  2. Adding new projects also use the data API for the media gallery, to get things like thumbnail, linkbacks, search results, title, etc. This is a bug in popcorn maker.

The v3 data API has rate limited and API keys. Also should be done server side. That can work for popcorn maker media gallery but is a bit more work than I think is worth fixing.

The popcorn js bug cannot use v3 because it's a client side lib, so it's forced to rely on the embed. This is a bit slower but still kinda works, starts to get bad with a lot of clips sequenced together.

Popcornjs already has the fix, community fixed it. I have not bother to implement and test the new popcornjs version in popcorn maker because it doesn't seem worth it without doing the above fix too.

I'm fine with fixing this, would take a couple days. Although the rate limiting concerns me a lot. My experience with github's API is you hit thousands of calls very quickly (less than an hour) when getting any significant amount of data. If that's the case for this, we would need to redesign the media gallery or limit the searches to certain words so we can cache searches. Or try other things that I have not thought of yet.

ScottDowne commented 9 years ago

Something up with Jenkins, but the fix is merged, just need to test it on staging.

ScottDowne commented 9 years ago

Playback should be fixed now. Closing.