Video Plugin & Play Video w/ Subtitles
#1
I am currently working on a video plugin and I have a few questions regarding how to play the actual video item. Currently on the last (the last level of menus the user sees) directory listing, I add all of the playable items setting isFolder=False. For each listItem, I set the path=URL of the content I wish to play. This works great except for the fact that there is no way to auto play the video with subtitles. The solution that I have found is to call BACK into the plugin one last time. In other words, at the last directory, to set the URL to call back into the plugin.

Once I call back into the plugin, I can then execute:

Code:
item.path = originalContentPath
xbmcplugin.setResolvedUrl(handle, True, item)
player = xbmc.Player()
while not player.isPlaying():
    time.sleep(1)
player.setSubtitles(subtitleURL)


is this the correct means of playing a video with subtitles?

I should add, at some point, I saw similar code in the YouTube plugin to start the video with subtitles.
Reply

Logout Mark Read Team Forum Stats Members Help
Video Plugin & Play Video w/ Subtitles0