Stream Video On Android Like YouTube - java

I want to play video on my android app with a player like YouTube.
My webapp is using videojs for playing different video formats.
I dont wish to use the native media player on android as i want to show portrait version of it and show the likes and comments beneath the video.
Currently am using a webview on the half of the layout and below that am using the layout for likes, comments etc.
So, What should i go for ? I want to use the player like YouTube. Is it even possible ?
Thanks !

Related

How do I make an overlay camera app for streaming with the phone on different platforms?

So I want to make in android studio (with java) and app that will add an overlay to my phone's camera where I can write anything (for example, the scoreboard of the game that I am filming) I want to be able to get this overlay working when streaming on social media (facebook, instagram etc).
I couldn't really find lots of resources regarding this idea.
Thanks in advance

How to play and pause MediaSession in Android

I'm trying to learn MediaSessions. I did a lot of research for music player which has MediaSession to learn how is it working. I found nothing about MediaSession. All music apps examples on youtube doesn't have MediaSession. I'm new in android and I did a music app but I didn't use MediaSession thefore I can't handle with headset keys, for example hook key . I really want to learn proper way to make an audio app.
Could you give a sample which is playing dummy audio with MediaSession and contains play and pause features please. All I need a sample Thank you.
The Universal Android Music Player Sample shows how to implement an audio media app that works across multiple form factors.
In the full guide, there's a media session and controller section you'd probably like to read.
You can find MediaSession implemented in the UAMP sample inside MusicService.
Other great resources:
Our new TV Reference App is tailored more towards video experiences on TV.
See also my codelab that steps through the basics of supporting MediaSessions.

Android inapp camera and video capture

I am trying to implement an in-app camera to my application, which will allow me to take either a still photo or a video, with the result being stored in a variable.
So basically the top tabs (HOME, GALLERY, CAMERA, EFFECTS) are all Fragments. Assuming we are currently on the "CAMERA" tab, inside this view you will have two further tabs at the bottom one for taking still shots and the other for video, the rest of the screen should be taken up by a camera interface showing the cameras view.
The Android developer documentation mainly talks about using androids built in camera and then saving the result in one of my own variables, which I dont want to do.
Resouces I have taken a look at
Android developer documentation
Random Google tutorials & stackoverflow
Android arsenal and 3rd party created libraries.
Material Camera looks good but as soon as I try and add its dependancy to my app, the build gradle throws an error, so that one doesn't work.
CWAC-Cam2 looks really complicated, I don't understand how to implement it.
This is the resource you couldn't find: Using Camera inside app
Basically for taking photo you'll need to access the camera resource through:
Camera.open()
Then create a class for showing the preview like the following:
public class CameraPreview extends SurfaceView implements SurfaceHolder.Callback
For capturing you'll need a PictureCallback.
For video recording checkt the first source at the Capturing videos section; there you'll need a MediaRecorder.

Easiest way to play video?

EDIT: If your havng my problem, please watch this: https://www.youtube.com/watch?v=orMgNh0o38A
I have a JFrame setup for my game, I'd like to play a quick video before my game loads. How would I go about playing the video the easiest way?
The video should not include controls etc, just the video so my whole frame should be the video!
I've read other topics on this and they dont seem to help... at all D:
I'm not the best Java programmer so don't expect me to know every API and how to use them.
You can use VLCJ to play video, and you can use this link to add the video to jpanel which you can show on startup : https://stackoverflow.com/a/20426375

How to avoid video stop when I scroll the screen using youtube API in an android app?

I'm building an app for Android using the YouTube API. The video is in a scroll widget, and when I scroll and the video goes up or down the screen, it stops. I want the video to continue even though isn't in the screen. How can I do that?
i went through the same problem, i open this question:
Android YouTube API video pause when rotate screen or hide player
see the comments to understand better. For the tests I did, the Youtube API knows when the player is not showing on the screen and just pause the video. As a workaround I changed my layout so that the player be fixed on the screen, just as is the official app from youtube.
I use this question as reference:
Scrolling Text Above Buttons, Buttons Fixed At Bottom

Categories

Resources