code to play a video file
#1
hi, can someone tell me where I can find the code which starts a video/.strm when I press play in Kodi? In what file is it stored?

Specifically: What does the syntax look like?



Thank you a lot!
3000
Reply
#2
this should not be so hard to answer.

Please help guys
Reply
#3
Is there a fire somewhere, bumping your own thread after 7.5 hours?
Reply
#4
So, you like to see your posting number go up, I get. DON'T USE ME.
Reply
#5
so back to topic:

hi, can someone tell me where I can find the code which starts a video/.strm when I press play in Kodi? In what file is it stored?

Specifically: What does the syntax look like?


Thank you a lot!
3000
Reply
#6
Short answer: I believe it's somewhere around here.

Long answer: I know enough C++ to know I don't know enough C++ to be able to begin to describe how complex the actions Kodi takes when you "press play".
Reply
#7
thank you @MrTarantula 

if that's too complex, maybe there is an easier way for my problem.

I want to execute a little script when I press the play button. It should still start the video, but should also execute my script with it. 

Any idea how I can achieve that? 

My workaround now looks like this:

I use "Play using ..." to execute my script. 

Then I press play and the video starts.

So it's two steps which I'd like to combine into one.

Possible?
Reply
#8
See my answer in your other thread.
Reply
#9
thank you, will do!
Reply
#10
you could write a python service that monitors f.e. the "onplaybackstarted" signal and then call your script in the background
Reply
#11
thank you @da-anda 

would I be able to run different scripts as well?

And where do I begin??

Trying to learn how to create an add-on for my purpose, but maybe this will be easier to start with.
Reply
#12
you should be able to do whatever you want in your add-on. But since I'm no python dev, it's better to ask for help in the python add-on development section. Also having a look at our wiki should help to get you going with creating your own add-on
Reply
#13
I found one video about code which starts a video
*REMOVED BY MODERATOR*
I hope can help you
Reply
#14
(2019-07-28, 18:42)Karla2019 Wrote: I hope can help you

It's okay to help, but NOT by providing videos displaying Kodi setups that are using banned add-ons.
We have a 0-tolerance for video piracy on this forum. So... Don't do that again.
Reply
#15
xbmc/cores/videoplayer/videoplayer.cpp

Find: void CVideoPlayer::OnStartup()
{
Add your script here. 
}
Reply

Logout Mark Read Team Forum Stats Members Help
code to play a video file0