Home android How to run video (HLS) on Android?

How to run video (HLS) on Android?




There is a link of the type http: /.../ rossiya-1 / index.m3u8? Token = Secret .

You need to reproduce this broadcast on Android devices from 4.0. Exoplayer immediately recognize unsuitable.

With this code, I get a message “You can not lose this video” :

myplayer = (videoview) view.findViewByID (R.ID.Fragment_player_Video_View);
if (Linkonresources! = NULL) {
  Logi.d ("Linkofresources not NULL");
  Myplayer.requestfocus ();
  * // I get a link in the form of a string and send it to SETVideoRI *
  MyPlayer.SetVideoRi (URI.PARSE (linkonresources.gethls ()));
  MyPlayer.Start ();

understandable to me the solution failed. I tend to use vitamo .

Perhaps someone came across HLS and can at least advise the direction in which you need to move to solve the task?

Answer 1, Authority 100%

Taken from here

HTTP / HTTPS Live Streaming Draft Protocol:

  • MPEG-2 TS Media Files Only
  • Protocol Version 3 (Android 4.0 and Above)
  • Protocol Version 2 (Android 3.x)
  • Not Supported Before Android 3.0

i.e. The direction is this, HLS on Android 4.0 in general works, but you need to clarify the codec, if not supported, then lose third-party application.

Programmers, Start Your Engines!

Why spend time searching for the correct question and then entering your answer when you can find it in a second? That's what CompuTicket is all about! Here you'll find thousands of questions and answers from hundreds of computer languages.

Recent questions