android-youtube-api

Is there any way to change the quality of the video?

倖福魔咒の 提交于 2019-12-09 01:45:34
问题 I am looking at the android youtube API docs and the sample applications. I cannot find any API that describes loading a video and setting its quality (to low or high). Is there a way to change the quality of a video? Android-youtube-api 回答1: I'm looking for the same thing ;-) Unfortunately, there is no method in the Android YT API to do that... There is a function in the Youtube IFrame API See: Playback Quality in IFrame Player So the workaround is to use an IFrame associated with an Android

UNIQUE constraint failed when trying to share video via intent

不羁的心 提交于 2019-12-08 19:58:27
Hey I'm trying to develop an app which would allow users to share video files. Whenever I try to share the same video file for the second time I get constraint failed error 11-21 20:46:47.103 1076-4528/? E/SQLiteDatabase﹕ Error inserting bucket_id=-1634214109 date_modified=1448138795 datetaken=1448138795000 bucket_display_name=.estrongs parent=894 format=12299 storage_id=131073 media_type=3 mime_type=video/mp4 _size=1235266 title=video1 _data=/storage/sdcard1/.estrongs/video1.mp4 date_added=1448138807 _display_name=video1.mp4 android.database.sqlite.SQLiteConstraintException: UNIQUE constraint

Is there any way to disable “Watch Next” block at the end of video using YouTube Android Player API?

早过忘川 提交于 2019-12-08 19:36:26
In my app I'm using YouTube Android Player API library from here https://developers.google.com/youtube/android/player/ I have a fragment that extends YouTubePlayerFragment. All works fine, but I need to make some improvements to app. At the end of some videos I see block "Watch Next" with the link to another video, so I'm curious - does we have a possibility to disable this feature? I created another solution using WebView, and display video using it - in this case I'm able to turn off any other additional links using "rel=0" in video url, but I want to use native solution. Any ideas? Thanks

“href” value in HTML to open video in youtube app or market (Google Play) on Android

时光怂恿深爱的人放手 提交于 2019-12-08 17:32:08
问题 I'm making a Web Page that shows 360 videos, but i recently noticed that 360 functionality in the android browser is not supported, and because of this the video wont shows correctly, so after searching a lot i found that the best option is to try to open the video in the YouTube app making use of an "Android Intent" explained in this developer tutorial: https://developer.chrome.com/multidevice/android/intents So i need to construct the href address for a YouTube video, but unfortunately i

Android - Playing Youtube Videos using Youtube Player API in ListView

左心房为你撑大大i 提交于 2019-12-08 14:08:36
问题 I have tried using WebViews to display Youtube Videos in ListView, what happens is when i scroll off screen and back to the cell the Video was located the Video disappears meaning that the WebView does not render back the WebView with the Video in it. So i tried using YoutubePlayerAPI but i am finding it difficult to understand how i can insert these Videos using the YoutubePlayerAPI. Could someone please advise? I have tried using YoutubePlayerView in my ArrayAdapter but i get Inflate errors

Video link of unlisted youtube video

狂风中的少年 提交于 2019-12-08 12:25:38
问题 I am developing an android application that streams and shows a couple of videos. Instead of storing videos on my server, I thought uploading them to youtube as unlisted , and getting them from youtube is a great idea. After getting the video, I want to show them in default android video player, not in youtube app or web view. I don't have any problem when I put videos in my server (for example www.mysite.com/video.mp4), but is there any way to get the url of a youtube video? 回答1: You can

YoutubePlayerView goes black when i scroll down inside recyclerView

流过昼夜 提交于 2019-12-08 12:04:39
问题 I have a recyclerview that will show all videos from youtube. i'm using YoutubePlayerView to display it. The problem is everytime i scrolls down half screen the current video screen goes black and will not load anymore. The videos will load just fine if i don't scroll half screen Anybody know about this behavior? 回答1: The YoutubePlayerView has to be fully visible, otherwise the video gets stopped. Since you are putting it in a recyclerview part of the YoutubePlayerView is not fully visible

YouTube Player Support Fragment crashes when user selects to view in full screen

南楼画角 提交于 2019-12-08 09:25:55
问题 I have implemented YouTubePlayerSupportFragment API inside my own fragment instead of in an activity. The video does play normally, but when the user selects to view the video in full screen from YouTube's provided media controls, the app orients to landscape, shows a black loading screen and then immediately crashes. ExpandedItem.layout <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res

YouTube Client on Android having a java.lang.NullPointerException

那年仲夏 提交于 2019-12-08 07:57:53
问题 Now I know the problem but still no idea how to resolve it, the resquest is rejected by google instead of the fact that I renewed the key, and it was working before, now it gives me this error: ipRefererBlocked : "message": "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed." the list

Android WebView Responsive Youtube not playing

ε祈祈猫儿з 提交于 2019-12-08 07:54:37
问题 I have a very basic WebActivity that serves up a page that has the styling of CSS .video-container { position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden; } .video-container iframe, .video-container object, .video-container embed { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } Next, edit add some HTML around your embed code. HTML <div class="video-container"><iframe width="853" height="480" src="https://www.youtube.com/embed/xxxxxx"