Jump to content


Photo

Fast forward and reverse founctionality in player


  • Please log in to reply
9 replies to this topic

#1 idealsat

  • Senior Member
  • 232 posts

0
Neutral

Posted 1 December 2014 - 19:38

Hi

 

I making plugin which play video from internet.

 

I want to put fastward and reverse,pause,stop founctionality which video play from internet.

 

can any one suggest me how i can implement this founctions.

 

Can you provide simple demo.?

 

Thanks

 

 



Re: Fast forward and reverse founctionality in player #2 idealsat

  • Senior Member
  • 232 posts

0
Neutral

Posted 2 December 2014 - 11:30

Anybody.?

 

tsmedia have this founctionality.

 

Anyone know how i can implement.

 

Thanks



Re: Fast forward and reverse founctionality in player #3 idealsat

  • Senior Member
  • 232 posts

0
Neutral

Posted 3 December 2014 - 14:24

Anyone.???


Edited by idealsat, 3 December 2014 - 14:24.


Re: Fast forward and reverse founctionality in player #4 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 3 December 2014 - 15:07

These are function of class infobarseek

you should import infobarseek to your movieplayer and function will work automatically

This is the code from TSmedia demonstate how i use infobarseek

class TSMplayer4(Screen,InfoBarBase,SubsSupport, InfoBarSeek, InfoBarNotifications,InfoBarPVRState,InfoBarShowHide, InfoBarAudioSelection):
	ENABLE_RESUME_SUPPORT = True
	ALLOW_SUSPEND = True
        
	def __init__(self, session, sref,addon_params={},plugin_id=None,playlist=[],playindex=0,playall=False,noexit=False,referer=None,serviceName=None,audio=None,mode='appversion4'):

		Screen.__init__(self, session)
		self.audio=audio
		if 'audio' in plugin_id:
		   self.audio=True
		print "54noexit",noexit
		print "54referer",referer

		self.playlist=playlist
		self.addon_params=addon_params
		try:section=addon_params["section"]
		except:section=None
		self.long_plugin_id=plugin_id
		self.mode=mode
		if self.audio==False:
		   self.audio=None
		self.tubemethod='xbmc'
		if self.audio==True:
		  
		   self.skinName='TSRplayer'
		else:
                   self.skinName='TSMplayer'
		self.onPlayStateChanged = [ ]
                try:os.remove("/tmp/index.txt")
                except:pass
                subs=False
                if self.long_plugin_id is not None:
                  if "movies" in self.long_plugin_id:
                     subs=True
                if  section is not None and section=='movies':
                    subs=True
                if 'filesexplorer' in  self.long_plugin_id:
                   subs=True   
                
                initSubsSettings()
                SubsSupport.__init__(self, embeddedSupport=True, searchSupport=True)
                self.subs=subs
		InfoBarPVRState.__init__(self,screen=PVRState)
		self.pvrStateDialog = self.session.instantiateDialog(PVRState)
		self.session = session
		self.plugin_id=plugin_id
		
		try:self.lastservice = self.session.nav.getCurrentlyPlayingServiceReference()
		except:self.lastservice=None		
		self.plugin_path = PLUGIN_PATH

		self.serviceName=serviceName
		self['plugin_icon'] = Pixmap()
		self['programm'] =Label("playing stream..")
                self.onPlayStateChanged = [ ] 		
                #self['picon'] = Pixmap()		
		
		playlist=[]
		try:os.remove("/tmp/index.txt")
                except:pass	
		self.referer=referer
		print "33",self.referer

		self.noexit=noexit
		self.InfoBar_NabDialog = Label('')	
		self['channel_number'] = Label(str(playindex))                
				
		self.statusScreen = self.session.instantiateDialog(StatusScreen)	
		self.__event_tracker = ServiceEventTracker(screen=self, eventmap=
			{
                                iPlayableService.evUpdatedInfo: self.__evUpdatedInfo,				
                                iPlayableService.evUser+10: self.__evAudioDecodeError,
				iPlayableService.evUser+11: self.__evVideoDecodeError,
				iPlayableService.evUser+12: self.__evPluginError
			})
		self["actions"] = ActionMap(['ColorActions',"WizardActions",'MediaPlayerSeekActions',"InfobarInstantRecord","MediaPlayerActions","EPGSelectActions",'MoviePlayerActions','ColorActions','InfobarActions','MenuActions','NumberActions'],
		{
			"leavePlayer": self.leavePlayer,
			"info":		self.openinfo,
			"menu": self.showpluginsbrowser,
			"red":self.startsubtitle,
			"instantRecord":self.startdownload,			
			"up": 		self.leavePlayer,
			'down': self.av,
			"back":		self.leavePlayer,
			"KEY_TV":(self.refreshSubs, _("Refresh subtitles")),
			"left":		self.seekBack,
			
			"0":self.playnext,
			"right":	self.seekFwd
			
			

		}, -1)
		
 	


Re: Fast forward and reverse founctionality in player #5 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 3 December 2014 - 15:17

InfobarSeek class should be imported from InfoBarGenerics like this

 

from Screens.InfoBarGenerics import *
 



Re: Fast forward and reverse founctionality in player #6 idealsat

  • Senior Member
  • 232 posts

0
Neutral

Posted 3 December 2014 - 16:03

Ok Thanks mfaraj i will test your way soon update you.



Re: Fast forward and reverse founctionality in player #7 idealsat

  • Senior Member
  • 232 posts

0
Neutral

Posted 15 December 2014 - 18:48

Hi mfaraj

 

I tested your code .

 

Now I want to display InfoBar when video Fast forward or backword can you tell me for this.?

 

And

 

But I am not able to import infoBarBase. InfoBar is not displaying  ( from where I can import InfoBarBase? ) or How.?

 

Thanks

soon reply



Re: Fast forward and reverse founctionality in player #8 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 16 December 2014 - 11:01

all classes started by info imported from from Screens.InfoBarGenerics import *

* mean all classes Screens.InfoBarGenerics.py module and this include 

InfoBaraBase and InfoBarShowhide

class TSMplayer4(Screen,InfoBarBase,SubsSupport, InfoBarSeek, InfoBarNotifications,InfoBarPVRState,InfoBarShowHide

somewhere in player initiation code block initiate InfoBarBase and InofBarShowhide

		InfoBarBase.__init__(self)
		InfoBarShowHide.__init__(self)

in seekFwd function just use  method of InfoBarShowHide  self.show

	def seekFwd(self):
	      
	      print "self.playlist451",self.playlist
              if self.subs==True:
	        self.subsDelayInc()
	        return	      
              try: 
                self.show()


Re: Fast forward and reverse founctionality in player #9 idealsat

  • Senior Member
  • 232 posts

0
Neutral

Posted 16 December 2014 - 21:47

Hi

 

i already try this but infobar not shown.but i can do fastword with any button.

 

Problem is infobar not shown.

 

I much trying but not successful.

 

Can you send me demo plugin code how i create demo plugin where i can single video with infobar ,fast forward etc...?

 

Example video play its shown infobar and his founcitonality.

 

Thanks


Edited by idealsat, 16 December 2014 - 21:49.


Re: Fast forward and reverse founctionality in player #10 mfaraj57

  • Senior Member
  • 1,605 posts

+286
Excellent

Posted 17 December 2014 - 10:18

I am sorry i do not have demo plugin for that but you can look for simple player in mediaportal,TSmedia player is complicated to start with


Edited by mfaraj57, 17 December 2014 - 10:18.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users