Get a video using GPRS and paly it
Description:
This example shows how to retrieve a .3gp video file using GPRS and then play it. The following modules are used:appuifw, e32, urllib.
###################################################
#Python examples for AAU Mobile Phone Programming #
#(c) Mobile Phone Group #
###################################################
import appuifw
import e32
import urllib
def get_video():
url = "http://kom.aau.dk/project/mobilephone/teaching/3GPPvideo/giampa.3gp"
tempfile = "c:\\Nokia\\Videos\\video01.3gp"
try:
print "Downloading video..."
urllib.urlretrieve(url, tempfile)
lock=e32.Ao_lock()
content_handler = appuifw.Content_handler(lock.signal)
content_handler.open(tempfile)
lock.wait()
print "Video viewing finished."
except IOError:
print "Could not access the file"
except:
print "Could not open the file"
def main_menu():
appuifw.app.menu = [(u"get video", get_video)]
lock = e32.Ao_lock()
appuifw.app.title = u"Get video"
main_menu()
lock.wait()



