Exemplo n.º 1
0
def _overlaydemo(request, template):
    scripts = [widget.full_path(s) for s in settings.JS_STREAMER[:-1]]
    return render_to_response(
        template,
        { 'js_use_compiled': settings.COMPRESS_MEDIA,
          'scripts': scripts },
        context_instance=RequestContext(request))
Exemplo n.º 2
0
def _overlaydemo(request, template):
    scripts = [widget.full_path(s) for s in settings.JS_STREAMER[:-1]]
    return render_to_response(template, {
        'js_use_compiled': settings.COMPRESS_MEDIA,
        'scripts': scripts
    },
                              context_instance=RequestContext(request))
Exemplo n.º 3
0
def widgetizerbootloader(request):
    context = {
        "gatekeeper": "UnisubsWidgetizerLoaded",
        "script_src": widget.full_path("js/widgetizer/dowidgetize.js")
    }
    return render(request,
                  "widget/widgetizerbootloader.js",
                  context,
                  content_type='text/javascript')
Exemplo n.º 4
0
def widgetizerbootloader(request):
    context = {
        "gatekeeper": "UnisubsWidgetizerLoaded",
        "script_src": widget.full_path("js/widgetizer/dowidgetize.js")
    }
    return render_to_response("widget/widgetizerbootloader.js",
                              context,
                              mimetype='text/javascript',
                              context_instance=RequestContext(request))
Exemplo n.º 5
0
def youtubenotranscriptdemo(request):
    scripts = [widget.full_path(s) for s in settings.JS_WIDGETIZER[:-1]]
    url = request.GET.get("url", DEFAULT_DEMO_URL)
    return render_to_response('streamer/youtubenotranscriptdemo.html', {
        'js_use_compiled': settings.COMPRESS_MEDIA,
        'scripts': scripts,
        'url': url,
    },
                              context_instance=RequestContext(request))
Exemplo n.º 6
0
def widgetizerbootloader(request):
    context = { 
        "gatekeeper": "UnisubsWidgetizerLoaded",
        "script_src": widget.full_path("js/widgetizer/dowidgetize.js") 
        }
    return render_to_response(
        "widget/widgetizerbootloader.js",
        context,
        mimetype='text/javascript',
        context_instance=RequestContext(request))
Exemplo n.º 7
0
def youtubedemo(request):
    v, created = models.Video.get_or_create_for_url(
        'http://www.youtube.com/v/1lxm-e0hMTw')
    subs = v.subtitles()
    scripts = [widget.full_path(s) for s in settings.JS_STREAMER[:-1]]
    return render_to_response('streamer/youtubedemo.html', {
        'js_use_compiled': settings.COMPRESS_MEDIA,
        'videoid': v.video_id,
        'subs': subs,
        'scripts': scripts
    },
                              context_instance=RequestContext(request))
Exemplo n.º 8
0
def youtubedemo(request):
    v, created = models.Video.get_or_create_for_url(
        'http://www.youtube.com/v/1lxm-e0hMTw')
    subs = v.subtitles()
    scripts = [widget.full_path(s) for s in settings.JS_STREAMER[:-1]]
    return render_to_response(
        'streamer/youtubedemo.html',
        { 'js_use_compiled': settings.COMPRESS_MEDIA,
          'videoid': v.video_id,
          'subs': subs,
          'scripts': scripts },
        context_instance=RequestContext(request))
Exemplo n.º 9
0
def youtubedemo(request):
    url = request.GET.get("url", DEFAULT_DEMO_URL)
    v, created = models.Video.get_or_create_for_url(url)
    subs = v.subtitles()
    scripts = [widget.full_path(s) for s in settings.JS_WIDGETIZER[:-1]]
    return render_to_response('streamer/youtubedemo.html', {
        'js_use_compiled': settings.COMPRESS_MEDIA,
        'video': v,
        'subs': subs,
        'url': url,
        'scripts': scripts
    },
                              context_instance=RequestContext(request))