Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-15315] Android: Can not play m3u8 files in VideoPlayer

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionInvalid
Resolution Date2013-09-26T22:55:01.000+0000
Affected Version/sRelease 3.1.0, Release 3.1.1, Release 3.1.3
Fix Version/s2013 Sprint 20, 2013 Sprint 20 API
ComponentsAndroid
Labelsn/a
ReporterBetty Tran
AssigneePing Wang
Created2013-09-23T19:52:55.000+0000
Updated2017-03-03T21:50:45.000+0000

Description

Description

M3u8 files can not be played in the VideoPlayer. This works in iOS.

Code to Reproduce

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://api.playonsports.com/v1/videos/68308.hls?Authorization=bearer%20a29a3bc05c8553dbe8409d7efabeaf8b';
vidWin.add(videoPlayer);
vidWin.open();

Attachments

FileDateSize
videolog.txt2013-09-23T19:59:21.000+0000764

Comments

  1. Ping Wang 2013-09-26

    I put the above url to the web browser on my device (Galaxy Nexus 4.0 and Nexus 7 4.3). The video plays fine. And from the log, I found when it tried to load the m3u8 file, it redirected the url to 'http://cfhls.nfhsnetwork.com/62165/62165.m3u8'. The log is attached here:
       I/LiveSession(20968): onConnect 'http://cfhls.nfhsnetwork.com/62165/62165.m3u8'
       V/ChromiumHTTPDataSource(20968): connect on behalf of uid 10017
       I/ChromiumHTTPDataSource(20968): connect to http://cfhls.nfhsnetwork.com/62165/62165.m3u8 @0
       D/dalvikvm(17067): GC_FOR_ALLOC freed 540K, 9% free 15385K/16839K, paused 38ms
       V/ChromiumHTTPDataSource(20968): connect on behalf of uid 10017
       I/ChromiumHTTPDataSource(20968): connect to http://cfhls.nfhsnetwork.com/62165/62165.m3u8 @0
       V/ChromiumHTTPDataSource(20968): connect on behalf of uid 10017
       I/ChromiumHTTPDataSource(20968): connect to http://cfhls.nfhsnetwork.com/62165/621650.ts @0
       V/ChromiumHTTPDataSource(20968): connect on behalf of uid 10017
       I/ChromiumHTTPDataSource(20968): connect to http://cfhls.nfhsnetwork.com/62165/621651.ts @0
       
    I think the original host does not contain the real MPEG-TS files. So it failed to load the video in VideoPlayer. After I modified line 16 in the above test case to
       videoPlayer.url = "http://cfhls.nfhsnetwork.com/62165/62165.m3u8";
       
    the test case works and the video plays fine. Also tested with a native Android project using [MediaPlayer](http://developer.android.com/reference/android/media/MediaPlayer.html). The original url does not play but the modified url works fine. Resolve the ticket as Invalid.
  2. Lee Morris 2017-03-03

    Closing as invalid.

JSON Source