Closed campoy closed 10 years ago
I'm going to merge this by hand, but in a few smaller chunks: first just the patch for the HTML5 player, then the large patch splitting out the javascript. I'm also going to keep it on the Go runtime for now.
If I move the video list into the code, then RSS support ( https://github.com/dgryski/gophervids/issues/11 -- an oft requested feature) becomes easier.
Some advice: use JSHint and some kind of prettifier. That way it will feel "almost" like writing Go with gofmt :)
Ug, cross-origin javascript security blah blah blah. This is probably why I went with the flash stuff in the first place :(
What is the problem you're seeing exactly?
Testing on my digital ocean box, serving up the index.html over https and setting Access-Control-Allow-Origin, but Chrome tells me:
Uncaught SecurityError: Blocked a frame with origin "https://www.youtube.com" from accessing a frame with origin "https://<snipped>:8080". Protocols, domains, and ports must match.
Also, it seems like it has to be served over https since youtube wants to serve stuff to Chrome over https. Chrome will probably talk to appengine over https, but I'm not sure about FF, Opera, etc..
I can't reproduce it on App Engine :-/
Solved. I missed that there were changes to the javascript above and beyond just ripping it out of the html file.
Ok, I think I've merged all the bits of this.
Thanks for your help!
What about moving the video list into a JSON file?