Search code examples
videohttpstitaniumappceleratorvideo-player

Appcelerator Videoplayer Can't Play From HTTPS


I'm trying to make a videoplayer in Appcelerator. When I provide a regular (HTTP) link, it plays well. But when I want to play a video from an HTTPS source, it fails.

Here is a sample code block:

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 = 'https://www.musttechnews.com/11eylul.mp4';
vidWin.add(videoPlayer);
vidWin.open();

What could be the problem?


Solution

  • Finally, I realized, this is a really different problem. That is a certificate problem caused by Safari. Check following links for details:

    Safari will not play mp4 over HTTPS

    https://webkit.org/blog/6784/new-video-policies-for-ios/