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

add initial web player support #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

AIIX
Copy link
Contributor

@AIIX AIIX commented Aug 6, 2021

Description

  • Adds support for web player and web mime type

Type of PR

  • Bugfix
  • Feature implementation
  • Refactor of code (without functional changes)
  • Documentation improvements
  • Test improvements

Testing

Call function: self.audioservice.play((url, 'web/url', self.skill_id)) requires url to webpage with media content, 'web/url' mime type and skill_id for matching return call.

Example event to skill to be added for allowing the skill to display its own web player:

self.add_event('playback.display.web.video.type', self.show_video)

def show_video(self, message):
      if message.data.get("skill_id") == self.skill_id:
            self.gui["url"] = message.data["url"]
            self.gui.show_page("ExampleWebPlayer.qml", idle_override=True)

CLA

  • Yes

Copy link
Contributor

@krisgesling krisgesling left a comment

Choose a reason for hiding this comment

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

Hey, I'm pretty hopeful that we'll be getting to the Music Skill sprint quite soon, and there is very likely going to be some changes to the Common Play Framework and how data is passed to and from the Audioservices as part of that. So I think it would be worth holding this off for a couple of weeks until we get clearer about what those changes might include.

I'm not very clear with what's actually playing the media here either. Is it the browser, the GUI_player, or because they're both in mycroft-gui you can't really differentiate?

How is it determining which media at the given url its meant to play or it just connects the audio output from the browser to the guiplayer so really it's up to the ExampleWebPlayer.qml to actually play the media?

LOG.debug('Player Emitted gui.player.media.service.play')
self.send_meta_to_player()
if self.web_player:
self.bus.emit(Message("gui.web.media.service.play",
Copy link
Contributor

Choose a reason for hiding this comment

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

The handler for this doesn't exist yet, is that right?
I haven't been able to find where what would actually play the media

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this still an issue at all? Or can this be merged?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The webpage itself plays the media.. any media loaded by a webpage in a browser.. will be handled by the browser in this case (QtWebEngine/Chromium)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The only thing that is being passed here is the URL of the page to load and display in the browser

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah right, but where is the handler for playback.display.web.video.type to load the url provided?

I couldn't see it in mycroft-gui or this plugin or the playback-control-skill - so it just seems like we're missing a piece of the puzzle?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants