コード例 #1
0
def popup_video(button, url, localfile):
    '''
    Starts the actual video play on top of the app, synchronously.
    '''
    play_video(button,
               url,
               localfile,
               subtitles=None,
               init_threads=False,
               keyboard_engulfer=True)
コード例 #2
0
ファイル: video.py プロジェクト: alexaverill/make-art
def play_intro():
    level = load_app_state_variable(APP_NAME, 'level')
    # Skip the intro in case the user progressed past level 1
    if level > 0:
        return

    try:
        from kano_video.logic.player import play_video
        # stop the splash screen before the video starts
        os.system('/usr/bin/kano-stop-splash')
        play_video(localfile=VIDEO_PATH)
    except ImportError:
        pass
コード例 #3
0
ファイル: video.py プロジェクト: wtanaka/make-art
def play_intro():
    # Skip the intro in case the user progressed level 1
    has_progressed = False

    groups = load_app_state_variable(APP_NAME, 'groups')
    if groups is not None and isinstance(groups, dict):
        for group in groups.itervalues():
            if 'challengeNo' in group and group['challengeNo'] > 0:
                has_progressed = True
                break
    else:
        level = load_app_state_variable(APP_NAME, 'level')
        if level > 0:
            has_progressed = True

    if not has_progressed:
        try:
            from kano_video.logic.player import play_video
            # stop the splash screen before the video starts
            os.system('/usr/bin/kano-stop-splash')
            play_video(localfile=VIDEO_PATH)
        except ImportError:
            pass
コード例 #4
0
ファイル: video.py プロジェクト: KanoComputing/kano-video
def popup_video(button, url, localfile):
    '''
    Starts the actual video play on top of the app, synchronously.
    '''
    play_video(button, url, localfile, subtitles=None, init_threads=False, keyboard_engulfer=True)