Quantcast
Channel: Appcelerator Developer Center Q&A Tag Feed (complete)
Viewing all articles
Browse latest Browse all 20

videoPlayer 'complete' event does not differentiate?

$
0
0

Hey all!

I am trying to get a video window to call a function if it completes on its own, but not if the user stops the video.

my code looks like this:

activeContent.addEventListener('complete',function(e)
{  
 
    if(e.reason != Titanium.Media.VIDEO_FINISH_REASON_USER_EXITED){          
       ContentComplete();
    } 
}
Interestingly, e.reason always returns 0, which is the value assigned to Titanium.Media.VIDEO_FINISH_REASON_PLAYBACK_ENDED

I guess technically the playback did end, but that doesn't allow me to differentiate why it ended.

Has anyone else run into behavior like this? Or maybe have some suggestions on how to overcome it?

Thanks!


Viewing all articles
Browse latest Browse all 20

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>