VideoView Uri redirection - java

I'm displaying video from an IP camera, with videoviews. I have an API wich redirects my HTTP link to a RTSP link. When I was using the RTSP link, no problem, I could display the video.
But now that I tried to use the HTTP link (that works in Chrome or Safari), my application can't display the video. I think it comes from the Uri.parse(url), because I don't parse the URL that comes after my HTTP link.
Do anyone has an idea about that problem?

Related

How to upload and receive an image to an API in Android Studio

I'm trying to implement an Android app that uploads an image taken by the user to an API which removes the image's background, and sends it back to the Users device.
Here is the API for more info. I'm trying to send a jpeg image and receive the image as a jpeg aswell.
The API docs state that the POST request has to be multipart/form. I don't have any experience on making API calls using Volley and was wondering if any one could help me figure out how to do it. Thanks in advance.

How to play .ts live tv link in exoPlayer

I am trying to develop a TV app
I have a problem
I can't run the link of satellite channels in ExoPlayer
#EXTINF:
http://raoseditor.com:80/live/GLGhcHsrLV/LD5bWcpAaM/151092.ts
You can check for supported formats here https://google.github.io/ExoPlayer/supported-formats.html
The URL you have above, which appears to be for a ts media file, returns a '302' redirect response or a '403' forbidden response, depending on how you connect to it.
This is usually because the content requires some user login and/or some authorisation token to be included in the request.
If you do have authorisation for the content then the first step is to find out the format and make sure it is included in the ExoPlayer supported content list as Ramesh suggests in another answer. Note that the usual broadcast format support by satellite typically (unless it is IP over the satellite broadcast) need to be converted into an IP based format and streaming protocol to be played on an Android device.

Use Pinterest API to upload video

Can we use Pinterest API to upload Video ? , because the official documentation show only Post media of type Image .
Thanks .
You can't. But there is a workaround:
First, upload the video to youtube. Copy the thumbnail URL of this newly uploaded youtube video and pin it to Pinterest using the Pinterest API.
For example, if the youtube URL is:
https://www.youtube.com/watch?v=1sqXRQhtqI8
then you can access the thumbnail by the following URL:
http://img.youtube.com/vi/1sqXRQhtqI8/0.jpg
To pin your video on Pinterest, pin the above URL with the Pinterest API.
Following pin is the result of pinning above video.
https://www.pinterest.com/pin/369084131956139919/
There is also a workaround to use animated Gifs - those are supported by using straight image_url parameter :) You can simply convert your video to a gif and post it.
Pinterest has now added support for uploading videos through their api.
Noteworthy is that only business accounts can use this feature.
https://developers.pinterest.com/docs/redoc/martech/#tag/Quick-Start:-Publish-Video

LibVLC Android stream from minimal HTTP server

I am trying to write an application similar to the well-known Popcorn Time - an app which lets you watch movies over torrents. It basically uses NanoHTTPD as a bridge between the LibVLC player and the torrent library to be able to stream it. I use this exact same HTTP library.
The problem I have is that, even though using chrome's built-in MP4 viewer works fine, I cannot play the video from VLC. I did notice that it sends an 'Icy-Metadata: 1' header in the HTTP request which Chrome doesn't but little is documentated on that so I'm not sure if that's the problem here.
The desktop version of VLC player does not play it either. It stands there, requesting the same over and over again without displaying my video. What could I be missing?
It may be worth noting that nginx serves it properly, but it seems like nginx doesn't even reply with any kind of http header response. Just data.

Download a pdf file from android application using Jsoup

I would like to download a pdf file from my android application. I want to download it using jsoup because I have to post username, password and cookies, so I have done it with jsoup. I have check the site adn saw that I have to connect at the login page and post: username,password,cookie and a variable next with the internal link of the pdf file. I have done it with jsoup but now I don't know how to download this file at my android device. I prefer, if it's possible, when it will download to appear on the notification bar of my device.
Thank you in advance!

Categories