Esempio n. 1
0
def current_playing(request):
    client = VideoOMXPlayerClient()
    current_video = client.status()
    jsonreturn = dict()
    jsonreturn['current_playing'] = current_video.getdict() if current_video else {}
    jsonreturn['isplaying'] = client.isplaying()
    return HttpResponse(json.dumps(jsonreturn), content_type='application/json')
Esempio n. 2
0
def play(request, slug):
    videocontroller = VideoController()
    video = videocontroller.findvideobyslug(slug)
    videos = videocontroller.getmultimediafiles()
    client = VideoOMXPlayerClient()
    client.play(video)
    return render(request, 'index.html', {'videos': videos})
Esempio n. 3
0
def seek(request, second):
    videocontroller = VideoController()
    videos = videocontroller.getmultimediafiles()
    client = VideoOMXPlayerClient()
    client.seek(second)
    return render(request, 'index.html', {'videos': videos})
Esempio n. 4
0
def pause(request):
    videocontroller = VideoController()
    videos = videocontroller.getmultimediafiles()
    client = VideoOMXPlayerClient()
    client.pause()
    return render(request, 'index.html', {'videos': videos})
Esempio n. 5
0
from hometvapp.extras.video import VideoOMXPlayerClient
import time

print "prije"
v = VideoOMXPlayerClient()
print "poslije"

v.send_command("play")

time.sleep(5)

v.send_command("pause")