Streaming Video From Vimeo to Android - android

I am looking for a way to stream my videos from vimeo.com to android phone, their API is only available for Web, I have also tried to embed their player in WebView but that way I can see the thumbnail but video won't play, I am using Android 2.2 and Have Flash Player installed.
Is there way to make embedded players work on android or any other better way to do it?

You don't have to use the adv api to play vimeo videos. This is the video url the oembed api uses. I managed to get this rendering and playing in webview.
http://player.vimeo.com/video/<VIDEO_ID_GOES_HERE>?player_id=player&title=0&byline=0&portrait=0&autoplay=1&api=1
Also worth checking flash player is enabled and installed

No you have to use the advanced api and have the user get authorized ive have been trying to find a way around this but have not
the real url would be something like this
http://player.vimeo.com/play_redirect?quality=mobile&clip_id=s00000000&time=1318531921&sig=4c8a2fcb3303c5b76112046e84f516f8&type=mobile_site
not
player.vimeo.com/video/0000000
which the sig is passed after your set up the oauth with the advanced api which is your key and secret after authorization

Related

Check if Chromecast can play video file

Our customers can upload videos to our servers, when they download our Android application they can play the videos amongst other features. One of them other features is being able to cast these videos to chromecast devices. When they tap to play a video our server sends over a url similar to:
https://xxxxx.net/dl/standard-user/xxx/video-xxx?mime=true
At the moment we are using LocalCast to stream the content to a chromecast, but we get the error:
This CheomeCast device does not support the video or cant access it.
We can definitely access it because our server only keeps healthy/working links. We want to add something into our code to see if the video is playable on ChromeCast if it is not playable on ChromeCast then we want to grey out the cast button for that particular video.
How would we check to see if the video is playable on ChromeCast? Client side that is. We want to check once the video url has been passed to the device.
We have searched online and searched Googles official documentation but cant seem to find enough information to solve the problem
Thanks all

Can i Use Vimeo Video streaming for Android Native video view instead of Webview?

I need to use a video streaming service provider for my application in web as well as Android Platform. So i have some questions regarding the video playback. Please help me to solve it.
1 . Is Vimeo video streaming compatible for android native video view instead of Webview? I need to support devices having OS version 4.0+.
2 . Vimeo will manage the quality of video corresponding to the network bandwidth? Such as if the network is very slow whether it will automatically switch to the less quality video without interrupting the playback.
3 . If Vimeo can't provide these features. Suggest any service providers for my Video streaming.
Thanks in Advance.
PRO users on Vimeo.com have access to the HLS links of their own videos. You can find these under the "files" key when requesting your own videos (such as /me/videos, or /videos/{video_id})

Playing videos in a browser cross device

