Play audio wether it's in the audios buffer or not
This commit is contained in:
@@ -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):
|
||||
|
9
src/wxUI/dialogs/player.py
Normal file
9
src/wxUI/dialogs/player.py
Normal 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)
|
Reference in New Issue
Block a user