I would to get thumbnail from my stream video to have an instant of my video.
I have tried with thumbnailImageAtTime function:
videoObject.addEventListener('load', function(){ var tn = videoObject.thumbnailImageAtTime(10,Ti.Media.VIDEO_TIME_OPTION_NEAREST_KEYFRAME); var aaa = Titanium.UI.createImageView({image: tn, top:20, right:20, width:300, height: 300, borderColor: '#000', borderWidth: 2, borderRadius: 0, opacity: 1}); // these ones work fine dettaglio.add(aaa); });That script works fine with local mp4 but not with Http Live Streaming.
I have tried with second method:
var videoObject = Titanium.Media.createVideoPlayer({ contentURL: rows2.fieldByName('video_url'), scalingMode:Ti.Media.VIDEO_SCALING_ASPECT_FIT, top: 4, left: 4, mediaControlStyle: 'none', height:288, width:512, autoplay:false, initialPlaybackTime:10000, });and in play event I reset the initialPlaybackTime
play.addEventListener('click', function(e){ videoObject.initialPlaybackTime = "NaN"; videoObject.mediaControlStyle = Ti.Media.VIDEO_CONTROL_EMBEDDED; videoObject.play(); })but video start at old initialPlaybackTime.
Who can help me?
1 Answer
looks like they found a solution here?
http://developer.appcelerator.com/question/133645/thumbnail-in-videoplayer#answer-233055
Your Answer
Think you can help? Login to answer this question!