Youtube player support fragment no longer working on Android studio 3.2 (androidx)
Just use transaction.replace. Ignore the error, it’ll work. Google hasn’t refactored youtube api library to androidx yet.
Just use transaction.replace. Ignore the error, it’ll work. Google hasn’t refactored youtube api library to androidx yet.
The channels#list method will return a JSON with some information about the channel, including the playlist ID for the “uploads” playlist: https://www.googleapis.com/youtube/v3/channels?part=contentDetails&forUsername=OneDirectionVEVO&key={YOUR_API_KEY} With the playlist ID you can get the videos with the playlistItems#list method: https://www.googleapis.com/youtube/v3/playlistItems?part=snippet&playlistId=UUbW18JZRgko_mOGm5er8Yzg&key={YOUR_API_KEY} You can test those at the end of the documentation pages.
UIWebView and MPMoviePlayerController are not available for tvOS. Our next option is to use AVPlayer to play YouTube videos. AVPlayer cannot play a YouTube video from a standard YouTube URL, ie. https://www.youtube.com/watch?v=8To-6VIJZRE. It needs a direct URL to the video file. Using HCYoutubeParser we can accomplish exactly that. Once we have the URL we need, … Read more
Certain videos have a domain-level whitelist or blacklist applied to them. This is done at the discretion of the content owner. If there is a whitelist or a blacklist, and the domain of the embedding site can’t be determined (perhaps because of there not being a real referring domain in the case of your native … Read more
To obtain the channel id you can view the source code of the channel page and find either data-channel-external-id=”UCjXfkj5iapKHJrhYfAF9ZGg” or “externalId”:”UCjXfkj5iapKHJrhYfAF9ZGg”. UCjXfkj5iapKHJrhYfAF9ZGg will be the channel ID you are looking for.
YouTube Data API v3 results are paginated. So you need to get the next page of results for the others. Basically in the response you have nextPageToken. To get the remaining results, do the same exact call but setting pageToken into that token you received.
You can do this by using search.list and specifying the channel ID, setting the type to video, and setting eventType to live. For example, when I searched for: https://www.googleapis.com/youtube/v3/search?part=snippet&channelId=UCXswCcAMb5bvEUIDEzXFGYg&type=video&eventType=live&key=[API_KEY] I got the following: { “kind”: “youtube#searchListResponse”, “etag”: “\”sGDdEsjSJ_SnACpEvVQ6MtTzkrI/gE5P_aKHWIIc6YSpRcOE57lf9oE\””, “pageInfo”: { “totalResults”: 1, “resultsPerPage”: 5 }, “items”: [ { “kind”: “youtube#searchResult”, “etag”: “\”sGDdEsjSJ_SnACpEvVQ6MtTzkrI/H-6Tm7-JewZC0-CW4ALwOiq9wjs\””, “id”: { “kind”: … Read more
You can make YouTube videos responsive with CSS. Wrap the iframe in a div with the class of “videowrapper” and apply the following styles: .videowrapper { float: none; clear: both; width: 100%; position: relative; padding-bottom: 56.25%; padding-top: 25px; height: 0; } .videowrapper iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } … Read more
You need to look at the YouTube Data API. You will find there documentation about how the API can be accessed. You can also find client libraries. You could also make the requests yourself. Here is an example URL that retrieves the latest videos from a channel: https://www.googleapis.com/youtube/v3/search?key={your_key_here}&channelId={channel_id_here}&part=snippet,id&order=date&maxResults=20 After that you will receive a JSON … Read more
I believe it is when the video was last updated. I don’t think it has to do with the user logging in.