Youtube live streaming getting stuck in Android - android

I am using youtube api for android to display youtube videos in my app. Normal videos stream very well, but youtube live streaming videos get stuck after few minutes in certain hardwares. These live streaming videos even got stuck when played usiing youtube app within these devices, while were playing completely fine using chrome browser.
Once initialized, I use the following line to play any youtube video:
youTubePlayer.loadVideo(id);
My queries are the following ?
What streaming protocol does youtube use for live streaming within Android ? Is it different with chrome browser and youtube app ?
What can be done to enable my app with seamless youtube live streaming ?
P.S. All my devices I have tested use Android version 4.4+

Related

How can i play Youtube Videos on Android TV

I want to play youtube videos in my android TV application, have tried youtube player api, but it wont work in TVs not having youtube app. I tried using webview, it is not playing the video(I am using Android TV API Level 25).
I am open to use any video player.
Please can anyone suggest me a good way of streaming youtube videos on Android TV?
try this library it's working fine

Multiple HTML5 videos on TV kiosk

I am building an application using electron.js that runs a socket server on a local network.
The idea is that the socket server sends messages to connected clients to dynamically load multiple html5 videos in a browser on a smart TV.
The videos are small demonstration videos and need to autoplay and loop.
There can be up to 12 videos playing at once on one device.
The problem that I am experiencing is that I cannot get smooth playback of the videos or not all videos will play.
I have tried the following with 12 videos:
Native Smart TV browser. Result: Only plays 3 videos and playback is ok
Chormium Browser on Raspberry Pi 3. Result: Can play all 12 videos but playback is choppy. Forcing hardware acceleration crashes the browser
Chrome Browser on Quad core Android box. Result: Can only play 6 videos and playback is good
ionic cordova app on Android Box. Result: Can only play 6 videos and playback is good
react-native app on Android Box. Result: Can only play 6 videos and playback is good
My question is, what are my limitations or possible solutions?
Am I limited by hardware or is there something I can do in my application builds that may resolve the issue?
It is worth pointing out that on my desktop chrome browser, all 12 videos play without any problem but this is not an option for me because they need to run on the TV.
Edit: It is worth mentioning I am using mp4 video
I am going to answer this myself to help others if they come across the same issue.
I ended up installing ffmpeg and encoded webm video instead of mp4 and could get all 12 videos playing.
Then by reducing the bitrate, I was able to get all 12 videos playing at the same time on the mini PCs at an acceptable quality.

Live Streaming Video On App Inventor

There is a live streaming video in one of my app which is from one of the websites http://shirdisaiholidays.com/live-dharsan-3/.
I used activity starter with URI as rtsp://cam.live-s.cdn.bitgravity.com/cdn-live2-b1/_definst_/cam/live/secure/feed022/playlist.m3u8?e=0&h=ba7f5c5f6bf8a02d29f909dfa8d0c075.
It worked for some time but now it has stopped altogether. Someone said I can use video player or player with the url as source which I have also used without any success. It shows an error 702. Other apps using the same live streaming are working fine.

Unable to play live video using HTML video tag

Wowza Media Server running Live Video Streaming.
When I view the live video using RTMP and HTTP streaming using wowza examples which has live video players I am able to view video for all.
I am also able to run mobile application using cordova(phonegap) for ios devices. I am using HTML video tag in cordova application and I am able to view live video on IPad simulator using HLS streaming but whenever I try to run the same application using android simulator I am not able to view video.
Can someone please let me know what player should be used to run the application in android devices so that I can be able to view the video for Android devices?
Online search has proved that android supports HTML video tag and it should be able to play the HLS stream but when I tried it does not support.
What video player to use for Android?
And which stream type to use for Android?
Thanks
I think this is the best Compatibility chart: http://www.projekktor.com/compatibility/

Video playing on Android

I am working with an Android and PhoneGap application and am using the HTML5 video tag to play videos on my web page. When I play the video I get the audio output but the video is not visible. How can I play a HTML5 video on Android?
I've written about this issue a number of times. See my previous answer:
Playing video on AVD with phonegap
Also, I'm working on monkey patching the video tag on Android so hopefully we'll have something even better soon.

Categories

Resources