예제 #1
0
def player_seek_test():
    controller = RemoteController("N0AA003759K70700223")

    player = controller.get_player_adapter()

    audio_folder = controller.get_remote_file("/storage/emulated/0/audio")

    for audio_file in audio_folder.list_files():
        player.play(audio_file)

        player.get_duration()

        time.sleep(5)

        assert player.get_current_position() > 5000

        middle_track_time = int(player.get_duration()/2)

        player.seek_to(middle_track_time)

        assert player.get_current_position() >= middle_track_time

        time.sleep(5)

        player.stop()

        assert not player.is_playing()
예제 #2
0
def player_play_stop_test():
    controller = RemoteController("N0AA003759K70700223")

    player = controller.get_player_adapter()

    player.play("/storage/emulated/0/1.mp3")

    time.sleep(10)

    player.stop()
예제 #3
0
def player_play_stop_remote_file_test():
    controller = RemoteController("N0AA003759K70700223")

    player = controller.get_player_adapter()

    audio_folder = controller.get_remote_file("/storage/emulated/0/audio")

    for audio_file in audio_folder.list_files():
        player.play(audio_file)

        time.sleep(5)

        assert player.is_playing()

        player.stop()

        assert not player.is_playing()