2014-07-25, 21:27
(2014-07-25, 18:52)spoyser Wrote:(2014-07-25, 13:00)cruise Wrote: EDIT: Okay - new working version. Tricksy hobbits!
http://casual-tempest.net/files/YouTubePlayer.py
Nice job!
Any chance you can point out the changes you had to make, to fix it?
A new array operation, "splice", that wasn't currently translated into it's python equivalent, and use of an existing function (reverse) in a situation where the existing translation didn't work. So a few new lines added to _jsToPy basically.
(2014-07-25, 20:40)MediaPi Wrote: Also thanks for putting in the extra effort for a permanent fix. If you was succesful, does it mean that we can get 1080p? from the sounds of what you wrote we will have the same quality playback as a browser will....?
No, that's a completely different part of the process, sadly (at least as far as I'm aware).
The current issue is videos with adverts, such as Vevo, require a "signature" to play - and this is encoded using javascript. We have to reverse engineer the encoding into Python to figure out the un-encoded value so that we can play the video. And it's basically an arms race between us and the people at YouTube as they invent ever more obscure things to do in javascript to break our translation into Python. Which is why every so often we have to extend it to cope with the new method.
What I'm trying to achieve is to avoid the necessity to translate the javascript into python - by running the decoding natively in javascript, there's nothing they can add that would break it for us that wouldn't also break it for the browser.