Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/audio seek #1944

Merged
merged 2 commits into from Jan 12, 2019
Merged

feature/audio seek #1944

merged 2 commits into from Jan 12, 2019

Conversation

JarbasAl
Copy link
Contributor

@JarbasAl JarbasAl commented Jan 9, 2019

Description

adds seek functionality to audio service

only implemented in vlc audio backend

as a follow up the playback skill should also be updated

How to test

use the new methods in audioservice

    from mycroft.skills.audioservice import AudioService

    audio = AudioService(bus)
    audio.play(track)
    audio.seek(10)  # skip 10 seconds
    audio.seek(-10)  # rewind 10 seconds
    audio.seek_forward(20)  # skip 20 seconds
    audio.seek_backward(5)  # rewind 5 seconds

Contributor license agreement signed?

CLA [affirmative] (Whether you have signed a CLA - Contributor Licensing Agreement

@JarbasAl JarbasAl changed the title featuree/audio seek feature/audio seek Jan 9, 2019
Copy link
Collaborator

@forslund forslund left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice feature!

A couple of minor nit-picks so far. Will do more thorough testing later.

mycroft/skills/audioservice.py Outdated Show resolved Hide resolved
mycroft/audio/audioservice.py Outdated Show resolved Hide resolved
mycroft/audio/services/__init__.py Outdated Show resolved Hide resolved
@forslund forslund added tagged for review and potential merge CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors) labels Jan 9, 2019
@JarbasAl
Copy link
Contributor Author

should probably add a check in vlc to ensure time is not negative

and also that it isn't higher than audio length, need to dig into vlc api for this one

The audioservice can now jump forward and backward in the audio stream/file

The functionality is accessed via the audioservice class's seek_forward(),
seek_backward() and seek() methods
@forslund
Copy link
Collaborator

Tested and works really well. I went ahead and rebased it. Merging now.

Many thanks @JarbasAI !

@forslund forslund merged commit 670ece3 into MycroftAI:dev Jan 12, 2019
@JarbasAl JarbasAl deleted the feature/audio_seek branch January 12, 2019 15:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA: Yes Contributor License Agreement exists (see https://github.com/MycroftAI/contributors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants