Play audio wether it's in the audios buffer or not

This commit is contained in:
2016-02-16 16:32:40 -06:00
parent e6eaa8655e
commit 4336558f22
3 changed files with 17 additions and 1 deletions

View File

@@ -78,6 +78,11 @@ class baseBuffer(object):
def volume_up(self):
player.player.volume = player.player.volume+5
def play_audio(self, *args, **kwargs):
post = self.session.db[self.name]["items"][self.tab.list.get_selected()]
if post.has_key("type") and post["type"] == "audio":
pub.sendMessage("play-audio", audio_object=post["audio"][1]["url"])
class feedBuffer(baseBuffer):
def get_items(self, no_next=True):

View File

@@ -0,0 +1,9 @@
# -*- coding: utf-8 -*-
import wx
import widgetUtils
class audioPlayerDialog(widgetUtils.BaseDialog):
def __init__(self):
super(audioPlayerDialog, self).__init__(None, wx.NewId(), _(u"Audio player"))
sizer = wx.BoxSizer(wx.VERTICAL)