1

We are developing a Mobile App using the Titanium framework, we need to embed some videos in one of the screens. Appcelerator API documentation that I am following is located here. My code looks as follows, currently it shows a blank screen :

var welcomeWin = Ti.UI.createWindow({
    title:'Welcome Video',
    backgroundColor:'#fff' 
});


var videoplayer = Titanium.Media.createVideoPlayer({
    top:2,
    autoplay:true,
    height:300,
    width:300,
    url:'https://fast.wistia.net/embed/iframe/thewistiaurl',
    mediaControlStyle:Titanium.Media.VIDEO_CONTROL_DEFAULT,
    scalingMode:Titanium.Media.VIDEO_SCALING_ASPECT_FIT
});


welcomeWin.add(videoplayer);
Rene Pot
  • 24,681
  • 7
  • 68
  • 92
Tarun Gupta
  • 1,629
  • 1
  • 22
  • 39
  • 1
    is the URL an actual link to the video file, or an html page? Because it needs to be a direct link to the video itself – Rene Pot Dec 01 '17 at 10:27
  • Its the same url that I am using for embedding the video inside an iFrame of an HTML page. – Tarun Gupta Dec 01 '17 at 10:31
  • thats not an answer to my question :) Sounds like it is an html page, but you'd need to check! – Rene Pot Dec 01 '17 at 10:35
  • As an example : this is the exact url that I am using https://fast.wistia.net/embed/iframe/vejo0vd0oa – Tarun Gupta Dec 01 '17 at 10:42
  • 1
    After checking Wistia API docs, It turns out that the direct URLs look like this: http://embed.wistia.com/deliveries/02b2a615c6cd0db58132d2cb92fda84e04c9d8f3.bin . I am now trying to find how to obtain the direct urls for my videos. Thanks! – Tarun Gupta Dec 01 '17 at 11:05
  • If you do not find a proper way to load video from your urls, then you may try WebView as well as I believe it should work for any URLs which indirectly load videos – Prashant Saini Dec 02 '17 at 08:46

0 Answers0