bob-sims / ytPlayer

Simple cross-platform Alloy Widget for Titanium Mobile, plays streaming YouTube video with native Ti.Media.VideoPlayer
Other
43 stars 15 forks source link

User Agent needs updating #7

Open alexshive opened 10 years ago

alexshive commented 10 years ago

During runtime, I got an error for response.content['player_data']['fmt_stream_map']

Turns out the response is a redirect (most likely from a Youtube update)

A simple fix is updating the UserAgent to the following: Mozilla/5.0 (iPhone; CPU iPhone OS 7_1 like Mac OS X) AppleWebKit/537.51.2 (KHTML, like Gecko) Version/7.0 Mobile/11D167 Safari/9537.53

pbosma commented 10 years ago

This user agent only works on iphone 64bit and ipad 64bit simulator. The non 64bit iphone and ipad simulator returns an error (redirect). I have tried to set a bunch of older useragent strings found on iphone4 and iphone3 but all return an error (redirect). I havent been able to test this your suggested user agent on a non 64bit device. Anyone else having the same problems?

morefun0302 commented 9 years ago

I found using the android user agent in ios can solve the problem