Play audio wether it's in the audios buffer or not
This commit is contained in:
parent
e6eaa8655e
commit
4336558f22
@ -36,7 +36,7 @@ If you have used [TWBlue](https://github.com/manuelcortez/twblue) before, the so
|
||||
* A status bar where the program will put some useful information about what it's doing at the moment.
|
||||
* And a menu bar, that is not used yet.
|
||||
|
||||
When socializer starts, it will try to load your news items, wall and audios. At the moment there are only supported actions for the audio's buffer. You can play the currently selected song, view the song's details (including lyrics, if available) and download it to a desired place in your hard drive. There are no supported actions for posts yet.
|
||||
When socializer starts, it will try to load your news items, wall and audios. At the moment there are only supported actions for audio items. You can play the currently selected song, view the song's details (including lyrics, if available) and download it to a desired place in your hard drive. There are no supported actions for posts yet.
|
||||
|
||||
### Making a post
|
||||
|
||||
@ -46,6 +46,8 @@ When you press the post button, a new dialogue will show up. This dialogue allow
|
||||
|
||||
If you want to play or view your audio's details, you'll have to navigate to the tree view, and, using the down arrow, look for "my audios". You will see two more buttons, play and play all. The play button will play the currently selected audio, and the play all button is not implemented yet. You can go to the song's list, look for a desired song and press the play button, or Ctrl+return, which is a keyboard shorcut.
|
||||
|
||||
You can play audio from any buffer, just press ctrl+return for making the audio playback possible.
|
||||
|
||||
When an audio file is playing, you can press f5 and f6 for decreasing and increasing volume, respectively.
|
||||
|
||||
If you want to see some details for the selected audio file, you can do it by pressing the return key. You will be able to read some useful information (title, artist, duration and the lyric, if available). Also you will be able to download the song to your hard drive, you have to press the download button in the details' dialogue.
|
||||
|
@ -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)
|
Loading…
Reference in New Issue
Block a user