getting error “There was a issue with network [400]” while playing You tube video

回眸只為那壹抹淺笑 提交于 2019-12-24 02:47:06

问题


I am playing you Tube video using Android You tube API. Some of the URL are working fine but in some URL i found error message on screen saying "There was a problem with network [400] Tap to retry". Internet is connected.Please help me out. Thanks in advance.


回答1:


This link, Your solution.

I think Give ONLY the YouTube ID and not the entire YouTube URL to the loadVideo() function.

UPDATE:

if you want jump to a specific time in the video.

The API provides two methods to jump playback:

seekToMillis() – Seeks to the specified time in the video.

seekRelativeMillis() – Seeks forward or backwards by the specified number of seconds.

More info here




回答2:


Just remove the **https://www.youtube.com/watch?v=**gNRN7lUU3tM from the url and only give gNRN7lUU3tM as url to the youtube player. It will work fine



来源:https://stackoverflow.com/questions/41843919/getting-error-there-was-a-issue-with-network-400-while-playing-you-tube-vide

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!