Playing YouTube videos continuously in your flash application
October 3, 2007 shige+ki | 個別ページ | コメント(1)
Although YouTube (Google Code) provides fantastic APIs for developing your own YouTube-based applications, somehow a very simple API does not exist: detecting the end of video event.
I don't even know if YouTube videos dispatches the end-of-video event at all, but according to the discussions in the forum, it seems that it does not exist anyway. I have struggled with this problem for about a month or so.
At this moment, duration information in the meta-data of a video is the only solution (let me know if there is another way):
1. List video IDs that you want to play continuously
2. Play the first video and set a Timer object with its duration
3. When the Timer object reaches the time, it dispatches the "timer" event
4. Then the timer event handler call the function that plays the next video
5. Repeat 2-4 until the end of the list
... it is just simple, however, it took a month for me to reach this conclusion. Because of the confidentiality of the project, I cannot distribute the code, but perhaps someday I might write a pseudo-code for this in a paper.
Now I can get on to the next step!!!! Well, I have to finish off a paper for CHI2008: interactivity, though.
Thoughts on blogging
September 19, 2007 shige+ki | 個別ページ | コメント(0)
I made up my mind just now that I will blog this blog first, and then proceed to my Japanese one. As I am fluent in Japanese, it is a blog-like-talking process in the Japanese blog, whereas this blog requires certain concentration.
I hope this declaration makes it a rule for me to keep blogging here...
KES2007
September 19, 2007 shige+ki | 個別ページ | コメント(0)
I have attended to the conference KES2007 in Vietri sul Mare, Italy. Amalfi Coast is beautiful...
[ KES2007 ]の続きを読む
Detecting the end of .flv file
September 4, 2007 shige+ki | 個別ページ | コメント(0)
There must be an event listener that detects the end of .flv file. What I want to do is to play movies one after another, which is not complex at all...
Servlet thorough a proxy server
September 3, 2007 shige+ki | 個別ページ | コメント(0)
Finally I found how to make a servlet go through the UTS proxy server for it to access YouTube.
My web application (to be available online soon...) calls a Java servlet that does HTTP requests to YouTube server. See YouTube Developer Area for more information. There are nice example web apps.
I had a proxy problem ... well not really a problem, but it was a problem for me due to my lack of knowledge. While the process takes about 2 minutes without the proper setting, it only takes 200 msec with the appropriate setting. The URL should be set as below:
URL url = new URL("http", proxyHost, proxyPort, youtubeGetVideoByTagString);
... This is to make a Java servlet use a specific proxy server.
- Recent Entries
- Categories
- Pages
- Archives
- Comments
- TrackBacks
-
- Tags
-
- Powered by
- Search
-