Android app - private viemo videos not playing - android

I'm currently developing an android mobile app. I see that private Vimeo videos are not playing. Check the attached screen shot. Also note that the android app is still on development mode and not uploaded to Google. Please help me in this regard.
Regards,
Niladri!
private vimeo video not playing

That picture appears to be accessing vimeo.com directly to view videos. At vimeo.com, private videos can only be viewed if you are logged in (which is unrelated to the API).
If you want to play a private video in your application you will need to follow one of the following workflows:
Embedded in a webview
Mark your video as hidden from vimeo, yet embeddable, in your video's settings
Make an API request to /videos/{video_id} and extract the embed code from the response body (response.embed.html)
Put the embed code in your webview's html
Played in the Native Player (Vimeo PRO only)
Mark your video with any privacy setting
Make an API request to /videos/{video_id}
Find the collection of video files (response.files)
Loop through the video files to find the best height and width for your target player
Load the link into your native player
You can read more about the Vimeo API at https://developer.vimeo.com/api, and https://developer.vimeo.com/api/endpoints

If you want to play private Vimeo videos of your Vimeo account in an Android Application then follow the steps below:
Go to your video privacy settings and mark it as hidden from Vimeo and embed anywhere.
Make an API request to this endpoint: https://api.vimeo.com/users/{your_user_id}/videos
Get the embed.html string from the API response.
Load embed.html obtained in the previous step into your WebView.
For Vimeo Android SDK: https://github.com/vimeo/vimeo-networking-java

You can retrieve the Video endpoint by calling an auth-enabled REST API and then play it using a player(I used Exoplayer in android).
Follow below steps:
API Registration: You will need an application registered with the Vimeo API. If you do not already have an application registered, you can do so here.
You can generate an access token in the Authentication tab once you select your app from the list here.
With this access token you'll be able to make any requests that the access token's scope allows. You will NOT be able to switch accounts if you only supply the access token.
Call rest API with the access token in the header like below
Endpoint:
https://api.vimeo.com/videos/{VIDEO_ID}
Header:
Authorization:bearer ACCESS_TOKEN
VIDEO_ID is the id of video uploaded to Vimeo(Some number eg: 45334535)
ACCESS_TOKEN is the token you got after API Registration
This steps worked for me. I hope this will help someone.

We have a special google's SDK for YouTube for instance. On the other side AOS does not support Adobe Flash. Maybe its just has an unsupported by AOS video codec used by vimeo service? That could be the reason why you cant watch vimeo videos via WebView/browser.
Did you check for Vimeo official Android SDK if such thing does exist at least?
Also check this
And a little suggest: try to use SO search and google - it helps in most cases :)

Related

Universal Music Player with own JSON and Youtube Audio Library

As mentioned in this line:
private static final String CATALOG_URL =
"http://storage.googleapis.com/automotive-media/music.json";
This file contains a list of tracks that are hosted by Google online.
So, I guess the complete URL of Jazz_In_Paris.mp3 would be
https://www.youtube.com/audiolibrary/music/Jazz_In_Paris.mp3
but getting 404 Not Found in a same way I have tried
https://www.youtube.com/audiolibrary/music/album_art.jpg
but again same result 404 Not Found
So here are my few small questions:
1. What is the complete URL of `Jazz_In_Paris.mp3` and `album_art.jpg`
2. Where they have used site object "site" : "https://www.youtube.com/audiolibrary/music" in application (in which class and where)
3. Where I have to make changes in my code, If I would like to get JSON from my own Server "http://www.domain.com/services/music.json"
4. How can I create my own Youtube Audio Library, Like in my Library I would like to add my favourite youtube songs
What is the complete URL of Jazz_In_Paris.mp3 and album_art.jpg
http://storage.googleapis.com/automotive-media/album_art.jpg
http://storage.googleapis.com/automotive-media/The_Messenger.mp3
Where they have used site object "site" : "https://www.youtube.com/audiolibrary/music" in application (in which class and where)
this url not used any where in app.
Where I have to make changes in my code, If I would like to get JSON from my own Server "http://www.domain.com/services/music.json"
yes, you can use same json for your app but just change path to your server(just create same json format)
How can I create my own Youtube Audio Library, Like in my Library I would like to add my favourite youtube songs
Universal Music Player: use Google storage client to store music files but you can also create own you tube channel and make private video. use it in your app
EDITED:
"site" json object is useless. this object is json because of previous version of app they have used that. currently not.
youtube channel and Google storage both are different thing. Google storage mainly used to store files which we are able to use in our app.
in you tube every one can upload video which is private/public(if you are going to use that in your app then use private). for more detail check you support articals
i suggest you to use Google Storage API or you can also upload files on your own server!

