rborn / TitaniumYoutubePlayer

Play youtube directly in your app
42 stars 16 forks source link

iOS bad response data #4

Closed ilseferman closed 10 years ago

ilseferman commented 10 years ago

it works great on Android but i try this on iOS and it give me an error

------>cannot retrieve video

{ backtrace = "#0 () at :0"; line = 31; message = "'undefined' is not an object (evaluating 'video.encrypted_id')"; name = TypeError; sourceId = 296995392; sourceURL = "file:///Users/ilse/Library/Application%20Support/iPhone%20Simulator/7.0.3/Applications/65AD1F36-762B-48A8-BFC7-88CAECCFE61C/Bebeleche.app/get_yt_clip.js"; }

rborn commented 10 years ago

What video are you trying to play?

ilseferman commented 10 years ago

This is the id of the video

CbZlXiXKWTk

rborn commented 10 years ago

weird, the json returns an error

{"result": "error", "build_signature": "es:901812,902022,902907,906001,906945,906955,911427,911507,912715,913434,916612,919389,919811,920605,921080,921410,921905,922804,923440,924420,927006,927303,927304,927704,929505,931943,931952,932002,932101,932262,932804,934003,934004,934507,935704,936118,936331,936702,936910,936913,937003,937416,937417,937419,937801,937805,937902,938617,938626,938636,939201,939929,939934,940312,940905,944702,945009", "content": {}, "errors": ["No se ha encontrado el v\u00eddeo."], "conn": "wifi", "signed_in_username": "", "build_id": 0}

Can this video be displayed in mobile apps? I mean does it have the permissions to run on mobile devices?

ilseferman commented 10 years ago

I test with the id of the sample and give me the same error 8CX82uT7A9Y

the User-Agent will have something to do with it?

rborn commented 10 years ago

Might be, but I'm using another user agent and it gives the same error

    'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 5_0 like Mac OS X) AppleWebKit/534.46 (KHTML, like Gecko) Version/5.1 Mobile/9A334 Safari/7534.48.3'

however in the app I use this script it works just fine :|

ilseferman commented 10 years ago

it works, i change the user agent and it works

also for ios is important to test it on a real divice an not in the emulator

rborn commented 10 years ago

thanks for letting me know :)