webpage not available
vanderleisp opened this issue · comments
hi and thanks for this interesting, simple and clean fast access to the Youtube, plus being a very good "module" to the Angular package.
I tested it here using the Firefox browser and it works fine, and with either Opera or Chrome it didn't work if I run the index.html as a ///file and not as a localhost.
As the goal is to use it in a mobile, and for that I'm playing with Titanium to package it as an HTML inside an webview, then what I'm getting here is that using the Titanium 3.2.0 SDK it's running smoothly, meaning starting, then selecting video and playing it well, but right after you select the video that you'll play, and before its page shows up it's showing a message that can't find a webpage at /Resources/HTML/app/%7B%7Bvideo.embedurl%7D%7D so then I have to click "back" and it goes to the file's page and lay it well, but always this message pops up before the player.
I checked this and it's inside the view.js file, so now I'm trying to understand why this happens inside a webview and not in the browser (or it's something related to the way that Titanium pack things), so any idea/help to fix this ?
Well, as far as I know, using file:// won't work because the AJAX requests to YouTube's gdata API use http:// and you can't make ajax requests from one protocol to the other. See http://stackoverflow.com/questions/3397644/jquery-running-ajax-locally-without-a-webserver
That's probably the problem you're having. As for a fix, just try and figure out how everyone else is doing AJAX with Titanium. I'm sure it's possible (it has to be) so look into that as a starting point.
thanks for info, and I'll check about this AJAX issue on Titanium.
But one curiosity is that this message shows up after selecting one video, then if I click close then window close and goes to the right screen with the video to play... and then I play it correctly, so at the end it's working but at first moment shows this error message.
Also running the index.html file as file:// on Firefox works without problem, but then on other browsers this problem also shows up.