Chrome (Android) -- Casting authenticated HTML5 videos

Chrome (for Android) now overlays a Cast button on all HTML5 video content that it finds. The problem is that the content on our site requires authentication to view. Tapping the Cast button shows this toast:
"Unable to cast video due to site restrictions"
Is there a way to...
a) Provide the cast button with the necessary authentication params
and if not (a), then:
b) Provide a meta tag telling Chrome not to put a Cast button on our videos
We plan to provide Chromecast functionality in our Android app, but it's not done yet.
I think that you should add Access-Control-Allow-Origin: * to your CDN. look at this: https://developers.google.com/cast/docs/player check out the CORS Reference.
Works for me.

Android app cast HLS got error message No 'Access-Control-Allow-Origin'

I tried cast a m3u8 link to chromecast. But got below error message on debug page:
XMLHttpRequest cannot load http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.gstatic.com' is therefore not allowed access.
[cast.receiver.MediaManager] Load metadata error
I added below m3u8 link to the xml file from Google sample app "domocastplayer"
<media
imageUrl="http://peach.blender.org/wp-content/uploads/poster_bunny_small.jpg"
mimeType="application/x-mpegURL"
studio="Peach Open Movie Project"
title="u3m8 video"
type="movie"
url="http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8" />
Can I know where to set the Access-Control-Allow-Origin header? or am I need add extra file for this?
Your issue clearly states that gstatic.com is not allowed to access media placed on your server. So, to get it done you need to add gstatic.com as allowed domain(or add in white-list) on server-side configurations. Then you will be able to play media on chromecast.
Thanks
You appear to be trying to play a video hosted on the apple servers. Since they have CORS enabled, they have configured it to not allow your receiver to play that video. All modern browsers including Google Cast will enforce CORS: https://developers.google.com/cast/docs/player#cors

Find and manage all YouTube uploads by app

My app upload videos to YouTube using "direct upload".
I use version 3.
i need that after the user uploaded his video I (app owner) and the user will be able to manage the videos (delete or edit the video), all this through the website of YOUTUBE(At the entrance to the URL,video list appear ). Currently only the user can edit or delete his videos.
In addition user will find the videos (all videos uploaded by the app) by a URL (like a playlist) this list will Sort by views or by rating.
Maybe the answer is a playlist, or channel???, whether i will use channel or playlist the users Be allowed to add their videos to my playlist or to my channel? the users Be allowed to delete their video?
I received An answer, to my earlier questionbut, but I do not understand how categoryID is unique to my application?
According to YouTube v2.0 You can delete it if you have access token and developer key.
Like this:
DELETE /feeds/api/users/default/uploads/VIDEO_ID HTTP/1.1
Host: gdata.youtube.com
Content-Type: application/atom+xml
Authorization: Bearer ACCESS_TOKEN
GData-Version: 2
X-GData-Key: key=DEVELOPER_KEY
So deleting by user request is not a problem. Deleting by your own need to be tested, it depends if you can obtain application access token using some kind of app secret.
Parhaps YouTube API v2.0 - OAuth 2.0 Authorization will give you the answer.

Uploads videos to Youtube programmatically

I'm trying to upload video to youtube programmatically.
I tried with
YouTubeService service = new YouTubeService(clientID,developer_key);
service.setUserCredentials("email", "password");
But it throws ServiceException stating that com.google.gdata.util.AuthenticationException: Error connecting with login URI
How to proceed ?
It seems like you didn't set up your authentication.
I suggest to use Data API v3. Here's a great java UPLOAD example.
I also open sourced an Android upload example (YouTube Direct Lite) using ServiceIntent. Feel free to check it out.

Categories

Resources