Пример #1
0
def mediaplayer(properties, autostart="false"):

    fileurl = determine_asset_url(properties)

    try:
        res = mediaplayers.build_proper_viewer(fileurl, autostart=(autostart == "true"))
        return mark_safe(res)
    except:
        logging.error("mediaplayer filter failed", exc_info=True)
        return mark_safe("<a href=" + fileurl + ">" + fileurl + "</a>")
Пример #2
0
def mediaplayer(properties, autostart="false"):

    fileurl = determine_asset_url(properties)
    title = properties.get("title") if hasattr(properties, "get") else properties  # might even be None

    try:
        res = mediaplayers.build_proper_viewer(fileurl, title=title, autostart=(autostart == "true"))
        return mark_safe(res)
    except:
        logging.error("mediaplayer filter failed", exc_info=True)
        return mark_safe("<a href=" + fileurl + ">" + fileurl + "</a>")
Пример #3
0
def mediaplayer(properties, autostart="false"):
    fileurl = determine_asset_url(properties)
    title = properties.get("title") if hasattr(
        properties, "get") else properties  # might even be None

    try:
        res = mediaplayers.build_proper_viewer(fileurl,
                                               title=title,
                                               autostart=(autostart == "true"))
        return mark_safe(res)
    except:
        logging.error("mediaplayer filter failed", exc_info=True)
        return mark_safe("<a href=" + fileurl + ">" + fileurl + "</a>")
Пример #4
0
def _determine_asset_url(properties):
    return determine_asset_url(properties)
Пример #5
0
def _determine_asset_url(properties):
    return determine_asset_url(properties)