Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18372] Live Stream(HLS) not working in Android 5.0/5.01(Lollipop)

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionNot Our Bug
Resolution Date2015-01-13T18:55:51.000+0000
Affected Version/sRelease 3.4.1, Release 3.5.0
Fix Version/sn/a
ComponentsAndroid
LabelsTCSupportTriage, android, hls, lollipop, player
ReporterEyal Solodki
AssigneeIngo Muschenetz
Created2014-12-29T13:16:14.000+0000
Updated2015-03-24T08:58:04.000+0000

Description

Problem Description

HLS video link does not work on Android Lollipop. And it’s also a bug on native android. https://code.google.com/p/android-developer-preview/issues/detail?id=1820

Steps to reproduce

1. Create a new mobile project (classic) 2. Paste this code to app.js
var vidWin = Titanium.UI.createWindow({
	title : 'Video View Demo',
	backgroundColor : '#fff'
});

var videoPlayer = Titanium.Media.createVideoPlayer({
	top : 2,
	autoplay : true,
	backgroundColor : 'blue',
	height : 300,
	width : 300,
	mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT,
	scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT
});

videoPlayer.url = 'http://www.nasa.gov/multimedia/nasatv/NTV-Public-IPS.m3u8';
vidWin.add(videoPlayer);
vidWin.open(); 
3. Open the app in a device with Android 5.x

Extra information

Titanium.Media.VideoPlayer does not stream HLS (Live Stream) on Lollipop. On KitKat works great. for example - Nasa TV: http://www.nasa.gov/multimedia/nasatv/NTV-Public-IPS.m3u8 setting this url in the url property of the VideoPlayer Object returns the current log: 12-29 15:13:05.148: D/MediaPlayer(19906): Couldn't open file on client side, trying server side 12-29 15:13:05.157: I/LiveSession(26737): onConnect http:// 12-29 15:13:05.165: E/LiveSession(26737): unable to fetch master playlist http://. 12-29 15:13:05.167: E/MediaPlayer(19906): error (1, -1004) 12-29 15:13:05.284: D/HTTPClient(19906): The persistent handle is disposed. 12-29 15:13:05.291: E/MediaPlayer(19906): Error (1,-1004) 12-29 15:13:05.291: D/TiVideoView8(19906): (main) [364705,552345] Error: 1,-1004 12-29 15:13:05.337: D/NuPlayerDriver(26737): reset(0xb50ce880) 12-29 15:13:05.337: D/NuPlayerDriver(26737): notifyResetComplete(0xb50ce880) 12-29 15:13:05.338: D/NuPlayerDriver(26737): reset(0xb50ce880) 12-29 15:13:05.340: D/MediaPlayer(19906): Couldn't open file on client side, trying server side 12-29 15:13:05.345: I/LiveSession(26737): onConnect http:// 12-29 15:13:05.353: E/LiveSession(26737): unable to fetch master playlist http://. 12-29 15:13:05.354: E/MediaPlayer(19906): error (1, -1004) 12-29 15:13:05.385: E/MediaPlayer(19906): Error (1,-1004) 12-29 15:13:05.385: D/TiVideoView8(19906): (main) [94,552439] Error: 1,-1004 12-29 15:13:05.405: D/HTTPClient(19906): The persistent handle is disposed. 12-29 15:13:06.705: D/audio_hw_primary(26737): disable_audio_route: reset and update mixer path: low-latency-playback 12-29 15:13:06.705: D/audio_hw_primary(26737): disable_snd_device: snd_device(2: speaker)

Comments

  1. Eyal Solodki 2014-12-31

    Hi, When do you think it's possible to fix this bug? It's a Critical Bug that happens only on Android Lollipop. We are a mobile development company and I'm using Appcelerator for over than 2 years and I'm very happy with the platform - but this kind of bug never happend to me - We are stuck and cannot release a version for the client. Regards, Eyal Solodki, Developer - NGSoft Israel eyal.solodki@ngsoft.com ngsoft.com
  2. Ingo Muschenetz 2015-01-05

    I am curious if this is an Android bug. See https://code.google.com/p/android-developer-preview/issues/detail?id=1820 and (possibly) https://code.google.com/p/android/issues/detail?id=72875.
  3. Motiur Rahman 2015-01-06

    Hello, We have tested this issue. And HLS video link does not work on Android Lollipop. And it’s also a bug on native android. https://code.google.com/p/android-developer-preview/issues/detail?id=1820 *Testing Environment:* Titanium SDK: 3.4.1 Titanium CLI: 3.4.1 Android SDK: 5.0 OS X Version: 10.9.5, Appcelerator Studio: 3.4.1 *Test Case*
       var vidWin = Titanium.UI.createWindow({
       	title : 'Video View Demo',
       	backgroundColor : '#fff'
       });
       
       var videoPlayer = Titanium.Media.createVideoPlayer({
       	top : 2,
       	autoplay : true,
       	backgroundColor : 'blue',
       	height : 300,
       	width : 300,
       	mediaControlStyle : Titanium.Media.VIDEO_CONTROL_DEFAULT,
       	scalingMode : Titanium.Media.VIDEO_SCALING_ASPECT_FIT
       });
       
       videoPlayer.url = 'http://www.nasa.gov/multimedia/nasatv/NTV-Public-IPS.m3u8';
       vidWin.add(videoPlayer);
       vidWin.open(); 
       
    Thanks.
  4. Ingo Muschenetz 2015-01-13

    If this is a bug in native Android, why not just resolve it as "Not our Bug"?
  5. Mauro Parra-Miranda 2015-01-13

    This is a native bug: https://code.google.com/p/android-developer-preview/issues/detail?id=1820 Once Android fixes this, it will reflect into the platform.
  6. Wilton Kwok 2015-03-24

    I tried to use the same url (http://www.nasa.gov/multimedia/nasatv/NTV-Public-IPS.m3u8) on the web browser. It play perfectly. But when it is placed in the App (no matter VideoPlayer or WebView). It has the following log: {quote} [INFO] : VIDEO_LOAD_STATE_UNKNOWN [WARN] : Parcel: **** enforceInterface() expected '' but read 'android.media.IMediaPlayer' [INFO] : VIDEO_LOAD_STATE_UNKNOWN [ERROR] : MediaHTTPConnection: unknown exception java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference [WARN] : Parcel: **** enforceInterface() expected '' but read 'android.media.IMediaPlayer' [WARN] : MediaPlayer: info/warning (701, 0) [ERROR] : MediaHTTPConnection: unknown exception java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.startsWith(java.lang.String)' on a null object reference [WARN] : MediaPlayer: info/warning (1, 1936876366) [ERROR] : MediaPlayer: error (1, -1004) [ERROR] : MediaPlayer: Error (1,-1004) [INFO] : VIDEO_PLAYBACK_STATE_INTERRUPTED [INFO] : VIDEO_LOAD_STATE_UNKNOWN {quote}

JSON Source