I want to embed video's on our website that should work with these restrictions:
The video needs to start as soon as the user clicks on play. As far as I can tell this means that the video must be either streamed or it must use progressive downloads.
The video must not be downloadable by sending the link to other people.
The video must be protected against being viewed without being allowed to do so.
The video must work on all devices, also the ones that do not support flash such
as iOS and android
As a backend I use amazon cloudfront. So far we have used RTMP, but that obviously does not work for iOS or android devices.
What we’re planning to do is this:
For flash platforms we use RTMP with the amazon signed URL’s to prevent anyone to view the content.
For iOS we want to use HLS with a generated m3u8 file that contains signed URL’s to the TS files
For Andoid devices I'm not yet sure what to use.
My questions are these:
Is this a viable setup, or are is there a superior setup that ticks all the boxes?
What should we use for the android case?
I would suggest, use pre-signed hls/m3u8 for both ios and flash.(https://github.com/mangui/HLSprovider). For Android you can use normale html5 video streams with quality selection (signed URLs of course).
For Android you have to use RTSP protocol.
Wowza media server is the perfect solution for you.

Youtube video blocked on mobile bypass

Is there anyway to bypass the blocked videos on mobile? First I tried to fire up normal youtube intent, then I used WebView (using both video and iframe tags), and lastly I changed the user agent of WebView to a desktop client but none of the above mentioned way worked. I tried rtsp to stream the video using VideoView but it would only give me a low quality 3gp video, which is what Youtube API gives.
I am running out of options. Any help would be highly appreciated.
Thanks!
I ran into the same thing with some of our videos on YouTube and found out that only YouTube controls if it will be allowed to show on a mobile. We never found a work-around for it other than hosting the video on our server or using Vimeo. But as it stands,YouTube has control over mobile viewing. Also do you have that video monetized? Monetizing a video on YouTube can also cause them to not allow it on mobile especially if it has any content that YouTube is saying is a Third Party or Copyright infringement. They told us we had third party content when it was all shot by us. Further reading in that problem showed that YouTube's new digital fingerprint is the main culprit for creating a new wave of problems for users trying to upload their own videos they made and own. i.e., a user tried to upload a video of his backyard with birds in it and the birds were singing. When he tried to upload it, YouTube said it was Copyrighted! How do you Copyright bird chirps everyone is now asking!
So try Vimeo or use your own server to deliver the content. Sorry I can't offer more help.
I remember being able to bypass the block as a user by asking the desktop version of the YouTube site and then watching the video with the (not updated anymore) Flash Player for Android. So maybe you could try pretending to be the Flash Player when asking for the video from your app. Maybe use a network sniffer to see what it's doing.
User "OMA" gave an answer (use 'Desktop Mode'), that sometimes works and is easy to try.
Next up is this Site (or a similar one): http://www.mobileyt.com/ which accepts an URL, then shows your Video.
A Proxy Server might assist you with access, particularly if it is a 'Country Restriction' (for Mobile, but does not mention the Country Restriction only the Mobile one). Any ADs served to that Country may be poorly received (Language / Customs); so it is blocked.
You can try a Spoofing Application for your Mobile Browser (Hint: Spoof you Browse with the Opera Browser OR use Explorer 10 on WinXP they won't be ready for that).
Combining those techniques can assist in difficult cases. You can also resort to downloading the Video and playing it with MX Player or VLC (for Mobile).
Good luck, and if at first you don't succeed ...

Playing youtube video in Android app

In my Android app I'd like the user to tap an image once, have a youtube video play automatically and when the video is done the user is immediately returned to the app. What's the best way to do this in Android?
I tried using intents. This works in that the video comes up on what I think is a youtube web page. However playing the video requires another tap. I'd like to avoid this if possible.
I tried the whole MediaPlayer, prepareAsync, setOnPreparedListener and never got it to work. For some reason onPrepared was never called. No exceptions were thrown. I'm using the emulator to test and I'm new to Android so I'm not sure if the behavior will be different on physical devices.
I got this working well on iOS by getting creative with webviews. I'm hoping it's more straightforward on Android. The docs sure make it sound straight forward.
Cheers!
Update: Everything below is still correct, but the official YouTube API for Android is now available.
By far, the easiest way to play a YouTube video on Android is to simply fire an Intent to launch the native Android YouTube app. Of course, this will fail if you are not on a certified Google device, that doesn't have the complement of Google apps. (The Kindle Fire is probably the biggest example of such a device). The problem with this approach is that the user will not automatically wind up back at your app when the video finishes; they have to press the Back button, and at this point you've probably lost them.
As a second option, you can use the MediaPlayer API to play YouTube videos. But there are three caveats with this approach:
1) You need to make a call to YouTube's GData webservice API, passing it the ID of the video. You'll get back a ton of metadata, along with it the RTSP URL that you should pass to MediaPlayer to play back an H.264-encoded stream. This is probably the reason why your attempt to use MediaPlayer failed; you probably weren't using the correct URL to stream.
2) The GData/MediaPlayer approach will only play back low-resolution content (176x144 or similar). This is a deliberate decision on the part of YouTube, to prevent theft of content. Of course, this doesn't provide a very satisfactory experience. There are back-door hacks to get higher resolution streams, but they aren't supported on all releases of Android and using them is a violation of YouTube's terms of service.
3) The RTSP streams can be blocked by some internal networks/firewalls, so this approach may not work for all users.
The third option is to embed a WebView in your application. There two approaches you can take here:
1) You can embed a Flash object and run the standard desktop Flash player for YouTube. You can even use the Javascript API to control the player, and relay events back to the native Android app. This approach works well, but unfortunately Flash is being deprecated on the Android platform, and will not work for Android 4.1 and later.
2) You can embed a <video> tag to play YouTube via HTML5. Support for this varies between various releases of Android. It works well on Android 4.0 and later; earlier releases have somewhat spotty HTML5 <video> support. So, depending upon what releases of Android your application must support, you can take a hybrid approach of embedding HTML5 on Android 4.x or later, and Flash for all earlier versions of Android.
There are several threads here on StackOverflow about using HTML5 to play YouTube video; none of them really describe the entire process you must follow in one place. Here's links to a few of them:
Android - How to play Youtube video in WebView?
How to embed a YouTube clip in a WebView on Android
Play Youtube HTML5 embedded Video in Android WebView
All of this will get dramatically easier in the weeks/months to come; at Google I/O 2012, they presented/demoed a new YouTube API for Android that will support direct embedding of YouTube content in your application, with full support back to Android 2.2 (about 95% of the Android userbase as of this writing). It can't arrive fast enough.

Categories

Resources