Comments (30)
Same here!
I've been using the same code for 3-4 months now without any problems and
didn't change anything to the code. Since a few days i'm getting the "Error
(1,-1004)" error.
Original comment by [email protected]
on 30 Sep 2012 at 1:03
from android-youtube-player.
I've been having trouble for a few days now. I get the error message "this
video can't be played".
Original comment by [email protected]
on 30 Sep 2012 at 6:11
from android-youtube-player.
fix:
VideoStream.java (Line: 30)
change: mUrl = lArgMap.get("url");
to: mUrl = lArgMap.get("url") + "&signature=" + lArgMap.get("sig");
Original comment by [email protected]
on 30 Sep 2012 at 6:37
from android-youtube-player.
Adding the signature parameter to mUrl worked a few days ago (I used it in my
own app) but it does not work anymore, so we will all have to keep digging.
Original comment by [email protected]
on 3 Oct 2012 at 12:44
from android-youtube-player.
Hi, the above fix did not work for me. (mUrl = lArgMap.get("url") +
"&signature=" + lArgMap.get("sig");)
Original comment by [email protected]
on 3 Oct 2012 at 12:46
from android-youtube-player.
guys i think the fix is woking, just re-test it again to make sure:
mUrl = lArgMap.get("url")+ "&signature=" + lArgMap.get("sig");
Original comment by [email protected]
on 3 Oct 2012 at 7:48
from android-youtube-player.
Retested. Definitely not working for me. Did it work for you?
Original comment by [email protected]
on 3 Oct 2012 at 3:34
from android-youtube-player.
Not working for me too.
Original comment by [email protected]
on 4 Oct 2012 at 6:05
from android-youtube-player.
I've tested above solution, its working for me!!
Thanks!
Original comment by [email protected]
on 5 Oct 2012 at 7:35
from android-youtube-player.
[deleted comment]
from android-youtube-player.
s20021, are you sure? What did you do exactly? A reply would be most helpful to
a lot of people. Thanks
Original comment by [email protected]
on 5 Oct 2012 at 11:48
from android-youtube-player.
Can anyone upload the fix?
Thanks.
Original comment by [email protected]
on 5 Oct 2012 at 3:20
from android-youtube-player.
Hi, the solution above, sometimes work, but sometimes try 2 or 3 times it work.
Original comment by [email protected]
on 6 Oct 2012 at 5:16
from android-youtube-player.
[deleted comment]
from android-youtube-player.
Same issue with youtube player api use
I've been using the same code and didn't change anything to the code. Since a
few days i'm getting the "Error (1,-1004)" error.
please help me.
Original comment by [email protected]
on 8 Oct 2012 at 6:32
from android-youtube-player.
This fix seems to be working for me.
How the heck did you figure this out? Props.
Original comment by [email protected]
on 8 Oct 2012 at 6:09
from android-youtube-player.
hai all,
Again video is not playing please help me...
Original comment by [email protected]
on 11 Oct 2012 at 1:11
from android-youtube-player.
Youtube has been banned in my country.. can't even check... please post a 100%
working solution...
Original comment by [email protected]
on 12 Oct 2012 at 9:55
from android-youtube-player.
It does not seem to be fixed through signature..
Is there any other solution?
Original comment by [email protected]
on 13 Oct 2012 at 7:50
from android-youtube-player.
[deleted comment]
from android-youtube-player.
i think it is under youtubeutility.java
Do we have to install the latest version of youtube activity ?
Original comment by [email protected]
on 15 Oct 2012 at 12:23
from android-youtube-player.
sorry its VideoStream.java
Original comment by [email protected]
on 15 Oct 2012 at 12:59
from android-youtube-player.
i'm getting a 1,403 error, and i can't play the video.
Original comment by [email protected]
on 19 Oct 2012 at 8:05
from android-youtube-player.
for people saying that it does not work, did you tried below fix:
go to class: VideoStream.java
change: mUrl = lArgMap.get("url");
to: mUrl = lArgMap.get("url")+ "&signature=" + lArgMap.get("sig");
If yes what is your device and what is your country ... because it is work with
me.
Original comment by [email protected]
on 19 Oct 2012 at 8:48
from android-youtube-player.
my country is the netherlands, and i'm using a samsung galaxy S2, and i've
tried chaning the code but it didn't help
Original comment by [email protected]
on 19 Oct 2012 at 11:54
from android-youtube-player.
UK, Galaxy S2 same problem. Updated code as it says. Same issue. For those whom
it worked for, can you not upload your version for us to try?
Original comment by [email protected]
on 19 Oct 2012 at 5:19
from android-youtube-player.
I had to make a few additional fixes to correct the URL. I changed
VideoStream:26:
From:
lArgMap.put(lArgValStrArr[0], lArgValStrArr[1]);
To:
String value = lArgValStrArr[1];
if (value.startsWith("http")) {
value = value.replace("---", ".");
value = URLDecoder.decode(value);
}
lArgMap.put(lArgValStrArr[0], value);
As mentioned above, the signature is also required on line 30:
From:
mUrl = lArgMap.get("url");
To:
mUrl = lArgMap.get("url") + "&signature=" + lArgMap.get("sig");
This appeared to work on all devices; I tested from 2.3 up.
Original comment by [email protected]
on 24 Oct 2012 at 10:07
from android-youtube-player.
still not working
this is my videostream:
/**
* Construct a video stream from one of the strings obtained
* from the "url_encoded_fmt_stream_map" parameter if the video_info
* @param pStreamStr - one of the strings from "url_encoded_fmt_stream_map"
*/
public VideoStream(String pStreamStr){
String[] lArgs=pStreamStr.split("&");
Map<String,String> lArgMap = new HashMap<String, String>();
for(int i=0; i<lArgs.length; i++){
String[] lArgValStrArr = lArgs[i].split("=");
if(lArgValStrArr != null){
if(lArgValStrArr.length >= 2){
String value = lArgValStrArr[1];
if (value.startsWith("http")) {
value = value.replace("---", ".");
value = URLDecoder.decode(value);
}
lArgMap.put(lArgValStrArr[0], value);
}
}
}
mUrl = lArgMap.get("url") + "&signature=" + lArgMap.get("sig");
}
public String getUrl(){
return mUrl;
}
}
my string:
Uri uri = Uri.parse(URL);
String videoId = uri.getQueryParameter("v");
Intent lVideoIntentd = new Intent(null, Uri.parse("ytv://"+videoId), this, OpenYouTubePlayerActivity.class);
startActivity(lVideoIntentd);
}
my URL String: public static final String url =
"http://www.youtube.com/watch?v=MkT2wW3-1jQ";
can anyone help?
Original comment by [email protected]
on 14 Nov 2012 at 1:47
from android-youtube-player.
I have an HTC EVO and have no problem playing the videos.
I recently got a Samsung Galaxy S iii and videos can't be played when WiFi is
off and using 3G. However, when WiFi is connected, then it works!! Anyone with
same issue and suggestion on how to fix??
Original comment by [email protected]
on 28 Nov 2012 at 2:50
from android-youtube-player.
OpenYotubeActivity.java needs to be corresponded to LTE.
I used a customized Activity class in order to correspond LTE network type as
follows.
------- OpenYotubeActivity.QueryYouTubeTask#doInBackground(YouTubeId...
pParams) ---------
WifiManager lWifiManager = (WifiManager) cxt.getSystemService(Context.WIFI_SERVICE);
TelephonyManager lTelephonyManager = (TelephonyManager) cxt.getSystemService(Context.TELEPHONY_SERVICE);
////////////////////////////
// if we have a fast connection (wifi or 3g), then we'll get a high quality YouTube video
if( (lWifiManager.isWifiEnabled() && lWifiManager.getConnectionInfo() != null && lWifiManager.getConnectionInfo().getIpAddress() != 0) ||
( (lTelephonyManager.getNetworkType() == TelephonyManager.NETWORK_TYPE_UMTS ||
/* icky... using literals to make backwards compatible with 1.5 and 1.6 */
lTelephonyManager.getNetworkType() == 9 /*HSUPA*/ ||
lTelephonyManager.getNetworkType() == 10 /*HSPA*/ ||
lTelephonyManager.getNetworkType() == 8 /*HSDPA*/ ||
lTelephonyManager.getNetworkType() == 5 /*EVDO_0*/ ||
lTelephonyManager.getNetworkType() == 6 /*EVDO A*/ ||
lTelephonyManager.getNetworkType() == 13 /*LTE*/) // <--- Add!!
&& lTelephonyManager.getDataState() == TelephonyManager.DATA_CONNECTED)
){
lYouTubeFmtQuality = "18";
-------------------
Original comment by [email protected]
on 29 Nov 2012 at 10:20
from android-youtube-player.
Related Issues (20)
- Video crashes after 30 min
- Patch for /trunk/OpenYouTubeActivity/src/com/keyes/youtube/VideoStream.java
- Audio is playing in the background but no video
- Hidden constructor called more than once per process!
- Video CannotPlay HOT 1
- Can't play this vide
- progress bar can't moving without touching screen or control
- Error playing youtube video HOT 1
- Patch for /trunk/OpenYouTubeActivity/src/com/keyes/youtube/VideoStream.java
- OpenYouTubePlayerActivity not found !!
- MP4 video can not play from SD Card on VideoView in Google TV OS
- Android 4.3 UP + Fullscreen Video View HOT 8
- Like and Dislike buttons not appearing on player
- Android TV (ADT-1) YouTubePlayerFragment does not works
- Patch for /trunk/OpenYouTubeActivity/src/com/keyes/youtube/OpenYouTubePlayerActivity.java
- Patch for /trunk/OpenYouTubeActivity/src/com/keyes/youtube/OpenYouTubePlayerActivity.java
- Patch for /trunk/OpenYouTubeActivity/src/com/keyes/youtube/OpenYouTubePlayerActivity.java
- Patch for /trunk/OpenYouTubeActivity/src/com/keyes/youtube/OpenYouTubePlayerActivity.java
- Video fails to load on Nexus devices running on Android 5.1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-youtube-player.